- Documentation (2.5.3)- Release Notes
- Tutorials
- Reference- Introduction
- System Properties
- Settings Files
- Ivy Files
- Ant Tasks- artifactproperty
- artifactreport
- buildlist
- buildnumber
- buildobr
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- report
- repreport
- resolve
- resources
- retrieve
- settings
- var
 
- Using standalone
- OSGi
 
- Developer doc
 
Mirrored Resolver
| Tag | mirroredurl | 
| Handle latest | yes with HTTP URLs (and Apache server) and with file URLs, no with other URLs | 
| Handle publish | no | 
[since 2.3]
This resolver can resolve dependencies against several mirrors of the same repository. From a list of mirror URLs, it will iteratively try to resolve the dependencies against each one.
Attributes
This resolver shares the common attributes of standard resolvers.
| Attribute | Description | Required | 
|---|---|---|
| m2compatible | True if this resolver should be Maven 2 compatible, false otherwise | No, defaults to false | 
| mirrorListUrl | The URL where to retrieve the list of mirror URLs. | Yes | 
Child elements
Example
Having the file mavenrepolist.txt content:
https://repo1.maven.org/maven2/
http://repo2.maven.org/maven2/And the piece of settings:
<mirroredurl name="mirrored-maven" m2compatible="true" mirrorListUrl="file:///Users/me/dev/repo/mavenrepolist.txt">
      <artifact pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
</mirroredurl>It will resolve first on the repo1 and if failing it will fall back on repo2.
The mirror list can be retrieved from a geo-location aware URL:
<mirroredurl name="mirrored-asf" mirrorListUrl="http://www.apache.org/dyn/closer.cgi">
  <ivy pattern="repo/[organisation]/[module]/[revision]/ivy.xml"/>
  <artifact pattern="repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
</mirroredurl>