views:

28

answers:

2

I use eclipse and the maven plugin. I have a big multi-module project (~6 modules in the workspace). I often have the problem that when running my program (jetty:run) my application does not start because resource files are missing. Looking in the target folder, I noticed they haven't been copied. Only "project" "clean" helps in this case.

Any idea what is going wrong or where I could start debugging the issue? It really slows down my development.

Cheers,

Jan

A: 

It sounds like you're using m2eclipse 0.10.0.

Here is a link for the configuration required in the POM for resources to be found: https://docs.sonatype.org/pages/viewpage.action?pageId=2949459

You may also find that using maven-resources-plugin version 2.4.2 or 2.4.3 may work better than 2.4.

Bruno
This is absolutely not necessary for projects with a Java nature.
Pascal Thivent
Could you clarify this? Java nature as opposed to what (webapps, main + test)? I've had the problem myself with a simple Maven Java project (and with multi-module projects), even for main resources (some have noticed it only for test res.). For me, that something that clearly changes when upgrading from 0.9.8.0 to 0.10.0. Did you have a different experience? What I'm saying is the recommended solution on the m2eclipse user list:http://article.gmane.org/gmane.comp.ide.eclipse.plugins.m2eclipse.user/5684http://thread.gmane.org/gmane.comp.ide.eclipse.plugins.m2eclipse.user/5724/focus=5736
Bruno
Maybe I did something wrong but It doesn't seem to work. I added the profile to the parent pom of my worspaces' projects. Still, I often have to clean my projects. Do I need a special version of eclipse/m2e/maven? Which verions do you have?
Jan
I use version Eclipse 3.5 (build 20100218-1602) and m2eclipse 0.10.0.20100209-0800.
Bruno
A: 

I also experience this behavior sometimes. My workaround is to touch a resource to get the Goals to invoke on resource change (process-resources resources:testResources) triggered. This sounds like a m2eclipse bug.

Pascal Thivent