How to force maven update?

后端 未结 25 1910
失恋的感觉
失恋的感觉 2020-11-22 03:18

I imported my already working project on another computer and it started to download dependencies.

Apparently my internet connection crashed and now I get the foll

相关标签:
25条回答
  • 2020-11-22 03:45

    mvn clean install -U doesn't work. However mvn -U clean followed by mvn clean install does.

    0 讨论(0)
  • 2020-11-22 03:46

    All the answers here didn't work for me. I used the hammer method:

    find ~/.m2/ -name "*.lastUpdated" | xargs rm
    

    That fixed the problem :-)

    0 讨论(0)
  • 2020-11-22 03:46

    You need to check your settings.xml file under <maven_home>/conf directory.

    0 讨论(0)
  • 2020-11-22 03:48

    Just in case someone wants only update project's snapshot dependencies and doesn't want to install artifact:

    mvn dependency:resolve -U
    

    Don't forget to reimport dependencies in your IDE. In IDEA you need to right click on pom file and choose Maven -> Reimport

    0 讨论(0)
  • 2020-11-22 03:48

    In my case first I did was:

    mvn clean install -U
    

    Still it was showing same error then I closed project and again reopened it. Finally worked.

    0 讨论(0)
  • 2020-11-22 03:48

    I've got the same error with android-maps-utils dependency. Using aar type package in dependency section solve my problem. By default type is jar so It might be checked what type of dependency in repository is downloaded.

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