maven can't find archetype in my repository

安稳与你 提交于 2019-12-04 10:41:58
sanjay singh tomar

For using a customized archetype, there has to be an entry made in the archetype-catalog.xml file which resides in the .m2/repository/archetype-catalog.xml in your home directory. For doing so, you need to install the archetype by using the following command:

mvn install archetype:update-local-catalog

After that, you will be able to use your new archetype while creating a new Maven project with the mvn archetype:generate command.

I needed to include -DarchetypeVersion={my.archetype.version} in the mvn archetpe:generate command

It's telling you :

[WARNING] Specified archetype not found.

Did you install your archetype with

mvn install

before trying to use it ?

Executing the mvn install resolves the problem, after executing that from idea the problem got resolved.

From my own experience, You have to search for your groupId is accessible in the below link or not

http://repo.maven.apache.org/maven2/archetype-catalog.xml

I found out I had typo error then I've got error.

In my case the problem was that: - update-local-catalog goal created file ~/.m2/repository/archetype-catalog.xml - generate goal searches for file ~/.m2/archetype-catalog.xml copying the file was a workaround. Not sure how I've fixed this. Sure now with maven 3.5.4 everything is ok.

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