When maven says “resolution will not be reattempted until the update interval of MyRepo has elapsed”, where is that interval specified?

前端 未结 19 1110
迷失自我
迷失自我 2020-11-22 16:49

With maven, I occasionally hit an artifact that comes from some 3rd-party repo that I haven\'t built or included in my repository yet.

I\'ll get an error message fr

相关标签:
19条回答
  • 2020-11-22 17:13

    If you use Nexus as a proxy repo, it has "Not Found Cache TTL" setting with default value 1440 minutes (or 24 hours). Lowering this value may help (Repositories > Configuration > Expiration Settings).

    See documentation for more info.

    0 讨论(0)
  • 2020-11-22 17:14

    you can delete the corresponding failed artifact directory in you local repository. And also you can simply use the -U in the goal. It will do the work. This works with maven 3. So no need to downgrade to maven 2.

    0 讨论(0)
  • 2020-11-22 17:14

    In my case the solution was stupid: I just had incorrect dependency versions.

    0 讨论(0)
  • 2020-11-22 17:16

    I used to solve this issue by deleting the corresponding failed to download artifact directory in my local repo. Next time I run the maven command the artifact download is triggered again. Therefore I'd say it's a client side setting.

    Nexus side (server repo side), this issue is solved configuring a scheduled task. Client side, this is done using -U, as you already pointed out.

    0 讨论(0)
  • 2020-11-22 17:19

    While you can resolve this with a clean install (overriding any cached dependencies) as @Sanjeev-Gulgani suggests with mvn -U clean install

    You can also simply remove the cached dependency that is causing the problem with

    mvn dependency:purge-local-repository -DmanualInclude="groupId:artifactId"
    

    See mvn docs for more info.

    0 讨论(0)
  • 2020-11-22 17:19

    You need to delete all "_maven.repositories" files from your repository.

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