<b>Tag:</b> resolvers <span class="tagdoc" id="ivysettings.resolvers">Defines a list of dependency resolvers usable in ivy.</span> Each dependency resolver is identified by its name, given as an attribute. The child tag used for the dependency resolver must be equal to a name of a dependency resolver type (either built-in or added with the typedef tag). <span class="since">since 1.3</span> Once defined, resolvers can be referenced by their name, using the following syntax: <code type="xml"> <resolver ref="alreadydefinedresolver"/> </code> Note that this works only if the resolver has already been defined and NOT if it is defined later in the ivysettings file. <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>any resolver</td><td>adds a resolver to the list of available resolvers</td> <td>1..n</td></tr> </tbody> </table> <h1>Built-in Resolvers</h1> Ivy comes with a set of built-in dependency resolvers that handle most common needs. If you don't find the one you want here, you can also check if someone has contributed it on the [[links links page]], or even <a href="../extend.html">write your own</a>. There are basically two types of resolvers in Ivy: composite and standard. A composite resolver is a resolver which delegates the work to other resolvers. The other resolvers are standard resolvers. Here is the list of built-in resolvers: <table class="ivy-attributes"> <thead> <tr><th>Name</th><th>Type</th><th>Description</th></tr> </thead> <tbody> <tr><td><a href="../resolver/ivyrep.html">IvyRep</a></td><td>Standard</td><td>Finds ivy files on ivyrep and artifacts on ibiblio.</td></tr> <tr><td><a href="../resolver/ibiblio.html">IBiblio</a></td><td>Standard</td><td>Finds artifacts on ibiblio.</td></tr> <tr><td><a href="../resolver/packager.html">Packager</a></td><td>Standard</td><td>Finds ivy files and packaging instructions via URLs, then creates artifacts by following the instructions.</td></tr> <tr><td><a href="../resolver/filesystem.html">FileSystem</a></td><td>Standard</td><td>This very performant resolver finds ivy files and artifacts in your file system.</td></tr> <tr><td><a href="../resolver/url.html">Url</a></td><td>Standard</td><td>Finds ivy files and artifacts in any repository accessible with urls.</td></tr> <tr><td><a href="../resolver/vfs.html">Vfs</a></td><td>Standard</td><td>Finds ivy files and artifacts in any repository accessible with <a href="http://jakarta.apache.org/commons/vfs/">apache commons vfs</a>.</td></tr> <tr><td><a href="../resolver/ssh.html">ssh</a></td><td>Standard</td><td>Finds ivy files and artifacts in any repository accessible with ssh.</td></tr> <tr><td><a href="../resolver/sftp.html">sftp</a></td><td>Standard</td><td>Finds ivy files and artifacts in any repository accessible with sftp.</td></tr> <tr><td><a href="../resolver/jar.html">Jar</a></td><td>Standard</td><td>Finds ivy files and artifacts within a specified jar.</td></tr> <tr><td><a href="../resolver/chain.html">Chain</a></td><td>Composite</td><td>Delegates the finding to a chain of sub resolvers.</td></tr> <tr><td><a href="../resolver/dual.html">Dual</a></td><td>Composite</td><td>Delegates the finding of ivy files to one resolver and of artifacts to another.</td></tr> <tr><td><a href="../resolver/obr.html">OBR</a></td><td>Standard</td><td>Resolve modules as OSGi bundles listed by an OSGi obr.xml.</td></tr> <tr><td><a href="../resolver/updatesite.html">Eclipse updatesite</a></td><td>Standard</td><td>Resolve modules as OSGi bundles which are hosted on an Eclipse update site.</td></tr> </tbody> </table> <h1><a name="common">Common features and attributes</a></h1> All resolvers of the same type share some common features and attributes detailed here. <h2>Features</h2> <h3>validation</h3> All standard resolvers support several options for validation. The <i>validate</i> attribute is used to configure if ivy files should be checked against the ivy file xml schema. The checkconsistency attribute allows you to enable or disable consistency checking between what is expected by Ivy when it finds a module descriptor, and what the module descriptor actually contains. The descriptor attribute lets you define if module descriptors are mandatory or optional. The checksums attribute is used to define the list of checksums files to use to check if the content of downloaded files has not been corrupted (eg during transfer). <h3>force</h3> Any standard resolver can be used in force mode, which is used mainly to handle local development builds. In force mode, the resolver attempts to find a dependency whatever the requested revision is (internally it replace the requested revision by 'latest.integration'), and if it finds one, it forces this revision to be returned, even when used in a chain with returnFirst=false. By using such a resolver at the beginning of a chain, you can be sure that Ivy will pick up whatever module is available in this resolver (usually a private local build) instead of the real requested revision. This allows to handle use case like a developer working on modules A and C, where A -> B -> C, and pick up the local build for C without having to publish a local version of B. <span class="since">since 2.0</span> <h2>Attributes</h2> <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><th>Composite</th><th>Standard</th></tr> </thead> <tbody> <tr><td>name</td><td>the name which identifies the resolver</td> <td>Yes</td> <td>Yes</td> <td>Yes</td> </tr> <tr><td>validate</td><td>indicates if resolved ivy files should be validated against ivy xsd</td> <td>No, defaults to call setting</td> <td>Yes</td> <td>Yes</td> </tr> <tr><td>force</td><td>Indicates if this resolver should be used in force mode (see above). <span class="since">since 2.0</span></td> <td>No, defaults to false</td> <td>No</td> <td>Yes</td> </tr> <tr><td>checkmodified</td><td>Indicates if this resolver should check lastmodified date to know if an ivy file is up to date.</td> <td>No, defaults to ${ivy.resolver.default.check.modified}</td> <td>No</td> <td>Yes</td> </tr> <tr><td>changingPattern</td><td>Indicates for which revision pattern this resolver should check lastmodified date to know if an artifact file is up to date. <span class="since">since 1.4</span>. See <a href="../concept.html#change">cache and change management</a> for details.</td> <td>No, defaults to none</td> <td>Yes</td> <td>Yes</td> </tr> <tr><td>changingMatcher</td><td>The name of the <a href="../concept.html#matcher">pattern matcher</a> to use to match a revision against the configured changingPattern. <span class="since">since 1.4</span>. See <a href="../concept.html#change">cache and change management</a> for details.</td> <td>No, defaults to exactOrRegexp</td> <td>Yes</td> <td>Yes</td> </tr> <tr><td>alwaysCheckExactRevision</td><td>Indicates if this resolver should check the given revision even if it's a special one (like latest.integration). <span class="since">since 1.3</span></td> <td>No, defaults to ${ivy.default.always.check.exact.revision}</td> <td>No</td> <td>Yes</td> </tr> <tr><td>namespace</td><td>The name of the namespace to which this resolver belons <span class="since">since 1.3</span></td> <td>No, defaults to 'system'</td> <td>Yes</td> <td>Yes</td> </tr> <tr><td>checkconsistency</td><td>true to check consistency of module descriptors found by this resolver, false to avoid consistency check <span class="since">since 1.3</span></td> <td>No, defaults to true</td> <td>No</td> <td>Yes</td> </tr> <tr><td>descriptor</td><td>'optional' if a module descriptor (usually an ivy file) is optional for this resolver, 'required' to refuse modules without module descriptor <span class="since">since 2.0</span></td> <td>No, defaults to 'optional'</td> <td>No (except dual)</td> <td>Yes</td> </tr> <tr><td>allownomd</td><td><em>DEPRECATED. Use descriptor="required | optional" instead.</em> true if the absence of module descriptor (usually an ivy file) is authorised for this resolver, false to refuse modules without module descriptor <span class="since">since 1.4</span></td> <td>No, defaults to true</td> <td>No (except dual)</td> <td>Yes</td> </tr> <tr><td>checksums</td><td>a comma separated list of <a href="../concept.html#checksum">checksum algorithms</a> to use both for publication and checking <span class="since">since 1.4</span></td> <td>No, defaults to ${ivy.checksums}</td> <td>No</td> <td>Yes</td> </tr> <tr><td>latest</td><td>The name of the latest strategy to use.</td> <td>No, defaults to 'default'</td> <td>Yes</td> <td>Yes</td> </tr> <tr><td>cache</td><td>The name of the cache manager to use.</td> <td>No, defaults to the value of the default attribute of caches</td> <td>No</td> <td>Yes</td> </tr> <tr><td>signer</td><td>The name of the [[settings/signers detached signature generator]] to use when publishing artifacts. <span class="since">(since 2.2)</span></td> <td>No, by default published artifacts will not get signed by Ivy.</td> <td>No</td> <td>Yes</td> </tr> </tbody> </table> <h1>Examples</h1> <code type="xml"> <resolvers> <filesystem name="1" cache="cache-1"> <ivy pattern="${ivy.settings.dir}/1/[organisation]/[module]/ivys/ivy-[revision].xml"/> <artifact pattern="${ivy.settings.dir}/1/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/> </filesystem> <chain name="chain1"> <resolver ref="1"/> <ivyrep name="ivyrep"/> </chain> <chain name="chain2" returnFirst="true" dual="true"> <resolver ref="1"/> <ibiblio name="ibiblio"/> </chain> </resolvers> </code> Defines a filesystem resolver, named '1', which is then used in two chains, the first which combines the filesystem resolver with an ivyrep resolver, and second which combines the filesystem resolver with an ibiblio resolver, and which returns the first module found, and uses the whole chain to download artifacts (see corresponding resolvers documentation for details about them). Resolver 1 will use a cache named 'cache-1' which should have been defined under the caches element.