In the pom.xml
I can define repositories
and dependencies
, but I do not see a way, how to declare, which dependencies should be taken from which repository. For example dependency A should be loaded from repository X and dependency B - from repository Y, with a different URL. How do I declare this in my pom.xml and/or settings.xml?
CodePudding user response:
You cannot.
But you do not need to care.
Maven goes through all the declared repositories to look for the dependencies. So it will eventually find them.
CodePudding user response:
Maven 3 lookups for dependencies in the order that repositories are declared. It will use the first available. Maven repository lookup order