I want to restrict maven to use only the private / not public maven repository, do these two parameters have the same effect?
1. Set the mirror in settings.xml
<mirrors>
<mirror>
<id>my-internal-site</id>
<mirrorOf>*</mirrorOf>
<name>our maven repository</name>
<url>http://myserver/repository</url>
</mirror>
</mirrors>
2.Create a repository in pom.xml
<repositories>
<repository>
<id>my-internal-site</id>
<name>our maven repository</name>
<url>http://myserver/repo</url>
</repository>
</repositories>
Again, the requirement is that maven never goes to public repositories, even if some dependencies are not there in the internal repository. thank
source
share