How to use my custom archetype with Maven?

无人久伴 提交于 2019-12-04 02:52:18

I've found a solution : when I install my archetype I need to use the option archetype:update-locate-catalog like this :

mvn install archetype:update-local-catalog

Instead a simple "mvn install" command.

And now I find my new custom archetrype in the local catalog when I want generate a new custom project :

mvn archetype:generate -DarchetypeCatalog=local

Arpit Nagar

To install the archetype run the following maven command:-

mvn clean install archetype:update-local-catalog

This would basically create an xml file corresponding to the archetype catalog in your repository. Hereafter, you can go the Maven Archetypes setting in your IDE and select Add Local Cataglog option and provide this local catalog path. Now, it should be visible while you are creating the new maven project from your IDE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!