maven-archetype-webapp eclipse problem

  • Read the m2eclipse WTP mini-howto.
  • Check the online Developing with Eclipse and Maven.
  • Ensure your settings.xml is configured in the Eclipse preferences.
  • Check the m2eclipse FAQ.

Anything else is likely to be down to the archetype and how you've configured your pom.xml. The directory structure you describe is identical to the one maven-archetype-webapp creates on the command line.


Simply create a java directory under main (i.e. src/main/java) and right-click on your project and select Maven > Update Project Configuration.


  1. By default, When you create a project with maven archetype "maven-archetype-webapp", it doesn't create any java and test folders.
  2. You can manually add those folders as src/main/java and src/test/java.
  3. After adding these folders, right click on your project in project explorer, go to maven>update project conf.

Simply create a java directory under main (i.e. src/main/java) and right-click -> Build Path -> Use a Source Folder