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

后端 未结 3 1436
借酒劲吻你
借酒劲吻你 2021-01-19 02:50

I\'m trying to run mvn clean package on my Maven project and it fails with the message:

\"required artifact is missing\" for the artifact net.ezswit

相关标签:
3条回答
  • 2021-01-19 03:13

    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.

    0 讨论(0)
  • 2021-01-19 03:14

    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
    
    0 讨论(0)
  • 2021-01-19 03:17

    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.

    0 讨论(0)
提交回复
热议问题