How do I prevent Maven 2 from searching remote repositories for specific local depedencies?

后端 未结 4 902
一整个雨季
一整个雨季 2020-12-19 01:46

How do I prevent Maven 2 from searching remote repositories for specific dependencies that are in the local repository only?

4条回答
  •  既然无缘
    2020-12-19 02:25

    1. set up nexus as a repository manager.
    2. add addtional remote proxied repositories if necessary
    3. add your local hosted repository (hosted on the nexus server)
    4. define a group of repositories in the correct search sequence with your local repo's first.
    5. change your builds to point at the nexus group url (use mirrorOf=* in your settings.xml)
    6. run your build and let nexus manage the local vs remote dependency resolution

提交回复
热议问题