On Thu, May 22, 2008 at 11:50 PM, Murray Waters <[EMAIL PROTECTED]>
wrote:

> Hi all,
>
> Still a little new to maven concepts (am getting there), but wondering what
> the m2eclipse way of including configuration resources on the classpath is.
>
> I have created a folder called "conf" under "main" and put my log4j.xml in
> that folder
>
> so that there is
>
> src
> - main
>   - conf
>      -log4j.xml
>   + java
>   + resources
>   + webapp
>
>
> How do I get m2eclipse to include this when i deploy? ideally I would
> actually rather it to be conf/dev/, conf/prod/ etc with my log4j inside a
> "dev" folder.
>
> Cheers
>
> Murray
>

I'm no expert, but...

src/main/resources is the standard location for configuration files.  This
can be changed in your POM [1][2].  If you want different resources for
different builds, I think you would need to look at profiles [3], perhaps
with filtering [4] or maybe by specifying different resource folders per
profile.  As per Brian's reply, this is standard Maven stuff - however, I'm
not sure how well supported using these features is by the m2eclipse plugin,
but there has been a lot of improvement for WTP support in the latest dev
releases.  Perhaps the devs working on the WTP integration functionality can
comment more.

Mark.

[1] http://maven.apache.org/pom.html#Resources
[2]
http://maven.apache.org/guides/getting-started/index.html#How_do_I_add_resources_to_my_JAR
[3] http://maven.apache.org/pom.html#Profiles
[4]
http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files

Reply via email to