General steps for using archetype
- Command--MVN Archetype:generate
- After entering the command, the archetype plugin will output a archetype list for the user to select, select the archetype you want to use, enter the corresponding number
- Prompt to enter some basic parameters, such as groupid,artifactid,version,package, etc.
- Archetype Plugin Build Project skeleton
Common Archetypemaven-archetype-quickstart
The default archetype, the basic content includes:
- A pom.xml that contains the JUnit dependency claims
- Src/main/java main code directory and a class called app
- Src/test/java Test Code catalog and a test case named Apptest
Maven-archetype-webapp
One of the simplest Maven War project templates that you can use when you need to quickly create a web app. The resulting project content includes:
- A pom.xml with a packaging war and a junit-dependent declaration
- src/main/webapp/Directory
- src/main/webapp/index.jsp file
- Src/main/webapp/web-inf/web.xml file
Maven archetype Plugin