I have a project that needs to fetch artifacts from two different repos. And even the artifacts inside the repos have dependencies to one another. For example, my project might depend on artifact A (in repo 1), which depends on artifact B( in repo 2), which again depends on artifact C (in repo 1 again).
I am having a lot of trouble configuring my settings.xml to make it work (For example mvn always tries to go to repo 1 for artifact B, which is wrong). Anybody got a clue how exaclty this is decided in maven?
All repositories are searched in order.
The number one reason why this does not happen are <mirror>
s. Mirrors override repository definitions. If you, for example, define a mirror with <mirrorOf>*</mirrorOf>
it will take all the requests and your other repository definitions just don't matter any more.
The number two reason is problems with one of the repositories. A repository which does not contain an artifact is expected to answer with 404
. If it instead returns some gibberish or a 500
error or anything else, this might break the resolution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With