facebook

[Closed] how to copy .properties files into output dir?

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #249834 Reply

    ppine1
    Member

    Hi,
    In my Web App, under the webroot directory, I have a ‘properties’ directory where I keep all resource bundles and log properties files. I need to copy those properties into the WEB-INF/classes dir in the final deployable .war file. The only way I found that would do this in MyEclipse automatically was to place these .properties files into the src directory. Then, when the web app is built, the files are copied into the WEB-INF/classes dir. If I declare the ‘properties’ directory as another source directory with the WEB-INF/classes as the output directory – it does not lead to copying the files over.

    I woudl really prefer not to have the prooperties files under the src directory, for various reasons – is there any way to make MyEclipse do what I need and pick these files up from the ‘properties’ dir?

    Thanks!
    Marina

    #249861 Reply

    Riyad Kalla
    Member

    I have a ‘properties’ directory where I keep all resource bundles and log properties files.

    This should go in the root of your /src directory actually.

    If I declare the ‘properties’ directory as another source directory with the WEB-INF/classes as the output directory – it does not lead to copying the files over.

    It should. Make sure you haven’t accidentally set another output dir for that individual source dir. Also make sure it’s a different dir from your WebRoot. Really the best policy is to keep this in your /src dir. This isn’t a MyEclipse thing, this is a “what most people do” thing.

    I woudl really prefer not to have the prooperties files under the src directory, for various reasons – is there any way to make MyEclipse do what I need and pick these files up from the ‘properties’ dir?

    Actually you did exactly the right thing by placing it in another directory and making that dir a source directory. I’m surprised it didn’t work.

    #249891 Reply

    ppine1
    Member

    The problem was that I had the properties directory under the web root dir. Once I moved it out – the build worked correctly.
    thanks!!

    #249895 Reply

    Riyad Kalla
    Member

    Glad it’s working now.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] how to copy .properties files into output dir?

You must be logged in to post in the forum log in