maven添加额外archetype
用Eclipse + m2e 插件新建maven项目时发现archetype太少了,网上搜索如何添加额外的archetype.
http://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html
The Archetype Plugin knows by default about its internal catalog. It also knows about the local and remote catalogs.
local represents the ~/.m2/archetype-catalog.xml catalog file.
remote represents the http://repo1.maven.org/maven2/archetype-catalog.xml catalog file.
The Archetype Plugin can also read catalogs from filesystem/HTTP by providing the path/URL of a catalog file or of a directory containing an archetype-catalog.xml file.
可以从上述网址下载archetype-catalog.xml另存为~/.m2/archetype-catalog.xml
再新建maven项目,发现Catalog为Default Local中有了很多的archetype。