Yesterday I asked about using an exlusive maven repository, now it turns I need to use 2, they are both private .. so concerning this link which explains about forcing maven to use one repository, how do I specify the second repository? Lets take for instance I have two of these repositories in my pom.xml now, if something is missing in the two repositories it will go and search the dependency on the public repository, how to prevent this?
<repositories>
<repository>
<id>my-internal-site</id>
<name>our maven repository</name>
<url>http://myserver/repo</url>
</repository>
<repository>
<id>my-other-internal-site</id>
<name>our 2nd maven repository</name>
<url>http://myserver/repo2</url>
</repository>
</repositories>
Would I need to alter the setting xml as this?
<settings>
...
<mirrors>
<mirror>
<id>internal-repository</id>
<name>our maven repository</name>
<url>http://myserver/repo</url>
<mirrorOf>my-internal-site,my-other-internal-site</mirrorOf>
</mirror>
<mirror>
<id>my-other-internal-site</id>
<name>our 2nd maven repository</name>
<url>http://myserver/repo2</url>
<mirrorOf>my-internal-site,my-other-internal-site</mirrorOf>
</mirror>
</mirrors>
...
</settings>
Or in some other way ?
EDIT
I know that I don't need to set repositories in my pom.xml if I specify exclusive ones in settings.xml .. I'm just making a point so someone can answer my question better.. thank you