maven添加额外archetype 博客分类: mavenJAVA maven
程序员文章站
2024-02-12 15:51:10
...
用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。
参考:
http://www.cnblogs.com/wucg/p/3943872.html?utm_source=tuicool&utm_medium=referral
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。
参考:
http://www.cnblogs.com/wucg/p/3943872.html?utm_source=tuicool&utm_medium=referral