blob: 27ac6b79f1eb60dcb388d5c02a0597dcb6562283 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<script type="text/javascript">var xookiConfig = {level: 1};</script>
<script type="text/javascript" src="xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
<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>
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>