mvn package fails with Required Artifact Missing even though it exists in my Remote Repository

社会主义新天地 提交于 2019-12-01 18:20:26

Apparently error message "required artifact is missing" was hiding the actual root cause, which was not visible in the message(s). Running Maven with debug messages on (-X option) will print out additional information that gives more detailed insight as to what would be the problem.

For future reference, this time the error was

[WARNING] Unable to get resource 'net.ezswitch:ResourcesComponent:pom:0.0.14' from repository central (ezpay-dev.liquix.eu:9998/repository):
Specified destination directory cannot be created: /Users/hordine/.m2/repository/net/ezswitch/ResourcesComponent/0.0.14

Which wasn't visible without the debug flag.

If you haven't already, could you please try:

mvn -U clean package

In addition updating all snapshot versions, in case they have been newly deployed to the repository since Maven's once a day snapshot check, this will also force Maven to update its other cached repo resolutions, such as 404's.

Just had this problem. Went through so many solutions on my Mac. In the end changed my

~/.m2/settings.xml

changed this:

 <localRepository>${USER.HOME}/.m2/repository</localRepository>

to this:

 <localRepository>${env.HOME}/.m2/repository</localRepository>

you can see all the properties you have to play with on a mac by typing in a terminal

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