Task X: Using Archiva as a Repository Mirror
Archiva is pre-configured with two repositories already set up. There is Archiva Managed Internal Repository which is used for Release artifacts and Archiva Managed Snapshot Repository which you can probably guess is used for Snapshot artifacts. The URLs for these repositories are:
http://localhost:8080/archiva/repository/internal/
http://localhost:8080/archiva/repository/snapshots/
It is also pre-configured to proxy two public repositories: central and java.net. The `internal' repository is set up to proxy these two repositories. This means if you point to your Archiva instance as a mirror, it will retrieve artifacts from those repositories and then cache them for future retrieval. This can be a big bandwidth and time saver if you have a number of developers using Maven at your company. For sole developers the local repository should be fine.
- id: This should be a unique identifier. If you need to provide authentication information for a mirror you will need to reference this id.
- name:
- url:
- mirrorOf:
Configure Maven to use Archiva as a Mirror
Edit ~/.m2/settings.xml
and add the following:
<settings>
...other stuff...
<mirrors>
<mirror>
<id>archiva</id>
<name>Archiva</name>
<url>http://localhost/archiva/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>