Search code examples
eclipsemavenm2eclipsemaven-archetype

Change Maven Archetype after a project is created in Eclipse?


I've created a Maven project with maven-archetype-quickstart.

I've started coding and now I want to change the archetype to maven-archetype-webapp in order to make it a dynamic web project.

How do I achieve this?


Solution

  • Archetypes are just used to create a project (ie initialize configuration, source folders, ...) and are not used after that. So if you want to change your project nature you've to do it "by hand".

    It seems that in your case, you just have to change in pom.xml, the package type to war and to proceed a "Maven update project" in your IDE so maven plugin will update configuration.