Hi,
its more of a general Maven/Eclipse question but maybe someone here already stumbled upon this. Googling doesn't really helped me so far.
I have created a multi module project based on gwt-maven-archetypes with some modifications and now I want to do Maven resource filtering in my server project to filter some property files for production/dev environments. I have src/main/resources as source folder and Eclipse is configured to exclude everything in that source folder (exclude pattern '**' in build path settings). Makes total sense to me as Maven will process the resources in order to be able to filter them.
When I run jetty:run on my server project everything works fine (resources are filtered) but as soon as I modify a class in the server project (or open a file in the resource folder with Eclipse) Eclipse copies everything from src/main/resources to target/classes and overwrites my filtered resources with the non filtered versions. Now jetty redeploys the server code because target/classes has changed and well obviously its broken now. Also when running mvn clean the target folder gets deleted, Eclipse recompiles files and then copies all resources. So after a mvn clean I end up with class files and (unfiltered) resources in target/classes.
Looks like Eclipse is ignoring the exclude pattern in the build path settings. The projects .classpath file contains a classpath entry with 'excluding="**"' so it seems correct to me. I also tried to use * or */** or directly exclude a specific file like app.properties but it has no effect at all. Eclipse always copies everything in src/main/resources to target/classes when it thinks it needs to.
Has anyone else seen this behavior with Maven and Eclipse? As I am relatively new to maven, maybe I have missed some configuration in Eclipse?
I am on Mac OS 10.8.2 and Eclipse Juno SR 1.
I would really appreciate some input/help.
Thanks in advance.
-- J.