Mirrored repositories

Most of the Maven repositories maintain a set of mirrored repositories to cater to high demand. Maven repositories are defined in the application pom.xml file in a project specific manner. Mirrored repositories are defined outside the application POM, either in MAVEN_HOME/conf/settings.xml or USER_HOME/.m2/settings.xml. A given repository can have multiple mirrored repositories in multiple geographical locations, for example, one in the US, one in Europe, and another in Asia. Based on the user's proximity, they can pick the mirrored repository. Due to the same reason, we cannot define it in the application POM file. In a large-scale project, developers can come from every corner of the world, and we cannot define a mirrored ...

Get Mastering Apache Maven 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.