2
votes

I have a maven project that have four build path

src/main/java
src/main/resources
src/test/java
src/test/resources

but when I perform, in eclipse, "Maven->Update Project Configuration",the build path "src/main/resources" is removed and stay as simple folders.

Any idea why?

2

2 Answers

0
votes

Which version of m2e are you using?

I currently am using m2e 1.2, the latest N release.

For your maven configuration, just note:

  • Don't specify your build paths: m2e & Maven will recognise those are part of the build paths. This is defined in Maven's internal super-pom

  • src/main/resources is on the build path, but is not a source directory. Meaning, Eclipse may not show it as being on Java's source path within your project, but any files added there are included in the built package / on execution. Therefore, being just 'simple' folders is correct.

0
votes

If you want your src/main/resources folder to be mapped as a source folder in eclipse, just add the following line in the .classpath file of your project:

<classpathentry kind="src" path="src/main/resources"/>