We use settings.xml where we have several repositories and pluginrepositories defined which also include our own enterprise artifactory.The pom.xml doesn't use any repositories and its all through settings.xml Since the builds run on ephemeral jenkins agent so everytime its a new fetch of dependencies as there is no cache. Today i saw a serious outage with https://repository.mulesoft.org so several of the repos under this domain like https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/ and http://repository.mulesoft.org/releases/ were down for a while Unfortunately maven always reached out to these repos and when it got a bad gateway it would fail the build and not even attempt to reach out to enterprise artifactory repositories that are also defined in the settings.xml I am wondering what is the order that maven looks at when it reaches out to the defined repositories in settings.xml to resolve dependencies. I saw an interesting post at How to set order of repositories in Maven settings.xml and it looks to me its the albhabetical order of the repository/pluginRepository id that matters here. However want to confirm if anyone knows about this?
Asked
Active
Viewed 149 times
1
-
1Define all those repositories in your Artifactory...instead of settings.xml... – khmarbaise Aug 20 '20 at 17:54
-
Yeah that is a possible solution, but i am still curious as to what is the order in which maven looks for repositories defined in settings.xml while resolving dependencies? – Ashley Aug 20 '20 at 22:46