Change Maven Archetype after a project is created in Eclipse?

Harshal Kshatriya picture Harshal Kshatriya · Apr 22, 2013 · Viewed 11.3k times · Source

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?

Answer

yodamad picture yodamad · Apr 22, 2013

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.