Im my pom.xml there is a section re. generated resources (these are generated using the hibernate3-maven-plugin / v2.2).
In my understanding this should add "target/generated-sources" to the compilation source path, so that these files are also compiled and the generated class files end up in .../target/classes.
Now, after importing that project into Eclipse I find the below in the .classpath file:
<classpathentry kind="src" output="target/test-classes" path="target/generated-sources">
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
Why does M2E consider these generated-sources as test-classes, i.e. puts them into the target/test-classes folder and marks that path with 'attribute name="test" value="true"' ??? Of course the compilation of dependent projects then invariably fails because imports of these generated classes can not be satisfied. :-(
If I manually mangle the .classpath file and change the output path to 'output="target/classes"' and remove the test-attribute, then things work fine. But shortly after Eclipse will mark my project faulty because it is out-of-sync with regards to the pom.xml and requires me to do a Maven -> Update project. But this changes things back to faulty and the compilation fails again. :-((
Is there anything wrong with the pom or is that a bug in M2E or how can I correct that situation?