“Update Project Configuration” does not correctly update maven war-projects with the maven standard /src/main/java/, /src/main/resources/, /src/test/java/, /src/test/resources/ structure.
After updating project configuration, the sources folder point to /target/classes/, instead of /web-inf/classes/.
— Steps to re-create:
Step #1: Create the standard maven webapp project structure:
|-pom.xml
|-src
|-main
|-java
|-webapp
|-WEB-INF
|-web.xml
pom.xml contents:
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>testing</groupId>
<artifactId>Test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<build></build>
</project>
Step #2: Enable importing of existing maven project
MyEclipse menu Window/Preferences/”MyEclipse Enterprise Workbench”/Maven4MyEclipse/”Enable all m2eclipse features”=true
Step #3: Import project with:
MyEclilpse menu File/Import…/Maven Projects/
Goto to the “Java Build Path”, verify /src/main/java/ points to /WEB-INF/classes.
Step #4: Right-click project, under Maven4MyEclipse, choose “Update Project Configuration”.
/src/main/java/ now points /target/classes instead of /WEB-INF/classes.