Let's say my settings.xml is defined like below
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://artifactory.ark.local:8080/libs-release</url>
</repository>
<repository>
<id>vmware-repo</id>
<name>VM Nexus Repo</name>
<url>http://build-squid.eng.vm.com/nexus/content/groups/repo</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://artifactory.ark.local:8080/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://artifactory.ark.local:8080/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://artifactory.ark.local:8080/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
In a multimodule project of the form
main
storage
metrics
config
common
Let's say in metrics pom if a repository is added.
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
If a dependency is defined in
Awhich is present in both cloudera repo and local nexus repo how maven will resolve the repository? Will it first try to download from cloudera repo and if there is some problem then it will go in local nexus repo or it will check only in cloudera repo and if it is not present it will give error without trying from local nexus repo?Does the answer to the above question change based on if
Ais defined as a dependency inmetricor some other pom where repository is not defined?
Maven Version - 3.6.3