By accident we discovered that one of our dependencies (spring-data-jpa 1.1.0.RELEASE, see its pom-file) includes a <repository>.
This means that our builds directly go to that repository, circumventing our own central Maven repository.
However, we want our builds to be controlled: all artifacts should come from our department's Maven repository, and that we configure to have or get everything we need from the places we want.
Question: How can we instruct Maven to ignore <repositories> from dependent artifacts' pom-files?
You can disable a repository like this:
<repository>
<id>spring-libs-release</id>
<url>http://repo.springsource.org/libs-release</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
Or you can try using a mirrorOf declaration, to use a single repository:
<mirrors>
<mirror>
<id>internal-repository</id>
<name>Maven Repository Manager running on repo.mycompany.com</name>
<url>http://repo.mycompany.com/proxy</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With