Http://www.cnblogs.com/buhaiqing/archive/2012/11/04/2754187.html
Will find all supported Arche types from MAVEN's repository, probably 500~600. Because it is too much, it is inconvenient to find it.
In fact, usually commonly used Arche type is also so few. Like I would use:
1.simple start
2. Web App
3. Groovy Basic
It is natural to consider whether there is a simple way to choose from the 3 list. The answer is of course: Yes
The implementation steps are as follows: (Native Maven repository directory in C:\Users\buha\.m2)
1. Using the MVN archetype:crawl command, it generates a Archetype-catalog.xml file in the C:\Users\buha\.m2\repository directory
2. Move the archetype-catalog.xml to the previous level directory, which is C:\Users\buha\.m2
3. Then run MVN archetype:generate-darchetypecatalog=local to achieve your desired goal.
Attach xml:
<?xml version= "1.0" encoding= "UTF-8"?>
<archetype-catalog xsi:schemalocation= "http://maven.apache.org/plugins/maven-archetype-plugin/ archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd "
Xmlns= "http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0"
xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" >
<archetypes>
<archetype>
<groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetype-quickstart</artifactId>
<version>1.0</version>
</archetype>
<archetype>
<groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetype-webapp</artifactId>
<version>1.0</version>
</archetype>
</archetypes>
</archetype-catalog>
Quickly create MAVEN projects: Simple Java Engineering, WebApp