<table class="resolver"> <tr><td class="title">Tag</td><td class="value">mirroredurl</td></tr> <tr><td class="title">Handle latest</td><td class="value">yes with http urls (and apache server) and with file urls, no with other urls</td></tr> <tr><td class="title">Handle publish</td><td class="value">no</td></tr> </table> <span class="since">since 2.3</span> <br/> <span class="tagdoc" id="ivysettings.resolvers.mirroredurl">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. <h1>Attributes</h1> This resolver shares the <a href="../settings/resolvers.html#common">common attributes</a> of standard resolvers. <table class="ivy-attributes"> <thead> <tr><th class="ivy-att">Attribute</th><th class="ivy-att-desc">Description</th><th class="ivy-att-req">Required</th></tr> </thead> <tbody> <tr><td>m2compatible</td><td>True if this resolver should be maven2 compatible, false otherwise</td> <td>No, defaults to false</td></tr> <tr><td>mirrorListUrl</td><td>The url where to retrive the list of mirror urls.</td> <td>Yes</td></tr> </tbody> </table> <h1>Child elements</h1> <table class="ivy-children"> <thead> <tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th class="ivy-chld-card">Cardinality</th></tr> </thead> <tbody> <tr><td>ivy</td><td>defines a pattern for ivy files, using the pattern attribute</td> <td>0..n</td></tr> <tr><td>artifact</td><td>defines a pattern for artifacts, using the pattern attribute</td> <td>1..n</td></tr> </tbody> </table> <h1>Example</h1> Having the file mavenrepolist.txt content: <code> http://repo1.maven.org/maven2/ http://repo2.maven.org/maven2/ </code> And the piece of settings: <code type="xml"> <mirroredurl name="mirrored-maven" m2compatible="true" mirrorListUrl="file:///Users/me/dev/repo/mavenrepolist.txt"> <artifact pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /> </mirroredurl> </code> It will resolve first on the repo1 and if failing it will fall back on repo2. <hr /> The mirror list can be retrieved from a geo-location aware url: <code type="xml"> <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> </code>