Maven archetypes

Maven archetypes are used to generate the sample project structure.

Here are the most popular archetypes in Maven

  1. Quick Start
  2. Web app

Below command will create a sample project using quick start archetype. Note that double quotes around the parameter values are required if you are executing below command using window command prompt or windows Powershell.

mvn archetype:generate -DgroupId=”org.softpost” -DartifactId=”MyStandardApp” -DarchetypeArtifactId=”maven-archetype-quickstart” -DinteractiveMode=”false”

Below command will create a sample project using web app archetype.

mvn archetype:generate -DgroupId=”org.softpost” -DartifactId=”MyWebApp” -DarchetypeArtifactId=”maven-archetype-webapp” -DinteractiveMode=”false”

 

You may also like...