You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Scott Eade <se...@backstagetech.com.au> on 2008/11/17 14:06:33 UTC
eclipse:eclipse vs. resources:resources and source folders on build
path
I'm going to try and be brief...
Maven version: 2.0.9
Java version: 1.6.0_10
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
I use the tomcat-maven-plugin to run my application in-place (mvn
tomcat:run).
I have a bunch of resources I need to filter so I have:
<resources>
<resource>
<directory>src/main/config</directory>
<targetPath>../../src/main/webapp</targetPath>
<filtering>true</filtering>
<includes>
<include>**/index.html</include>
<include>**/log4j.properties</include>
<!-- etc. -->
</includes>
</resource>
</resources>
Note how the target path is in the src tree - I have a bunch of
non-filtered resources that exist in that directory.
If I update my eclipse configuration (mvn eclipse:eclipse) the directory
src/main/config is added as a Source folder on the build path, and hence
any subsequent change to my build path (manually adding a jar or running
mvn eclipse:eclipse again) results in the target path (src/main/webapp)
being erased, complete with a couple of thousand files, potentially with
local changes.
So why does eclipse:eclipse add this directory as a source path? Is
there a way of stopping this from being added? Alternatively, is there
a way to tell eclipse to not delete the contents of this location when a
rebuild is necessary? If neither of these things are possible I guess I
will need to somehow restructure my project, but it is not obvious how I
will be able to do so while maintaining the
benefit of being ale to run tomcat in-place.
Does anyone have some answers or advice on a path forwards?
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org