You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2010/10/06 23:25:35 UTC

svn commit: r1005260 [37/45] - in /ant/ivy/site/target/history/2.2.0: ./ configuration/ configuration/caches/ configuration/macrodef/ configuration/namespace/ dev/ images/ ivyfile/ js/ resolver/ samples/ settings/ settings/caches/ settings/macrodef/ se...

Added: ant/ivy/site/target/history/2.2.0/tutorial/dependence.html
URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/tutorial/dependence.html?rev=1005260&view=auto
==============================================================================
--- ant/ivy/site/target/history/2.2.0/tutorial/dependence.html (added)
+++ ant/ivy/site/target/history/2.2.0/tutorial/dependence.html Wed Oct  6 21:25:29 2010
@@ -0,0 +1,409 @@
+<!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>
+	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+	<script type="text/javascript">var xookiConfig = {level: 1};</script>	
+	
+
+<title>Project dependencies | Apache Ivy</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" type="text/css" href="../style/style.css" />
+  <script src="../js/jquery.pack.js" type="text/javascript"></script>
+  <script src="../js/jquery.treeview.js" type="text/javascript"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+  </script>
+
+<script language="javascript" type="text/javascript">xooki = {u: function(url) {return "../xooki/"+url;}};</script>
+</head>
+<body>
+
+<div id="body">
+<table id="header" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td id="home" width="30%"><a href="http://ant.apache.org/"
+			title="Apache Ant"><img src="../images/ant-group-logo.gif" alt="Apache Ant"
+			border="0" /></a></td>
+
+		<td class="product" width="70%" align="right" valign="middle"><img
+			src="../images/logo.png" alt="ivy" border="0" /></td>
+	</tr>
+</table>
+
+<table id="top-menu" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td>
+
+        <div style="float:right;margin: 0 10px;">
+        <!-- Google CSE Search Box Begins -->
+  <form id="searchbox_014292259695392975429:5y6qypnrni8" action="http://ant.apache.org/ivy/search.html">
+    <input type="hidden" name="cx" value="014292259695392975429:5y6qypnrni8" />
+    <input type="hidden" name="cof" value="FORID:11" />
+    <input name="q" type="text" size="30" />
+    <input type="submit" name="sa" value="Search" />
+  </form>
+  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014292259695392975429%3A5y6qypnrni8"></script>
+<!-- Google CSE Search Box Ends -->
+        </div>
+
+		<div id="navcontainer">
+		<a href="http://ant.apache.org/">Apache Ant</a> &gt; <a href="http://ant.apache.org/ivy/">Ivy</a> &gt; <a href="http://ant.apache.org/ivy/history.html">History</a> &gt; <span class="breadCrumb"><a href="../index.html" >Documentation (2.2.0)</a> &gt; <a href="../tutorial.html" >Tutorials</a> &gt; <a href="../tutorial/dependence.html" class="current">Project dependencies</a></span>
+		</div>
+		</td>
+	</tr>
+
+</table>
+
+<table id="content" border="0" cellpadding="0" cellspacing="0"
+	width="100%">
+	<tr>
+		<td id="sidebar-left">
+		<div class="block block-book" id="block-book-0">
+		<h2>Ivy</h2>
+
+		<div class="content"><ul id="treemenu" class="treeview"><li id="xooki-index" class="submenu"><a href="../index.html" >Documentation (2.2.0)</a><ul class="open"><li id="xooki-release-notes"><a href="../release-notes.html" >Release Notes</a></li><li id="xooki-tutorial" class="submenu"><a href="../tutorial.html" >Tutorials</a><ul class="open"><li id="xooki-tutorial/start"><a href="../tutorial/start.html" >Quick Start</a></li><li id="xooki-tutorial/defaultconf"><a href="../tutorial/defaultconf.html" >Adjusting default settings</a></li><li id="xooki-tutorial/multiple"><a href="../tutorial/multiple.html" >Multiple Resolvers</a></li><li id="xooki-tutorial/dual"><a href="../tutorial/dual.html" >Dual Resolver</a></li><li id="xooki-tutorial/dependence"><a href="../tutorial/dependence.html" class="current">Project dependencies</a></li><li id="xooki-tutorial/multiproject"><a href="../tutorial/multiproject.html" >Using Ivy in multiple projects environment</a></li><li id="xooki-tutorial
 /conf"><a href="../tutorial/conf.html" >Using Ivy Module Configurations</a></li><li id="xooki-tutorial/build-repository" class="submenu"><a href="../tutorial/build-repository.html" >Building a repository</a><ul class="closed"><li id="xooki-tutorial/build-repository/basic"><a href="../tutorial/build-repository/basic.html" >Basic repository copy</a></li><li id="xooki-tutorial/build-repository/advanced"><a href="../tutorial/build-repository/advanced.html" >Using namespaces</a></li></ul></li><li id="xooki-moreexamples"><a href="../moreexamples.html" >More examples</a></li></ul></li><li id="xooki-reference" class="submenu"><a href="../reference.html" >Reference</a><ul class="closed"><li id="xooki-intro" class="submenu">Introduction<ul class="closed"><li id="xooki-terminology"><a href="../terminology.html" >Terminology</a></li><li id="xooki-concept"><a href="../concept.html" >Main Concepts</a></li><li id="xooki-textual"><a href="../textual.html" >Text Conventions</a></li><li id="x
 ooki-principle"><a href="../principle.html" >How does it work ?</a></li><li id="xooki-bestpractices"><a href="../bestpractices.html" >Best practices</a></li><li id="xooki-install"><a href="../install.html" >Installation</a></li></ul></li><li id="xooki-settings" class="submenu"><a href="../settings.html" >Settings Files</a><ul class="closed"><li id="xooki-settings/property"><a href="../settings/property.html" >property</a></li><li id="xooki-settings/properties"><a href="../settings/properties.html" >properties</a></li><li id="xooki-settings/settings"><a href="../settings/settings.html" >settings</a></li><li id="xooki-settings/include"><a href="../settings/include.html" >include</a></li><li id="xooki-settings/classpath"><a href="../settings/classpath.html" >classpath</a></li><li id="xooki-settings/typedef"><a href="../settings/typedef.html" >typedef</a></li><li id="xooki-settings/credentials"><a href="../settings/credentials.html" >credentials</a></li><li id="xooki-settings/si
 gners"><a href="../settings/signers.html" >signers</a></li><li id="xooki-settings/lock-strategies"><a href="../settings/lock-strategies.html" >lock-strategies</a></li><li id="xooki-settings/caches" class="submenu"><a href="../settings/caches.html" >caches</a><ul class="closed"><li id="xooki-settings/caches/cache" class="submenu"><a href="../settings/caches/cache.html" >cache</a><ul class="closed"><li id="xooki-settings/caches/ttl"><a href="../settings/caches/ttl.html" >ttl</a></li></ul></li></ul></li><li id="xooki-settings/latest-strategies"><a href="../settings/latest-strategies.html" >latest-strategies</a></li><li id="xooki-settings/parsers"><a href="../settings/parsers.html" >parsers</a></li><li id="xooki-settings/namespaces" class="submenu"><a href="../settings/namespaces.html" >namespaces</a><ul class="closed"><li id="xooki-settings/namespace" class="submenu"><a href="../settings/namespace.html" >namespace</a><ul class="closed"><li id="xooki-settings/namespace/rule" cla
 ss="submenu"><a href="../settings/namespace/rule.html" >rule</a><ul class="closed"><li id="xooki-settings/namespace/fromtosystem" class="submenu"><a href="../settings/namespace/fromtosystem.html" >fromsystem / tosystem</a><ul class="closed"><li id="xooki-settings/namespace/src"><a href="../settings/namespace/src.html" >src</a></li><li id="xooki-settings/namespace/dest"><a href="../settings/namespace/dest.html" >dest</a></li></ul></li></ul></li></ul></li></ul></li><li id="xooki-settings/macrodef" class="submenu"><a href="../settings/macrodef.html" >macrodef</a><ul class="closed"><li id="xooki-settings/macrodef/attribute"><a href="../settings/macrodef/attribute.html" >attribute</a></li></ul></li><li id="xooki-settings/resolvers" class="submenu"><a href="../settings/resolvers.html" >resolvers</a><ul class="closed"><li id="xooki-resolver/ivyrep"><a href="../resolver/ivyrep.html" >IvyRep Resolver</a></li><li id="xooki-resolver/ibiblio"><a href="../resolver/ibiblio.html" >IBiblio 
 Resolver</a></li><li id="xooki-resolver/packager"><a href="../resolver/packager.html" >Packager resolver</a></li><li id="xooki-resolver/filesystem"><a href="../resolver/filesystem.html" >File System resolver</a></li><li id="xooki-resolver/url"><a href="../resolver/url.html" >Url Resolver</a></li><li id="xooki-resolver/chain"><a href="../resolver/chain.html" >Chain Resolver</a></li><li id="xooki-resolver/dual"><a href="../resolver/dual.html" >Dual resolver</a></li><li id="xooki-resolver/sftp"><a href="../resolver/sftp.html" >sftp resolver</a></li><li id="xooki-resolver/ssh"><a href="../resolver/ssh.html" >ssh resolver</a></li><li id="xooki-resolver/vfs"><a href="../resolver/vfs.html" >vfs</a></li></ul></li><li id="xooki-settings/conflict-managers"><a href="../settings/conflict-managers.html" >conflict-managers</a></li><li id="xooki-settings/modules" class="submenu"><a href="../settings/modules.html" >modules</a><ul class="closed"><li id="xooki-settings/module"><a href="../set
 tings/module.html" >module</a></li></ul></li><li id="xooki-settings/outputters"><a href="../settings/outputters.html" >outputters</a></li><li id="xooki-settings/statuses" class="submenu"><a href="../settings/statuses.html" >statuses</a><ul class="closed"><li id="xooki-settings/status"><a href="../settings/status.html" >status</a></li></ul></li><li id="xooki-settings/triggers"><a href="../settings/triggers.html" >triggers</a></li><li id="xooki-settings/version-matchers"><a href="../settings/version-matchers.html" >version-matchers</a></li></ul></li><li id="xooki-ivyfile" class="submenu"><a href="../ivyfile.html" >Ivy Files</a><ul class="closed"><li id="xooki-ivyfile/info" class="submenu"><a href="../ivyfile/info.html" >info</a><ul class="closed"><li id="xooki-ivyfile/extends"><a href="../ivyfile/extends.html" >extends</a></li><li id="xooki-ivyfile/license"><a href="../ivyfile/license.html" >license</a></li><li id="xooki-ivyfile/ivyauthor"><a href="../ivyfile/ivyauthor.html" >
 ivyauthor</a></li><li id="xooki-ivyfile/repository"><a href="../ivyfile/repository.html" >repository</a></li><li id="xooki-ivyfile/description"><a href="../ivyfile/description.html" >description</a></li></ul></li><li id="xooki-ivyfile/configurations" class="submenu"><a href="../ivyfile/configurations.html" >configurations</a><ul class="closed"><li id="xooki-ivyfile/conf"><a href="../ivyfile/conf.html" >conf</a></li><li id="xooki-ivyfile/include"><a href="../ivyfile/include.html" >include</a></li></ul></li><li id="xooki-ivyfile/publications" class="submenu"><a href="../ivyfile/publications.html" >publications</a><ul class="closed"><li id="xooki-ivyfile/artifact" class="submenu"><a href="../ivyfile/artifact.html" >artifact</a><ul class="closed"><li id="xooki-ivyfile/artifact-conf"><a href="../ivyfile/artifact-conf.html" >conf</a></li></ul></li></ul></li><li id="xooki-ivyfile/dependencies" class="submenu"><a href="../ivyfile/dependencies.html" >dependencies</a><ul class="closed
 "><li id="xooki-ivyfile/dependency" class="submenu"><a href="../ivyfile/dependency.html" >dependency</a><ul class="closed"><li id="xooki-ivyfile/dependency-conf" class="submenu"><a href="../ivyfile/dependency-conf.html" >conf</a><ul class="closed"><li id="xooki-ivyfile/mapped"><a href="../ivyfile/mapped.html" >mapped</a></li></ul></li><li id="xooki-ivyfile/dependency-artifact" class="submenu"><a href="../ivyfile/dependency-artifact.html" >artifact</a><ul class="closed"><li id="xooki-ivyfile/dependency-artifact-conf"><a href="../ivyfile/dependency-artifact-conf.html" >conf</a></li></ul></li><li id="xooki-ivyfile/artifact-exclude" class="submenu"><a href="../ivyfile/artifact-exclude.html" >exclude</a><ul class="closed"><li id="xooki-ivyfile/artifact-exclude-conf"><a href="../ivyfile/artifact-exclude-conf.html" >conf</a></li></ul></li><li id="xooki-ivyfile/dependency-include" class="submenu"><a href="../ivyfile/dependency-include.html" >include</a><ul class="closed"><li id="xoo
 ki-ivyfile/dependency-include-conf"><a href="../ivyfile/dependency-include-conf.html" >conf</a></li></ul></li></ul></li><li id="xooki-ivyfile/exclude"><a href="../ivyfile/exclude.html" >exclude</a></li><li id="xooki-ivyfile/override"><a href="../ivyfile/override.html" >override</a></li><li id="xooki-ivyfile/conflict"><a href="../ivyfile/conflict.html" >conflict</a></li></ul></li><li id="xooki-ivyfile/conflicts" class="submenu"><a href="../ivyfile/conflicts.html" >conflicts</a><ul class="closed"><li id="xooki-ivyfile/manager"><a href="../ivyfile/manager.html" >manager</a></li></ul></li></ul></li><li id="xooki-ant" class="submenu"><a href="../ant.html" >Ant Tasks</a><ul class="closed"><li id="xooki-use/artifactproperty"><a href="../use/artifactproperty.html" >artifactproperty</a></li><li id="xooki-use/artifactreport"><a href="../use/artifactreport.html" >artifactreport</a></li><li id="xooki-use/buildlist"><a href="../use/buildlist.html" >buildlist</a></li><li id="xooki-use/bui
 ldnumber"><a href="../use/buildnumber.html" >buildnumber</a></li><li id="xooki-use/cachefileset"><a href="../use/cachefileset.html" >cachefileset</a></li><li id="xooki-use/cachepath"><a href="../use/cachepath.html" >cachepath</a></li><li id="xooki-use/cleancache"><a href="../use/cleancache.html" >cleancache</a></li><li id="xooki-use/configure"><a href="../use/configure.html" >configure</a></li><li id="xooki-use/deliver"><a href="../use/deliver.html" >deliver</a></li><li id="xooki-use/findrevision"><a href="../use/findrevision.html" >findrevision</a></li><li id="xooki-use/info"><a href="../use/info.html" >info</a></li><li id="xooki-use/install"><a href="../use/install.html" >install</a></li><li id="xooki-use/listmodules"><a href="../use/listmodules.html" >listmodules</a></li><li id="xooki-use/makepom"><a href="../use/makepom.html" >makepom</a></li><li id="xooki-use/postresolvetask"><a href="../use/postresolvetask.html" >post resolve tasks</a></li><li id="xooki-use/publish"><a
  href="../use/publish.html" >publish</a></li><li id="xooki-use/repreport"><a href="../use/repreport.html" >repreport</a></li><li id="xooki-use/resolve"><a href="../use/resolve.html" >resolve</a></li><li id="xooki-use/retrieve"><a href="../use/retrieve.html" >retrieve</a></li><li id="xooki-use/report" class="submenu"><a href="../use/report.html" >report</a><ul class="closed"><li id="xooki-yed"><a href="../yed.html" >Using yEd to layout report graphs</a></li></ul></li><li id="xooki-use/settings"><a href="../use/settings.html" >settings</a></li><li id="xooki-use/var"><a href="../use/var.html" >var</a></li></ul></li><li id="xooki-standalone"><a href="../standalone.html" >Using standalone</a></li></ul></li><li id="xooki-dev" class="submenu"><a href="../dev.html" >Developer doc</a><ul class="closed"><li id="xooki-extend"><a href="../extend.html" >Extending Ivy</a></li><li id="xooki-dev/makerelease"><a href="../dev/makerelease.html" >Making a release</a></li><li id="xooki-dev/updat
 esite"><a href="../dev/updatesite.html" >Updating the updatesite</a></li></ul></li></ul></li></ul></div>
+
+		<center><iframe src="http://www.apache.org/ads/buttonbar.html"
+                         style="border-width:0;" frameborder="0" scrolling="no"
+                         width="135" height="265"></iframe>
+                </center>
+                
+		</div>
+
+		</td>
+		
+		<td valign="top">
+		<div id="main">
+
+		<h1 class="title">Project dependencies</h1>
+            <br class="xooki-br"/>This tutorial will show you how to use Ivy when one of your projects depends on another.<br class="xooki-br"/><br class="xooki-br"/>For our example, we will have two projects, depender and dependee, where the depender project uses/requires the dependee project. This example will help illustrate two things about Ivy: 
+<ul>
+  <li>that dependencies defined by parent projects (dependee) will automatically be retrieved for use by child projects (depender)</li>
+  <li>that child projects can retrieve the "latest" version of the dependee project</li>
+</ul>
+<h1>projects used</h1>
+<h2>dependee</h2>
+The dependee project is very simple. It depends on the apache library commons-lang and contains only one class: <tt>standalone.Main</tt> which provides two services:
+<ul>
+  <li>return the version of the project</li>
+  <li>capitalize a string using <tt>org.apache.commons.lang.WordUtils.capitalizeFully</tt></li>
+</ul>
+Here is the content of the project:
+<ul>
+  <li>build.xml: the ant build file for the project</li>
+  <li>ivy.xml: the project ivy file</li>
+  <li>src\standalone\Main.java: the only class of the project</li>
+</ul>
+Take a look at the <b>ivy.xml</b> file:
+<pre>
+&lt;ivy-module version="1.0"&gt;<br class="xooki-br"/>    &lt;info organisation="org.apache" module="dependee"/&gt;<br class="xooki-br"/>    &lt;dependencies&gt;<br class="xooki-br"/>        &lt;dependency org="commons-lang" name="commons-lang" rev="2.0"/&gt;<br class="xooki-br"/>    &lt;/dependencies&gt;<br class="xooki-br"/>&lt;/ivy-module&gt;
+</pre>
+
+The ivy file declares only one dependency, that being the apache commons-lang library.<br class="xooki-br"/><h2>depender</h2>
+The depender project is very simple as well. It declares only one dependency on the latest version of the dependee project, and it contains only one class, <tt>depending.Main</tt>, which does 2 things:
+<ul>
+  <li>gets the version of the standalone project by calling <tt>standalone.Main.getVersion()</tt></li>
+  <li>transforms a string by calling <tt>standalone.Main.capitalizeWords(str)</tt></li>
+</ul>
+Take a look at the <tt>ivy.xml</tt> file:
+<pre>
+&lt;ivy-module version="1.0"&gt;<br class="xooki-br"/>    &lt;info organisation="org.apache" module="depender"/&gt;<br class="xooki-br"/>    &lt;dependencies&gt;<br class="xooki-br"/>        &lt;dependency name="dependee" rev="latest.integration" /&gt;<br class="xooki-br"/>    &lt;/dependencies&gt;<br class="xooki-br"/>&lt;/ivy-module&gt;
+</pre>
+
+<h1>settings</h1>
+The Ivy settings are defined in two files located in the settings directory:
+<ul>
+  <li><tt>ivysettings.properties</tt>: a property file</li>
+  <li><tt>ivysettings.xml</tt>: the file containing the settings</li>
+</ul>
+
+Let's have a look at the <tt>ivysettings.xml</tt> file:
+<pre>
+&lt;ivysettings&gt;<br class="xooki-br"/>	&lt;properties file="${ivy.settings.dir}/ivysettings.properties"/&gt;<br class="xooki-br"/>	&lt;settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="libraries"/&gt;<br class="xooki-br"/>	&lt;resolvers&gt;<br class="xooki-br"/>		&lt;filesystem name="projects"&gt;<br class="xooki-br"/>			&lt;artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" /&gt;<br class="xooki-br"/>			&lt;ivy pattern="${repository.dir}/[module]-[revision].xml" /&gt;<br class="xooki-br"/>		&lt;/filesystem&gt;<br class="xooki-br"/>		&lt;ibiblio name="libraries" m2compatible="true" usepoms="false" /&gt;<br class="xooki-br"/>	&lt;/resolvers&gt;<br class="xooki-br"/>	&lt;modules&gt;<br class="xooki-br"/>		&lt;module organisation="org.apache" name="dependee" resolver="projects"/&gt;<br class="xooki-br"/>	&lt;/modules&gt;<br class="xooki-br"/>&lt;/ivysettings&gt;
+</pre>
+The file contains four main tags: properties, settings, resolvers and modules.<br class="xooki-br"/><h2>properties</h2>
+This tag loads some properties for the Ivy process, just like Ant does.<br class="xooki-br"/><h2>settings</h2>
+This tag initializes some parameters for the Ivy process. In this case, the directory that Ivy will use to cache artifacts will be in a sub directory called ivy-cache of the directory containing the <tt>ivysettings.xml</tt> file itself. <br class="xooki-br"/>The second parameter, tells Ivy to use a resolver named "libraries" as its default resolver. More information can be found in the <a href="../settings.html">settings reference documentation</a>.<br class="xooki-br"/><h2>resolvers</h2>
+This tag defines the resolvers to use. Here we have two resolvers defined: "projects" and "libraries".<br class="xooki-br"/>The filesystem resolver called "projects" is able to resolve the internal dependencies by locating them on the local filesystem. <br class="xooki-br"/>The ibiblio resolver called "libraries" is able to find dependencies on the maven 2 repository, but doesn't use maven poms.<br class="xooki-br"/><h2>modules</h2>
+The modules tag allows you to configure which resolver should be used for which module. Here the setting tells Ivy to use the "projects" resolver for all modules having an organisation of <tt>org.apache</tt> and module name of <tt>dependee</tt>. This actually corresponds to only one module, but a regular expression could be used, or many other types of expressions (like glob expressions).<br class="xooki-br"/><br class="xooki-br"/>All other modules (i.e. all modules but org.apache#dependee), will use the default resolver ("libraries").<br class="xooki-br"/><h1>walkthrough</h1>
+<div class="step">
+<h2>step 1: preparation</h2>
+Open a DOS or shell window, and go to the <tt>src/example/dependence</tt> directory.
+</div>
+<div class="step">
+<h2>step 2: clean directory tree</h2>
+On the prompt type: <tt>ant</tt>
+This will clean up the entire project directory tree. You can do this each time you want to clean up this example.
+</div>
+<div class="step">
+<h2>step 3: publication of dependee project</h2>
+Go to <tt>dependee</tt> directory  and publish the project
+<div class="shell"><pre>
+[ivy@apache:/ivy/dependence/dependee]$ ant publish
+Buildfile: /ivy/dependence/dependee/build.xml
+
+resolve:
+[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
+[ivy:retrieve] :: loading settings :: file = /ivy/dependence/settings/ivysettings.xml
+[ivy:retrieve] DEPRECATED: 'defaultCache' is deprecated, use 'caches[@defaultCacheDir]' instead (file://ivy/dependence/settings/ivysettings.xml)
+[ivy:retrieve] :: resolving dependencies :: org.apache#dependee;working@apache
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	found commons-lang#commons-lang;2.0 in libraries
+[ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.0/commons-lang-2.0.jar ...
+[ivy:retrieve] ...................................................................................................................................................................................................................................................................................................................................
+[ivy:retrieve]  (165kB)
+[ivy:retrieve] .. (0kB)
+[ivy:retrieve] 	[SUCCESSFUL ] commons-lang#commons-lang;2.0!commons-lang.jar (3260ms)
+[ivy:retrieve] :: resolution report :: resolve 530ms :: artifacts dl 3260ms
+	---------------------------------------------------------------------
+	|                  |            modules            ||   artifacts   |
+	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+	---------------------------------------------------------------------
+	|      default     |   1   |   1   |   0   |   0   ||   1   |   1   |
+	---------------------------------------------------------------------
+[ivy:retrieve] :: retrieving :: org.apache#dependee
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	1 artifacts copied, 0 already retrieved (165kB/31ms)
+
+compile:
+    [mkdir] Created dir: /ivy/dependence/dependee/build/classes
+    [javac] /ivy/dependence/dependee/build.xml:60: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+    [javac] Compiling 1 source file to /ivy/dependence/dependee/build/classes
+
+jar:
+[propertyfile] Creating new property file: /ivy/dependence/dependee/build/classes/version.properties
+      [jar] Building jar: /ivy/dependence/dependee/build/dependee.jar
+
+publish:
+[ivy:publish] :: delivering :: org.apache#dependee;working@apache :: 1 :: release :: Thu Sep 23 23:15:49 CEST 2010
+[ivy:publish] 	delivering ivy file to /ivy/dependence/dependee/build/ivy.xml
+[ivy:publish] :: publishing :: org.apache#dependee
+[ivy:publish] 	published dependee to /ivy/dependence/settings/repository/dependee-1.jar
+[ivy:publish] 	published ivy to /ivy/dependence/settings/repository/dependee-1.xml
+     [echo] project dependee released with version 1
+
+BUILD SUCCESSFUL
+Total time: 6 seconds
+
+</pre></div>
+What we see here:
+<ul>
+  <li>the project depends on 1 library (1 artifact)</li>
+  <li>the library was not in the Ivy cache and so was downloaded (1 downloaded)</li>
+  <li>the project has been released under version number 1</li>
+</ul>
+</div>
+As you can see, the call to the publish task has resulted in two main things:
+<ul>
+<li>the delivery of a resolved ivy file to <tt>build/ivy.xml</tt>.</li>
+This has been done because by default, the publish task not only publishes artifacts, but also its ivy file. So it has looked to the path where the ivy file to publish should be, using the artifactspattern: <tt>${build.dir}/[artifact].[ext]</tt>. For an ivy file, this resolves to <tt>build/ivy.xml</tt>. Because this file does not exist, it automatically makes a call to the deliver task which delivers a resolved ivy file to this destination.<br class="xooki-br"/>
+<li>the publication of artifact 'dependee' and its resolved ivy file to the repository.</li>
+Both are just copies of the files found in the current project, or more precisely, those in the <tt>build</tt> directory. This is because the artifactspattern has been set to <tt>${build.dir}/[artifact].[ext]</tt>, so the dependee artifact is found at <tt>build/dependee.jar</tt> and the ivy file in <tt>build/ivy.xml</tt>. And because we have asked the publish task to publish them using the "projects" resolver, these files are copied to <tt>repository\dependee-1.jar</tt> and to <tt>repository\dependee-1.xml</tt>, respecting the artifact and ivy patterns of our settings (see above).
+</ul>
+
+<div class="step">
+<h2>step 4: running the depender project</h2>
+Go to directory depender and run <tt>ant</tt>
+<div class="shell"><pre>
+[ivy@apache:/ivy/dependence/depender]$ ant 
+Buildfile: /ivy/dependence/depender/build.xml
+
+clean:
+
+resolve:
+[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
+[ivy:retrieve] :: loading settings :: file = /ivy/dependence/settings/ivysettings.xml
+[ivy:retrieve] DEPRECATED: 'defaultCache' is deprecated, use 'caches[@defaultCacheDir]' instead (file://ivy/dependence/settings/ivysettings.xml)
+[ivy:retrieve] :: resolving dependencies :: org.apache#depender;working@apache
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	found org.apache#dependee;1 in projects
+[ivy:retrieve] 	[1] org.apache#dependee;latest.integration
+[ivy:retrieve] 	found commons-lang#commons-lang;2.0 in libraries
+[ivy:retrieve] downloading /ivy/dependence/settings/repository/dependee-1.jar ...
+[ivy:retrieve] .. (1kB)
+[ivy:retrieve] .. (0kB)
+[ivy:retrieve] 	[SUCCESSFUL ] org.apache#dependee;1!dependee.jar (16ms)
+[ivy:retrieve] :: resolution report :: resolve 343ms :: artifacts dl 47ms
+	---------------------------------------------------------------------
+	|                  |            modules            ||   artifacts   |
+	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+	---------------------------------------------------------------------
+	|      default     |   2   |   1   |   1   |   0   ||   2   |   1   |
+	---------------------------------------------------------------------
+[ivy:retrieve] :: retrieving :: org.apache#depender
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	2 artifacts copied, 0 already retrieved (167kB/47ms)
+
+compile:
+    [mkdir] Created dir: /ivy/dependence/depender/build/classes
+    [javac] /ivy/dependence/depender/build.xml:71: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+    [javac] Compiling 1 source file to /ivy/dependence/depender/build/classes
+
+run:
+     [java] you are using version 1 of class standalone.Main
+     [java] standard message : i am depending.Main and standalone.Main will do the job for me
+     [java]     [standalone.Main] capitalizing string "i am depending.Main and standalone.Main will do the job for me" using org.apache.commons.lang.WordUtils
+     [java] capitalized message : I Am Depending.main And Standalone.main Will Do The Job For Me
+
+BUILD SUCCESSFUL
+Total time: 3 seconds
+
+</pre></div>
+What we see here:
+<ul>
+  <li>the project depends on 2 libraries (2 artifacts)</li>
+  <li>one of the libraries was in the cache because there was only 1 download (1 downloaded)</li>
+  <li>Ivy retrieved version 1 of the project "dependee". The call to <tt>standalone.Main.getVersion()</tt> has returned 1. If you look in the <tt>depender/lib</tt> directory, you should see <tt>dependee-1.jar</tt> which is the version 1 artifact of the project "dependee"</li>
+  <li>the call to <tt>standalone.Main.capitalizeWords(str)</tt> succeed, which means that the required library was in the classpath. If you look at the <tt>lib</tt> directory, you will see that the library <tt>commons-lang-2.0.jar</tt> was also retrieved. This library was declared as a dependency of the "dependee" project, so Ivy retrieves it (transitively) along with the dependee artifact.</li>
+</ul>
+</div>
+<div class="step">
+<h2>step 5: new version of dependee project</h2>
+Like we did before in step 3, publish the dependee project again. This will result in a new version of the project being published.
+<div class="shell"><pre>
+[ivy@apache:/ivy/dependence/dependee]$ ant publish
+Buildfile: /ivy/dependence/dependee/build.xml
+
+resolve:
+[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
+[ivy:retrieve] :: loading settings :: file = /ivy/dependence/settings/ivysettings.xml
+[ivy:retrieve] DEPRECATED: 'defaultCache' is deprecated, use 'caches[@defaultCacheDir]' instead (file://ivy/dependence/settings/ivysettings.xml)
+[ivy:retrieve] :: resolving dependencies :: org.apache#dependee;working@apache
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	found commons-lang#commons-lang;2.0 in libraries
+[ivy:retrieve] :: resolution report :: resolve 109ms :: artifacts dl 0ms
+	---------------------------------------------------------------------
+	|                  |            modules            ||   artifacts   |
+	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+	---------------------------------------------------------------------
+	|      default     |   1   |   0   |   0   |   0   ||   1   |   0   |
+	---------------------------------------------------------------------
+[ivy:retrieve] :: retrieving :: org.apache#dependee
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	0 artifacts copied, 1 already retrieved (0kB/0ms)
+
+compile:
+    [javac] /ivy/dependence/dependee/build.xml:60: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+
+jar:
+[propertyfile] Updating property file: /ivy/dependence/dependee/build/classes/version.properties
+      [jar] Building jar: /ivy/dependence/dependee/build/dependee.jar
+
+publish:
+   [delete] Deleting: /ivy/dependence/dependee/build/ivy.xml
+[ivy:publish] :: delivering :: org.apache#dependee;working@apache :: 2 :: release :: Thu Sep 23 23:15:56 CEST 2010
+[ivy:publish] 	delivering ivy file to /ivy/dependence/dependee/build/ivy.xml
+[ivy:publish] :: publishing :: org.apache#dependee
+[ivy:publish] 	published dependee to /ivy/dependence/settings/repository/dependee-2.jar
+[ivy:publish] 	published ivy to /ivy/dependence/settings/repository/dependee-2.xml
+     [echo] project dependee released with version 2
+
+BUILD SUCCESSFUL
+Total time: 1 second
+
+</pre></div>
+Now if you look in your repository folder, you will find 2 versions of the dependee project.<br class="xooki-br"/>Let's look at it:
+<div class="shell"><pre>I:\dependee>dir ..\settings\repository /w<br class="xooki-br"/><br class="xooki-br"/>[.]                [..]               dependee-1.jar   dependee-1.xml   dependee-2.jar   dependee-2.xml<br class="xooki-br"/><br class="xooki-br"/>I:\dependee></pre></div>
+</div>
+OK, now our repository contains two versions of the project <b>dependee</b>, so other projects can refer to either version.
+<div class="step">
+<h2>step 6: get the new version in <em>depender</em> project</h2>
+What should we expect if we run the depender project again? It should: 
+<ul>
+  <li>retrieve version 2 as the latest.integration version of the dependee project</li>
+  <li>display version 2 of dependee project</li>
+</ul>
+Let's try it!!
+<div class="shell"><pre>
+[ivy@apache:/ivy/dependence/depender]$ ant 
+Buildfile: /ivy/dependence/depender/build.xml
+
+clean:
+
+resolve:
+[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
+[ivy:retrieve] :: loading settings :: file = /ivy/dependence/settings/ivysettings.xml
+[ivy:retrieve] DEPRECATED: 'defaultCache' is deprecated, use 'caches[@defaultCacheDir]' instead (file://ivy/dependence/settings/ivysettings.xml)
+[ivy:retrieve] :: resolving dependencies :: org.apache#depender;working@apache
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	found org.apache#dependee;1 in projects
+[ivy:retrieve] 	[1] org.apache#dependee;latest.integration
+[ivy:retrieve] 	found commons-lang#commons-lang;2.0 in libraries
+[ivy:retrieve] :: resolution report :: resolve 94ms :: artifacts dl 15ms
+	---------------------------------------------------------------------
+	|                  |            modules            ||   artifacts   |
+	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+	---------------------------------------------------------------------
+	|      default     |   2   |   0   |   0   |   0   ||   2   |   0   |
+	---------------------------------------------------------------------
+[ivy:retrieve] :: retrieving :: org.apache#depender
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	2 artifacts copied, 0 already retrieved (167kB/31ms)
+
+compile:
+    [mkdir] Created dir: /ivy/dependence/depender/build/classes
+    [javac] /ivy/dependence/depender/build.xml:71: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+    [javac] Compiling 1 source file to /ivy/dependence/depender/build/classes
+
+run:
+     [java] you are using version 1 of class standalone.Main
+     [java] standard message : i am depending.Main and standalone.Main will do the job for me
+     [java]     [standalone.Main] capitalizing string "i am depending.Main and standalone.Main will do the job for me" using org.apache.commons.lang.WordUtils
+     [java] capitalized message : I Am Depending.main And Standalone.main Will Do The Job For Me
+
+BUILD SUCCESSFUL
+Total time: 2 seconds
+
+</pre></div>
+OK, we got what we expected as the <tt>run</tt> target shows that we are using version 2 of the main class of the dependee project. If we take a look at the resolve target results, we see that one artifact has been downloaded to the ivy cache. In fact, this file is the same version 2 of the dependee project that is in the repository, but now all future retrievals will pull it from your ivy-cache directory.
+</div>
+
+	
+ 		</div><!-- main -->
+		</td>
+	</tr>
+</table>
+
+<table id="footer-menu" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td align="center" valign="middle">
+		<div class="primary-links">:: 
+			<a href="../index.html">Home</a> ::
+			<a href="../download.html">Download</a> ::
+			<a href="../history/latest-milestone/index.html">Documentation</a> ::
+			<a href="../get-involved.html">Get Involved</a> ::
+			<a href="../search.html">Search</a> ::
+		</div>
+		</td>
+	</tr>
+</table>
+
+
+
+<div id="footer-message"></div>
+
+
+</div><!-- body -->
+</body>
+</html>

Added: ant/ivy/site/target/history/2.2.0/tutorial/dual.html
URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/tutorial/dual.html?rev=1005260&view=auto
==============================================================================
--- ant/ivy/site/target/history/2.2.0/tutorial/dual.html (added)
+++ ant/ivy/site/target/history/2.2.0/tutorial/dual.html Wed Oct  6 21:25:29 2010
@@ -0,0 +1,223 @@
+<!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>
+	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+	<script type="text/javascript">var xookiConfig = {level: 1};</script>	
+	
+
+<title>Dual Resolver | Apache Ivy</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" type="text/css" href="../style/style.css" />
+  <script src="../js/jquery.pack.js" type="text/javascript"></script>
+  <script src="../js/jquery.treeview.js" type="text/javascript"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+  </script>
+
+<script language="javascript" type="text/javascript">xooki = {u: function(url) {return "../xooki/"+url;}};</script>
+</head>
+<body>
+
+<div id="body">
+<table id="header" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td id="home" width="30%"><a href="http://ant.apache.org/"
+			title="Apache Ant"><img src="../images/ant-group-logo.gif" alt="Apache Ant"
+			border="0" /></a></td>
+
+		<td class="product" width="70%" align="right" valign="middle"><img
+			src="../images/logo.png" alt="ivy" border="0" /></td>
+	</tr>
+</table>
+
+<table id="top-menu" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td>
+
+        <div style="float:right;margin: 0 10px;">
+        <!-- Google CSE Search Box Begins -->
+  <form id="searchbox_014292259695392975429:5y6qypnrni8" action="http://ant.apache.org/ivy/search.html">
+    <input type="hidden" name="cx" value="014292259695392975429:5y6qypnrni8" />
+    <input type="hidden" name="cof" value="FORID:11" />
+    <input name="q" type="text" size="30" />
+    <input type="submit" name="sa" value="Search" />
+  </form>
+  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014292259695392975429%3A5y6qypnrni8"></script>
+<!-- Google CSE Search Box Ends -->
+        </div>
+
+		<div id="navcontainer">
+		<a href="http://ant.apache.org/">Apache Ant</a> &gt; <a href="http://ant.apache.org/ivy/">Ivy</a> &gt; <a href="http://ant.apache.org/ivy/history.html">History</a> &gt; <span class="breadCrumb"><a href="../index.html" >Documentation (2.2.0)</a> &gt; <a href="../tutorial.html" >Tutorials</a> &gt; <a href="../tutorial/dual.html" class="current">Dual Resolver</a></span>
+		</div>
+		</td>
+	</tr>
+
+</table>
+
+<table id="content" border="0" cellpadding="0" cellspacing="0"
+	width="100%">
+	<tr>
+		<td id="sidebar-left">
+		<div class="block block-book" id="block-book-0">
+		<h2>Ivy</h2>
+
+		<div class="content"><ul id="treemenu" class="treeview"><li id="xooki-index" class="submenu"><a href="../index.html" >Documentation (2.2.0)</a><ul class="open"><li id="xooki-release-notes"><a href="../release-notes.html" >Release Notes</a></li><li id="xooki-tutorial" class="submenu"><a href="../tutorial.html" >Tutorials</a><ul class="open"><li id="xooki-tutorial/start"><a href="../tutorial/start.html" >Quick Start</a></li><li id="xooki-tutorial/defaultconf"><a href="../tutorial/defaultconf.html" >Adjusting default settings</a></li><li id="xooki-tutorial/multiple"><a href="../tutorial/multiple.html" >Multiple Resolvers</a></li><li id="xooki-tutorial/dual"><a href="../tutorial/dual.html" class="current">Dual Resolver</a></li><li id="xooki-tutorial/dependence"><a href="../tutorial/dependence.html" >Project dependencies</a></li><li id="xooki-tutorial/multiproject"><a href="../tutorial/multiproject.html" >Using Ivy in multiple projects environment</a></li><li id="xooki-tutorial
 /conf"><a href="../tutorial/conf.html" >Using Ivy Module Configurations</a></li><li id="xooki-tutorial/build-repository" class="submenu"><a href="../tutorial/build-repository.html" >Building a repository</a><ul class="closed"><li id="xooki-tutorial/build-repository/basic"><a href="../tutorial/build-repository/basic.html" >Basic repository copy</a></li><li id="xooki-tutorial/build-repository/advanced"><a href="../tutorial/build-repository/advanced.html" >Using namespaces</a></li></ul></li><li id="xooki-moreexamples"><a href="../moreexamples.html" >More examples</a></li></ul></li><li id="xooki-reference" class="submenu"><a href="../reference.html" >Reference</a><ul class="closed"><li id="xooki-intro" class="submenu">Introduction<ul class="closed"><li id="xooki-terminology"><a href="../terminology.html" >Terminology</a></li><li id="xooki-concept"><a href="../concept.html" >Main Concepts</a></li><li id="xooki-textual"><a href="../textual.html" >Text Conventions</a></li><li id="x
 ooki-principle"><a href="../principle.html" >How does it work ?</a></li><li id="xooki-bestpractices"><a href="../bestpractices.html" >Best practices</a></li><li id="xooki-install"><a href="../install.html" >Installation</a></li></ul></li><li id="xooki-settings" class="submenu"><a href="../settings.html" >Settings Files</a><ul class="closed"><li id="xooki-settings/property"><a href="../settings/property.html" >property</a></li><li id="xooki-settings/properties"><a href="../settings/properties.html" >properties</a></li><li id="xooki-settings/settings"><a href="../settings/settings.html" >settings</a></li><li id="xooki-settings/include"><a href="../settings/include.html" >include</a></li><li id="xooki-settings/classpath"><a href="../settings/classpath.html" >classpath</a></li><li id="xooki-settings/typedef"><a href="../settings/typedef.html" >typedef</a></li><li id="xooki-settings/credentials"><a href="../settings/credentials.html" >credentials</a></li><li id="xooki-settings/si
 gners"><a href="../settings/signers.html" >signers</a></li><li id="xooki-settings/lock-strategies"><a href="../settings/lock-strategies.html" >lock-strategies</a></li><li id="xooki-settings/caches" class="submenu"><a href="../settings/caches.html" >caches</a><ul class="closed"><li id="xooki-settings/caches/cache" class="submenu"><a href="../settings/caches/cache.html" >cache</a><ul class="closed"><li id="xooki-settings/caches/ttl"><a href="../settings/caches/ttl.html" >ttl</a></li></ul></li></ul></li><li id="xooki-settings/latest-strategies"><a href="../settings/latest-strategies.html" >latest-strategies</a></li><li id="xooki-settings/parsers"><a href="../settings/parsers.html" >parsers</a></li><li id="xooki-settings/namespaces" class="submenu"><a href="../settings/namespaces.html" >namespaces</a><ul class="closed"><li id="xooki-settings/namespace" class="submenu"><a href="../settings/namespace.html" >namespace</a><ul class="closed"><li id="xooki-settings/namespace/rule" cla
 ss="submenu"><a href="../settings/namespace/rule.html" >rule</a><ul class="closed"><li id="xooki-settings/namespace/fromtosystem" class="submenu"><a href="../settings/namespace/fromtosystem.html" >fromsystem / tosystem</a><ul class="closed"><li id="xooki-settings/namespace/src"><a href="../settings/namespace/src.html" >src</a></li><li id="xooki-settings/namespace/dest"><a href="../settings/namespace/dest.html" >dest</a></li></ul></li></ul></li></ul></li></ul></li><li id="xooki-settings/macrodef" class="submenu"><a href="../settings/macrodef.html" >macrodef</a><ul class="closed"><li id="xooki-settings/macrodef/attribute"><a href="../settings/macrodef/attribute.html" >attribute</a></li></ul></li><li id="xooki-settings/resolvers" class="submenu"><a href="../settings/resolvers.html" >resolvers</a><ul class="closed"><li id="xooki-resolver/ivyrep"><a href="../resolver/ivyrep.html" >IvyRep Resolver</a></li><li id="xooki-resolver/ibiblio"><a href="../resolver/ibiblio.html" >IBiblio 
 Resolver</a></li><li id="xooki-resolver/packager"><a href="../resolver/packager.html" >Packager resolver</a></li><li id="xooki-resolver/filesystem"><a href="../resolver/filesystem.html" >File System resolver</a></li><li id="xooki-resolver/url"><a href="../resolver/url.html" >Url Resolver</a></li><li id="xooki-resolver/chain"><a href="../resolver/chain.html" >Chain Resolver</a></li><li id="xooki-resolver/dual"><a href="../resolver/dual.html" >Dual resolver</a></li><li id="xooki-resolver/sftp"><a href="../resolver/sftp.html" >sftp resolver</a></li><li id="xooki-resolver/ssh"><a href="../resolver/ssh.html" >ssh resolver</a></li><li id="xooki-resolver/vfs"><a href="../resolver/vfs.html" >vfs</a></li></ul></li><li id="xooki-settings/conflict-managers"><a href="../settings/conflict-managers.html" >conflict-managers</a></li><li id="xooki-settings/modules" class="submenu"><a href="../settings/modules.html" >modules</a><ul class="closed"><li id="xooki-settings/module"><a href="../set
 tings/module.html" >module</a></li></ul></li><li id="xooki-settings/outputters"><a href="../settings/outputters.html" >outputters</a></li><li id="xooki-settings/statuses" class="submenu"><a href="../settings/statuses.html" >statuses</a><ul class="closed"><li id="xooki-settings/status"><a href="../settings/status.html" >status</a></li></ul></li><li id="xooki-settings/triggers"><a href="../settings/triggers.html" >triggers</a></li><li id="xooki-settings/version-matchers"><a href="../settings/version-matchers.html" >version-matchers</a></li></ul></li><li id="xooki-ivyfile" class="submenu"><a href="../ivyfile.html" >Ivy Files</a><ul class="closed"><li id="xooki-ivyfile/info" class="submenu"><a href="../ivyfile/info.html" >info</a><ul class="closed"><li id="xooki-ivyfile/extends"><a href="../ivyfile/extends.html" >extends</a></li><li id="xooki-ivyfile/license"><a href="../ivyfile/license.html" >license</a></li><li id="xooki-ivyfile/ivyauthor"><a href="../ivyfile/ivyauthor.html" >
 ivyauthor</a></li><li id="xooki-ivyfile/repository"><a href="../ivyfile/repository.html" >repository</a></li><li id="xooki-ivyfile/description"><a href="../ivyfile/description.html" >description</a></li></ul></li><li id="xooki-ivyfile/configurations" class="submenu"><a href="../ivyfile/configurations.html" >configurations</a><ul class="closed"><li id="xooki-ivyfile/conf"><a href="../ivyfile/conf.html" >conf</a></li><li id="xooki-ivyfile/include"><a href="../ivyfile/include.html" >include</a></li></ul></li><li id="xooki-ivyfile/publications" class="submenu"><a href="../ivyfile/publications.html" >publications</a><ul class="closed"><li id="xooki-ivyfile/artifact" class="submenu"><a href="../ivyfile/artifact.html" >artifact</a><ul class="closed"><li id="xooki-ivyfile/artifact-conf"><a href="../ivyfile/artifact-conf.html" >conf</a></li></ul></li></ul></li><li id="xooki-ivyfile/dependencies" class="submenu"><a href="../ivyfile/dependencies.html" >dependencies</a><ul class="closed
 "><li id="xooki-ivyfile/dependency" class="submenu"><a href="../ivyfile/dependency.html" >dependency</a><ul class="closed"><li id="xooki-ivyfile/dependency-conf" class="submenu"><a href="../ivyfile/dependency-conf.html" >conf</a><ul class="closed"><li id="xooki-ivyfile/mapped"><a href="../ivyfile/mapped.html" >mapped</a></li></ul></li><li id="xooki-ivyfile/dependency-artifact" class="submenu"><a href="../ivyfile/dependency-artifact.html" >artifact</a><ul class="closed"><li id="xooki-ivyfile/dependency-artifact-conf"><a href="../ivyfile/dependency-artifact-conf.html" >conf</a></li></ul></li><li id="xooki-ivyfile/artifact-exclude" class="submenu"><a href="../ivyfile/artifact-exclude.html" >exclude</a><ul class="closed"><li id="xooki-ivyfile/artifact-exclude-conf"><a href="../ivyfile/artifact-exclude-conf.html" >conf</a></li></ul></li><li id="xooki-ivyfile/dependency-include" class="submenu"><a href="../ivyfile/dependency-include.html" >include</a><ul class="closed"><li id="xoo
 ki-ivyfile/dependency-include-conf"><a href="../ivyfile/dependency-include-conf.html" >conf</a></li></ul></li></ul></li><li id="xooki-ivyfile/exclude"><a href="../ivyfile/exclude.html" >exclude</a></li><li id="xooki-ivyfile/override"><a href="../ivyfile/override.html" >override</a></li><li id="xooki-ivyfile/conflict"><a href="../ivyfile/conflict.html" >conflict</a></li></ul></li><li id="xooki-ivyfile/conflicts" class="submenu"><a href="../ivyfile/conflicts.html" >conflicts</a><ul class="closed"><li id="xooki-ivyfile/manager"><a href="../ivyfile/manager.html" >manager</a></li></ul></li></ul></li><li id="xooki-ant" class="submenu"><a href="../ant.html" >Ant Tasks</a><ul class="closed"><li id="xooki-use/artifactproperty"><a href="../use/artifactproperty.html" >artifactproperty</a></li><li id="xooki-use/artifactreport"><a href="../use/artifactreport.html" >artifactreport</a></li><li id="xooki-use/buildlist"><a href="../use/buildlist.html" >buildlist</a></li><li id="xooki-use/bui
 ldnumber"><a href="../use/buildnumber.html" >buildnumber</a></li><li id="xooki-use/cachefileset"><a href="../use/cachefileset.html" >cachefileset</a></li><li id="xooki-use/cachepath"><a href="../use/cachepath.html" >cachepath</a></li><li id="xooki-use/cleancache"><a href="../use/cleancache.html" >cleancache</a></li><li id="xooki-use/configure"><a href="../use/configure.html" >configure</a></li><li id="xooki-use/deliver"><a href="../use/deliver.html" >deliver</a></li><li id="xooki-use/findrevision"><a href="../use/findrevision.html" >findrevision</a></li><li id="xooki-use/info"><a href="../use/info.html" >info</a></li><li id="xooki-use/install"><a href="../use/install.html" >install</a></li><li id="xooki-use/listmodules"><a href="../use/listmodules.html" >listmodules</a></li><li id="xooki-use/makepom"><a href="../use/makepom.html" >makepom</a></li><li id="xooki-use/postresolvetask"><a href="../use/postresolvetask.html" >post resolve tasks</a></li><li id="xooki-use/publish"><a
  href="../use/publish.html" >publish</a></li><li id="xooki-use/repreport"><a href="../use/repreport.html" >repreport</a></li><li id="xooki-use/resolve"><a href="../use/resolve.html" >resolve</a></li><li id="xooki-use/retrieve"><a href="../use/retrieve.html" >retrieve</a></li><li id="xooki-use/report" class="submenu"><a href="../use/report.html" >report</a><ul class="closed"><li id="xooki-yed"><a href="../yed.html" >Using yEd to layout report graphs</a></li></ul></li><li id="xooki-use/settings"><a href="../use/settings.html" >settings</a></li><li id="xooki-use/var"><a href="../use/var.html" >var</a></li></ul></li><li id="xooki-standalone"><a href="../standalone.html" >Using standalone</a></li></ul></li><li id="xooki-dev" class="submenu"><a href="../dev.html" >Developer doc</a><ul class="closed"><li id="xooki-extend"><a href="../extend.html" >Extending Ivy</a></li><li id="xooki-dev/makerelease"><a href="../dev/makerelease.html" >Making a release</a></li><li id="xooki-dev/updat
 esite"><a href="../dev/updatesite.html" >Updating the updatesite</a></li></ul></li></ul></li></ul></div>
+
+		<center><iframe src="http://www.apache.org/ads/buttonbar.html"
+                         style="border-width:0;" frameborder="0" scrolling="no"
+                         width="135" height="265"></iframe>
+                </center>
+                
+		</div>
+
+		</td>
+		
+		<td valign="top">
+		<div id="main">
+
+		<h1 class="title">Dual Resolver</h1>
+            <br class="xooki-br"/>In some cases, your module descriptions (i.e. Ivy files, maven poms) are located separately from the module artifacts (i.e. jars). So what can you do about it?<br class="xooki-br"/><br class="xooki-br"/>Use a Dual resolver! And this tutorial will show you how.<br class="xooki-br"/><br class="xooki-br"/><h1>project description</h1>
+Let's have a look at the <tt>src/example/dual</tt> directory in your Ivy distribution.<br class="xooki-br"/>It contains a build file and 3 directories:
+<ul>
+<li>settings: contains the ivy settings file</li>
+<li>repository: a sample repository of ivy files</li>
+<li>project: the project making use of Ivy with dual resolver</li>
+</ul>
+
+<h2>the dual project</h2>
+The project is very simple and contains only one simple class: <tt>example.Hello</tt>
+It depends on two libraries: Apache commons-lang and Apache commons-httpclient.<br class="xooki-br"/><br class="xooki-br"/>Here is the content of the project:
+<ul>
+  <li>build.xml: the ant build file for the project</li>
+  <li>ivy.xml: the ivy project file</li>
+  <li>src\example\Hello.java: the only class of the project</li>
+</ul>
+
+Let's have a look at the <tt>ivy.xml</tt> file:
+<pre>
+&lt;ivy-module version="1.0"&gt;<br class="xooki-br"/>    &lt;info organisation="org.apache" module="hello-ivy"/&gt;<br class="xooki-br"/>    &lt;dependencies&gt;<br class="xooki-br"/>        &lt;dependency org="commons-httpclient" name="commons-httpclient" rev="2.0.2"/&gt;<br class="xooki-br"/>        &lt;dependency org="commons-lang" name="commons-lang" rev="2.0"/&gt;<br class="xooki-br"/>    &lt;/dependencies&gt;<br class="xooki-br"/>&lt;/ivy-module&gt;
+</pre>
+
+As you can see, nothing special here... Indeed, Ivy's philosophy is to keep ivy files independent of the way dependencies are resolved.<br class="xooki-br"/><br class="xooki-br"/><h2>the <b>ivy</b> settings</h2>
+The ivy settings are defined in the <tt>ivysettings.xml</tt> file located in the <tt>settings</tt> directory. Here is what it contains, followed by an explanation.<br class="xooki-br"/>
+<pre>
+&lt;ivysettings&gt;<br class="xooki-br"/>  &lt;settings defaultResolver="dual-example"/&gt;<br class="xooki-br"/>  &lt;resolvers&gt;<br class="xooki-br"/>    &lt;dual name="dual-example"&gt;<br class="xooki-br"/>      &lt;filesystem name="ivys"&gt;<br class="xooki-br"/>        &lt;ivy pattern="${ivy.settings.dir}/../repository/[module]-ivy-[revision].xml" /&gt;<br class="xooki-br"/>      &lt;/filesystem&gt;<br class="xooki-br"/>      &lt;ibiblio name="ibiblio" m2compatible="true" usepoms="false" /&gt;<br class="xooki-br"/>    &lt;/dual&gt;<br class="xooki-br"/>  &lt;/resolvers&gt;<br class="xooki-br"/>&lt;/ivysettings&gt;
+</pre>
+
+Here we configured one resolver, the default one, which is a dual resolver. This dual resolver has two sub resolvers: the first is what is called the "ivy" or "metadata" resolver of the dual resolver, and the second one is what is called the "artifact" resolver. It is important that the dual resolver has exactly two sub resolvers in this given order.<br class="xooki-br"/><br class="xooki-br"/>The metadata resolver, here a filesystem one, is used only to find module descriptors, in this case Ivy files. The setting shown here tells Ivy that all ivy files are in the <tt>repository</tt> directory, named with the pattern: <tt>[module]-ivy-[revision].xml</tt>. If we check the <tt>repository</tt> directory, we can confirm that it contains a file named <tt>commons-httpclient-ivy-2.0.2.xml</tt>. This file matches the pattern, so it will be found by the resolver.<br class="xooki-br"/><br class="xooki-br"/>The artifact resolver is simply an ibiblio one, configured in m2compatible mode 
 to use the maven 2 repository, with <tt>usepoms="false"</tt> to make sure it won't use maven 2 metadata. Note that this isn't necessary, since the second resolver in a dual resolver (the artifact resolver) is never asked to find module metadata.<br class="xooki-br"/><br class="xooki-br"/><h1>walkthrough</h1>
+<div class="step">
+<h2>step 1 : preparation</h2>
+Open a DOS or shell window, and go to the <tt>dual</tt> directory.
+</div>
+<div class="step">
+<h2>step 2 : clean up</h2>
+On the prompt type : <tt>ant</tt><br>
+This will clean up the entire project directory tree (compiled classes and retrieved libs) and the Ivy cache. You can run this each time you want to clean up this example.
+</div>
+<div class="step">
+<h2>step 3 : run the project</h2>
+Go to the project directory. And simply run <tt>ant</tt>.
+<div class="shell"><pre>
+[ivy@apache:/ivy/dual/project]$ ant 
+Buildfile: /ivy/dual/project/build.xml
+
+resolve:
+[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
+[ivy:retrieve] :: loading settings :: file = /ivy/dual/settings/ivysettings.xml
+[ivy:retrieve] :: resolving dependencies :: org.apache#hello-ivy;working@apache
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	found commons-httpclient#commons-httpclient;2.0.2 in ivys
+[ivy:retrieve] 	found commons-logging#commons-logging;1.0.4 in ibiblio
+[ivy:retrieve] 	found commons-lang#commons-lang;2.0 in ibiblio
+[ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar ...
+[ivy:retrieve] .................................................................................................................................................................................................................................................................................................................................................................................................................................................... (220kB)
+[ivy:retrieve] .. (0kB)
+[ivy:retrieve] 	[SUCCESSFUL ] commons-httpclient#commons-httpclient;2.0.2!commons-httpclient.jar (3853ms)
+[ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.0/commons-lang-2.0.jar ...
+[ivy:retrieve] ................................................................................................................................................................................................................................................................................................................................................ (165kB)
+[ivy:retrieve] .. (0kB)
+[ivy:retrieve] 	[SUCCESSFUL ] commons-lang#commons-lang;2.0!commons-lang.jar (1826ms)
+[ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar ...
+[ivy:retrieve] .......................................................................... (37kB)
+[ivy:retrieve] .. (0kB)
+[ivy:retrieve] 	[SUCCESSFUL ] commons-logging#commons-logging;1.0.4!commons-logging.jar (1341ms)
+[ivy:retrieve] :: resolution report :: resolve 1076ms :: artifacts dl 7036ms
+	---------------------------------------------------------------------
+	|                  |            modules            ||   artifacts   |
+	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+	---------------------------------------------------------------------
+	|      default     |   3   |   3   |   1   |   0   ||   3   |   3   |
+	---------------------------------------------------------------------
+[ivy:retrieve] :: retrieving :: org.apache#hello-ivy
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	3 artifacts copied, 0 already retrieved (423kB/47ms)
+
+run:
+    [mkdir] Created dir: /ivy/dual/project/build
+    [javac] /ivy/dual/project/build.xml:58: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+    [javac] Compiling 1 source file to /ivy/dual/project/build
+     [java] standard message : hello ivy !
+     [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
+     [java] head status code with httpclient: 200
+     [java] now check if httpclient dependency on commons-logging has been realized
+     [java] found logging class in classpath: interface org.apache.commons.logging.Log
+
+BUILD SUCCESSFUL
+Total time: 10 seconds
+
+</pre></div></div>
+<br/>
+As you can see, Ivy not only downloaded commons-lang and commons-httpclient, but also commons-logging. Indeed, commons-logging is a dependency of httpclient, as we can see in the httpclient ivy file found in the <tt>repository</tt> directory:
+<pre>
+&lt;ivy-module version="1.0"&gt;<br class="xooki-br"/>    &lt;info <br class="xooki-br"/>        organisation="commons-httpclient"<br class="xooki-br"/>        module="commons-httpclient"<br class="xooki-br"/>        revision="2.0.2"<br class="xooki-br"/>        status="release"<br class="xooki-br"/>        publication="20041010174300"/&gt;<br class="xooki-br"/>    &lt;dependencies&gt;<br class="xooki-br"/>        &lt;dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="default"/&gt;<br class="xooki-br"/>    &lt;/dependencies&gt;<br class="xooki-br"/>&lt;/ivy-module&gt;
+</pre>
+<br/>
+So everything seemed to work. The ivy file was found in the <tt>repository</tt> directory and the artifacts have been downloaded from ibiblio. <br class="xooki-br"/><br class="xooki-br"/>This kind of setup can be useful if you don't want to rely on the maven 2 repository for metadata, or if you want to take full advantage of Ivy files for some or all modules. Combining chain and dual resolvers should give you enough flexibility to meet almost any requirement.<br class="xooki-br"/><br class="xooki-br"/>For full details about the dual resolver, have a look at the corresponding <a href="../resolver/dual.html">reference documentation</a>.<br class="xooki-br"/>	
+ 		</div><!-- main -->
+		</td>
+	</tr>
+</table>
+
+<table id="footer-menu" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td align="center" valign="middle">
+		<div class="primary-links">:: 
+			<a href="../index.html">Home</a> ::
+			<a href="../download.html">Download</a> ::
+			<a href="../history/latest-milestone/index.html">Documentation</a> ::
+			<a href="../get-involved.html">Get Involved</a> ::
+			<a href="../search.html">Search</a> ::
+		</div>
+		</td>
+	</tr>
+</table>
+
+
+
+<div id="footer-message"></div>
+
+
+</div><!-- body -->
+</body>
+</html>

Added: ant/ivy/site/target/history/2.2.0/tutorial/multiple.html
URL: http://svn.apache.org/viewvc/ant/ivy/site/target/history/2.2.0/tutorial/multiple.html?rev=1005260&view=auto
==============================================================================
--- ant/ivy/site/target/history/2.2.0/tutorial/multiple.html (added)
+++ ant/ivy/site/target/history/2.2.0/tutorial/multiple.html Wed Oct  6 21:25:29 2010
@@ -0,0 +1,226 @@
+<!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>
+	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+	<script type="text/javascript">var xookiConfig = {level: 1};</script>	
+	
+
+<title>Multiple Resolvers | Apache Ivy</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" type="text/css" href="../style/style.css" />
+  <script src="../js/jquery.pack.js" type="text/javascript"></script>
+  <script src="../js/jquery.treeview.js" type="text/javascript"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+  </script>
+
+<script language="javascript" type="text/javascript">xooki = {u: function(url) {return "../xooki/"+url;}};</script>
+</head>
+<body>
+
+<div id="body">
+<table id="header" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td id="home" width="30%"><a href="http://ant.apache.org/"
+			title="Apache Ant"><img src="../images/ant-group-logo.gif" alt="Apache Ant"
+			border="0" /></a></td>
+
+		<td class="product" width="70%" align="right" valign="middle"><img
+			src="../images/logo.png" alt="ivy" border="0" /></td>
+	</tr>
+</table>
+
+<table id="top-menu" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td>
+
+        <div style="float:right;margin: 0 10px;">
+        <!-- Google CSE Search Box Begins -->
+  <form id="searchbox_014292259695392975429:5y6qypnrni8" action="http://ant.apache.org/ivy/search.html">
+    <input type="hidden" name="cx" value="014292259695392975429:5y6qypnrni8" />
+    <input type="hidden" name="cof" value="FORID:11" />
+    <input name="q" type="text" size="30" />
+    <input type="submit" name="sa" value="Search" />
+  </form>
+  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014292259695392975429%3A5y6qypnrni8"></script>
+<!-- Google CSE Search Box Ends -->
+        </div>
+
+		<div id="navcontainer">
+		<a href="http://ant.apache.org/">Apache Ant</a> &gt; <a href="http://ant.apache.org/ivy/">Ivy</a> &gt; <a href="http://ant.apache.org/ivy/history.html">History</a> &gt; <span class="breadCrumb"><a href="../index.html" >Documentation (2.2.0)</a> &gt; <a href="../tutorial.html" >Tutorials</a> &gt; <a href="../tutorial/multiple.html" class="current">Multiple Resolvers</a></span>
+		</div>
+		</td>
+	</tr>
+
+</table>
+
+<table id="content" border="0" cellpadding="0" cellspacing="0"
+	width="100%">
+	<tr>
+		<td id="sidebar-left">
+		<div class="block block-book" id="block-book-0">
+		<h2>Ivy</h2>
+
+		<div class="content"><ul id="treemenu" class="treeview"><li id="xooki-index" class="submenu"><a href="../index.html" >Documentation (2.2.0)</a><ul class="open"><li id="xooki-release-notes"><a href="../release-notes.html" >Release Notes</a></li><li id="xooki-tutorial" class="submenu"><a href="../tutorial.html" >Tutorials</a><ul class="open"><li id="xooki-tutorial/start"><a href="../tutorial/start.html" >Quick Start</a></li><li id="xooki-tutorial/defaultconf"><a href="../tutorial/defaultconf.html" >Adjusting default settings</a></li><li id="xooki-tutorial/multiple"><a href="../tutorial/multiple.html" class="current">Multiple Resolvers</a></li><li id="xooki-tutorial/dual"><a href="../tutorial/dual.html" >Dual Resolver</a></li><li id="xooki-tutorial/dependence"><a href="../tutorial/dependence.html" >Project dependencies</a></li><li id="xooki-tutorial/multiproject"><a href="../tutorial/multiproject.html" >Using Ivy in multiple projects environment</a></li><li id="xooki-tutorial
 /conf"><a href="../tutorial/conf.html" >Using Ivy Module Configurations</a></li><li id="xooki-tutorial/build-repository" class="submenu"><a href="../tutorial/build-repository.html" >Building a repository</a><ul class="closed"><li id="xooki-tutorial/build-repository/basic"><a href="../tutorial/build-repository/basic.html" >Basic repository copy</a></li><li id="xooki-tutorial/build-repository/advanced"><a href="../tutorial/build-repository/advanced.html" >Using namespaces</a></li></ul></li><li id="xooki-moreexamples"><a href="../moreexamples.html" >More examples</a></li></ul></li><li id="xooki-reference" class="submenu"><a href="../reference.html" >Reference</a><ul class="closed"><li id="xooki-intro" class="submenu">Introduction<ul class="closed"><li id="xooki-terminology"><a href="../terminology.html" >Terminology</a></li><li id="xooki-concept"><a href="../concept.html" >Main Concepts</a></li><li id="xooki-textual"><a href="../textual.html" >Text Conventions</a></li><li id="x
 ooki-principle"><a href="../principle.html" >How does it work ?</a></li><li id="xooki-bestpractices"><a href="../bestpractices.html" >Best practices</a></li><li id="xooki-install"><a href="../install.html" >Installation</a></li></ul></li><li id="xooki-settings" class="submenu"><a href="../settings.html" >Settings Files</a><ul class="closed"><li id="xooki-settings/property"><a href="../settings/property.html" >property</a></li><li id="xooki-settings/properties"><a href="../settings/properties.html" >properties</a></li><li id="xooki-settings/settings"><a href="../settings/settings.html" >settings</a></li><li id="xooki-settings/include"><a href="../settings/include.html" >include</a></li><li id="xooki-settings/classpath"><a href="../settings/classpath.html" >classpath</a></li><li id="xooki-settings/typedef"><a href="../settings/typedef.html" >typedef</a></li><li id="xooki-settings/credentials"><a href="../settings/credentials.html" >credentials</a></li><li id="xooki-settings/si
 gners"><a href="../settings/signers.html" >signers</a></li><li id="xooki-settings/lock-strategies"><a href="../settings/lock-strategies.html" >lock-strategies</a></li><li id="xooki-settings/caches" class="submenu"><a href="../settings/caches.html" >caches</a><ul class="closed"><li id="xooki-settings/caches/cache" class="submenu"><a href="../settings/caches/cache.html" >cache</a><ul class="closed"><li id="xooki-settings/caches/ttl"><a href="../settings/caches/ttl.html" >ttl</a></li></ul></li></ul></li><li id="xooki-settings/latest-strategies"><a href="../settings/latest-strategies.html" >latest-strategies</a></li><li id="xooki-settings/parsers"><a href="../settings/parsers.html" >parsers</a></li><li id="xooki-settings/namespaces" class="submenu"><a href="../settings/namespaces.html" >namespaces</a><ul class="closed"><li id="xooki-settings/namespace" class="submenu"><a href="../settings/namespace.html" >namespace</a><ul class="closed"><li id="xooki-settings/namespace/rule" cla
 ss="submenu"><a href="../settings/namespace/rule.html" >rule</a><ul class="closed"><li id="xooki-settings/namespace/fromtosystem" class="submenu"><a href="../settings/namespace/fromtosystem.html" >fromsystem / tosystem</a><ul class="closed"><li id="xooki-settings/namespace/src"><a href="../settings/namespace/src.html" >src</a></li><li id="xooki-settings/namespace/dest"><a href="../settings/namespace/dest.html" >dest</a></li></ul></li></ul></li></ul></li></ul></li><li id="xooki-settings/macrodef" class="submenu"><a href="../settings/macrodef.html" >macrodef</a><ul class="closed"><li id="xooki-settings/macrodef/attribute"><a href="../settings/macrodef/attribute.html" >attribute</a></li></ul></li><li id="xooki-settings/resolvers" class="submenu"><a href="../settings/resolvers.html" >resolvers</a><ul class="closed"><li id="xooki-resolver/ivyrep"><a href="../resolver/ivyrep.html" >IvyRep Resolver</a></li><li id="xooki-resolver/ibiblio"><a href="../resolver/ibiblio.html" >IBiblio 
 Resolver</a></li><li id="xooki-resolver/packager"><a href="../resolver/packager.html" >Packager resolver</a></li><li id="xooki-resolver/filesystem"><a href="../resolver/filesystem.html" >File System resolver</a></li><li id="xooki-resolver/url"><a href="../resolver/url.html" >Url Resolver</a></li><li id="xooki-resolver/chain"><a href="../resolver/chain.html" >Chain Resolver</a></li><li id="xooki-resolver/dual"><a href="../resolver/dual.html" >Dual resolver</a></li><li id="xooki-resolver/sftp"><a href="../resolver/sftp.html" >sftp resolver</a></li><li id="xooki-resolver/ssh"><a href="../resolver/ssh.html" >ssh resolver</a></li><li id="xooki-resolver/vfs"><a href="../resolver/vfs.html" >vfs</a></li></ul></li><li id="xooki-settings/conflict-managers"><a href="../settings/conflict-managers.html" >conflict-managers</a></li><li id="xooki-settings/modules" class="submenu"><a href="../settings/modules.html" >modules</a><ul class="closed"><li id="xooki-settings/module"><a href="../set
 tings/module.html" >module</a></li></ul></li><li id="xooki-settings/outputters"><a href="../settings/outputters.html" >outputters</a></li><li id="xooki-settings/statuses" class="submenu"><a href="../settings/statuses.html" >statuses</a><ul class="closed"><li id="xooki-settings/status"><a href="../settings/status.html" >status</a></li></ul></li><li id="xooki-settings/triggers"><a href="../settings/triggers.html" >triggers</a></li><li id="xooki-settings/version-matchers"><a href="../settings/version-matchers.html" >version-matchers</a></li></ul></li><li id="xooki-ivyfile" class="submenu"><a href="../ivyfile.html" >Ivy Files</a><ul class="closed"><li id="xooki-ivyfile/info" class="submenu"><a href="../ivyfile/info.html" >info</a><ul class="closed"><li id="xooki-ivyfile/extends"><a href="../ivyfile/extends.html" >extends</a></li><li id="xooki-ivyfile/license"><a href="../ivyfile/license.html" >license</a></li><li id="xooki-ivyfile/ivyauthor"><a href="../ivyfile/ivyauthor.html" >
 ivyauthor</a></li><li id="xooki-ivyfile/repository"><a href="../ivyfile/repository.html" >repository</a></li><li id="xooki-ivyfile/description"><a href="../ivyfile/description.html" >description</a></li></ul></li><li id="xooki-ivyfile/configurations" class="submenu"><a href="../ivyfile/configurations.html" >configurations</a><ul class="closed"><li id="xooki-ivyfile/conf"><a href="../ivyfile/conf.html" >conf</a></li><li id="xooki-ivyfile/include"><a href="../ivyfile/include.html" >include</a></li></ul></li><li id="xooki-ivyfile/publications" class="submenu"><a href="../ivyfile/publications.html" >publications</a><ul class="closed"><li id="xooki-ivyfile/artifact" class="submenu"><a href="../ivyfile/artifact.html" >artifact</a><ul class="closed"><li id="xooki-ivyfile/artifact-conf"><a href="../ivyfile/artifact-conf.html" >conf</a></li></ul></li></ul></li><li id="xooki-ivyfile/dependencies" class="submenu"><a href="../ivyfile/dependencies.html" >dependencies</a><ul class="closed
 "><li id="xooki-ivyfile/dependency" class="submenu"><a href="../ivyfile/dependency.html" >dependency</a><ul class="closed"><li id="xooki-ivyfile/dependency-conf" class="submenu"><a href="../ivyfile/dependency-conf.html" >conf</a><ul class="closed"><li id="xooki-ivyfile/mapped"><a href="../ivyfile/mapped.html" >mapped</a></li></ul></li><li id="xooki-ivyfile/dependency-artifact" class="submenu"><a href="../ivyfile/dependency-artifact.html" >artifact</a><ul class="closed"><li id="xooki-ivyfile/dependency-artifact-conf"><a href="../ivyfile/dependency-artifact-conf.html" >conf</a></li></ul></li><li id="xooki-ivyfile/artifact-exclude" class="submenu"><a href="../ivyfile/artifact-exclude.html" >exclude</a><ul class="closed"><li id="xooki-ivyfile/artifact-exclude-conf"><a href="../ivyfile/artifact-exclude-conf.html" >conf</a></li></ul></li><li id="xooki-ivyfile/dependency-include" class="submenu"><a href="../ivyfile/dependency-include.html" >include</a><ul class="closed"><li id="xoo
 ki-ivyfile/dependency-include-conf"><a href="../ivyfile/dependency-include-conf.html" >conf</a></li></ul></li></ul></li><li id="xooki-ivyfile/exclude"><a href="../ivyfile/exclude.html" >exclude</a></li><li id="xooki-ivyfile/override"><a href="../ivyfile/override.html" >override</a></li><li id="xooki-ivyfile/conflict"><a href="../ivyfile/conflict.html" >conflict</a></li></ul></li><li id="xooki-ivyfile/conflicts" class="submenu"><a href="../ivyfile/conflicts.html" >conflicts</a><ul class="closed"><li id="xooki-ivyfile/manager"><a href="../ivyfile/manager.html" >manager</a></li></ul></li></ul></li><li id="xooki-ant" class="submenu"><a href="../ant.html" >Ant Tasks</a><ul class="closed"><li id="xooki-use/artifactproperty"><a href="../use/artifactproperty.html" >artifactproperty</a></li><li id="xooki-use/artifactreport"><a href="../use/artifactreport.html" >artifactreport</a></li><li id="xooki-use/buildlist"><a href="../use/buildlist.html" >buildlist</a></li><li id="xooki-use/bui
 ldnumber"><a href="../use/buildnumber.html" >buildnumber</a></li><li id="xooki-use/cachefileset"><a href="../use/cachefileset.html" >cachefileset</a></li><li id="xooki-use/cachepath"><a href="../use/cachepath.html" >cachepath</a></li><li id="xooki-use/cleancache"><a href="../use/cleancache.html" >cleancache</a></li><li id="xooki-use/configure"><a href="../use/configure.html" >configure</a></li><li id="xooki-use/deliver"><a href="../use/deliver.html" >deliver</a></li><li id="xooki-use/findrevision"><a href="../use/findrevision.html" >findrevision</a></li><li id="xooki-use/info"><a href="../use/info.html" >info</a></li><li id="xooki-use/install"><a href="../use/install.html" >install</a></li><li id="xooki-use/listmodules"><a href="../use/listmodules.html" >listmodules</a></li><li id="xooki-use/makepom"><a href="../use/makepom.html" >makepom</a></li><li id="xooki-use/postresolvetask"><a href="../use/postresolvetask.html" >post resolve tasks</a></li><li id="xooki-use/publish"><a
  href="../use/publish.html" >publish</a></li><li id="xooki-use/repreport"><a href="../use/repreport.html" >repreport</a></li><li id="xooki-use/resolve"><a href="../use/resolve.html" >resolve</a></li><li id="xooki-use/retrieve"><a href="../use/retrieve.html" >retrieve</a></li><li id="xooki-use/report" class="submenu"><a href="../use/report.html" >report</a><ul class="closed"><li id="xooki-yed"><a href="../yed.html" >Using yEd to layout report graphs</a></li></ul></li><li id="xooki-use/settings"><a href="../use/settings.html" >settings</a></li><li id="xooki-use/var"><a href="../use/var.html" >var</a></li></ul></li><li id="xooki-standalone"><a href="../standalone.html" >Using standalone</a></li></ul></li><li id="xooki-dev" class="submenu"><a href="../dev.html" >Developer doc</a><ul class="closed"><li id="xooki-extend"><a href="../extend.html" >Extending Ivy</a></li><li id="xooki-dev/makerelease"><a href="../dev/makerelease.html" >Making a release</a></li><li id="xooki-dev/updat
 esite"><a href="../dev/updatesite.html" >Updating the updatesite</a></li></ul></li></ul></li></ul></div>
+
+		<center><iframe src="http://www.apache.org/ads/buttonbar.html"
+                         style="border-width:0;" frameborder="0" scrolling="no"
+                         width="135" height="265"></iframe>
+                </center>
+                
+		</div>
+
+		</td>
+		
+		<td valign="top">
+		<div id="main">
+
+		<h1 class="title">Multiple Resolvers</h1>
+            <br class="xooki-br"/>This tutorial is an example of how modules can be retrieved by multiple resolvers. Using multiple resolvers can be useful in many contexts. For example:
+<ul>
+<li>separating integration builds from releases</li>
+<li>using a public repository for third party modules and a private one for internal modules</li>
+<li>use a repository for storing modules which are not accurate in an unmanaged public repository</li>
+<li>use a local repository to expose builds made on one developer's station</li>
+</ul>
+
+In Ivy, the use of multiple resolvers is supported by a compound resolver called the chain resolver.<br class="xooki-br"/><br class="xooki-br"/>In our example, we will simply show you how to use two resolvers, one on a local repository and one using the maven2 repository.<br class="xooki-br"/><br class="xooki-br"/><h1>project description</h1>
+<h2>the project: chained-resolvers</h2>
+The project is very simple and contains only one simple class: example.Hello.<br class="xooki-br"/><br class="xooki-br"/>It depends on two libraries: Apache's commons-lang and a custom library named test (sources are included in test-1.0jar file). The test library is used by the project to uppercase a string, and commons-lang is used to capitalize the same string.<br class="xooki-br"/><br class="xooki-br"/>Here is the content of the project:
+<ul>
+  <li>build.xml: the ant build file for the project</li>
+  <li>ivy.xml: the Ivy project file</li>
+  <li>src\example\Hello.java: the only class of the project</li>
+</ul>
+Let's have a look at the <b>ivy.xml</b> file:
+<pre>
+&lt;ivy-module version="1.0"&gt;<br class="xooki-br"/>    &lt;info organisation="org.apache" module="chained-resolvers"/&gt;<br class="xooki-br"/>    &lt;dependencies&gt;<br class="xooki-br"/>        &lt;dependency org="commons-lang" name="commons-lang" rev="2.0"/&gt;<br class="xooki-br"/>        &lt;dependency name="test" rev="1.0"/&gt;<br class="xooki-br"/>    &lt;/dependencies&gt;<br class="xooki-br"/>&lt;/ivy-module&gt;
+</pre>
+As we'd expect, the ivy file declares this module to be dependent on the two libraries it uses: 'commons-lang' and 'test'. Note that we didn't specify the org for the dependency 'test'. When we exclude org, Ivy assumes it is in the same org as the declaring module. (i.e. 'org.apache').<br class="xooki-br"/><br class="xooki-br"/><h2>the <b>ivy settings</b></h2>
+The settings are defined in the ivysettings.xml file located in the settings directory of the project. Below are its contents, followed by an explanation of what it's doing.<br class="xooki-br"/>
+<pre>
+&lt;ivysettings&gt;<br class="xooki-br"/>  &lt;settings defaultResolver="chain-example"/&gt;<br class="xooki-br"/>  &lt;resolvers&gt;<br class="xooki-br"/>    &lt;chain name="chain-example"&gt;<br class="xooki-br"/>      &lt;filesystem name="libraries"&gt;<br class="xooki-br"/>        &lt;artifact pattern="${ivy.settings.dir}/repository/[artifact]-[revision].[ext]" /&gt;<br class="xooki-br"/>      &lt;/filesystem&gt;<br class="xooki-br"/>      &lt;ibiblio name="ibiblio" m2compatible="true" /&gt;<br class="xooki-br"/>    &lt;/chain&gt;<br class="xooki-br"/>  &lt;/resolvers&gt;<br class="xooki-br"/>&lt;/ivysettings&gt;
+</pre>
+<h2>the <b>settings</b> tag</h2>
+This tag initializes Ivy with some parameters. Here only one parameter is set, the name of the resolver to use by default.<br class="xooki-br"/><br class="xooki-br"/><h2>the <b>resolvers</b> tag</h2>
+The resolvers section defines the list of resolvers that Ivy will use to locate artifacts. In our example, we have only one resolver named "chain-example", which is unique in that it defines a list (hence a chain) of resolvers.<br class="xooki-br"/>The resolvers in this chain are:
+<ul>
+  <li>libraries : It is a filesystem resolver, so looks at a directory structure to retrieve the artifacts. This one is configured to look in the <tt>repository</tt> sub directory of the directory that contains the <tt>ivysettings.xml</tt> file.</li>
+  <li>ibiblio : It looks in the ibiblio maven repository to retrieve the artifacts.</li>
+</ul>
+
+That's it, we have just configured a chain of resolvers!<br class="xooki-br"/><br class="xooki-br"/><h1>walkthrough</h1>
+<div class="step">
+<h2>step 1: preparation</h2>
+Open a DOS or shell window, and go to the "chained-resolvers" directory.
+</div>
+<div class="step">
+<h2>step 2: clean directory tree</h2>
+On the prompt type: ant<br>
+This will clean up the entire project directory tree and Ivy cache. You can do this each time you want to clean up this example.<br class="xooki-br"/>
+<div class="tip">
+In almost all examples, we provide a clean target as default target. Since most examples use the same Ivy cache, you will clean the whole Ivy cache each time you call this target. <br class="xooki-br"/><br class="xooki-br"/>Cleaning the Ivy cache is something you can do without fear (except performance): it's only a cache, so everything can be (and should be) obtained again from repositories. This may sound strange to those coming from maven 2 land. But remember that in Ivy, the cache is not a local repository and the two are completely isolated.
+</div>
+</div>
+<div class="step">
+<h2>step 3: run the project</h2>
+Go to <tt>chained-resolvers</tt> project directory. And simply run <tt>ant</tt>.<br class="xooki-br"/>
+<div class="shell"><pre>
+[ivy@apache:/ivy/chained-resolvers/chainedresolvers-project]$ ant 
+Buildfile: /ivy/chained-resolvers/chainedresolvers-project/build.xml
+
+resolve:
+[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
+[ivy:retrieve] :: loading settings :: file = /ivy/chained-resolvers/settings/ivysettings.xml
+[ivy:retrieve] :: resolving dependencies :: org.apache#chained-resolvers;working@apache
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	found commons-lang#commons-lang;2.0 in ibiblio
+[ivy:retrieve] 	found org.apache#test;1.0 in libraries
+[ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.0/commons-lang-2.0.jar ...
+[ivy:retrieve] ........................................................................................................................................................................................................................................................................................................................................... (165kB)
+[ivy:retrieve] .. (0kB)
+[ivy:retrieve] 	[SUCCESSFUL ] commons-lang#commons-lang;2.0!commons-lang.jar (2745ms)
+[ivy:retrieve] downloading /ivy/chained-resolvers/settings/repository/test-1.0.jar ...
+[ivy:retrieve] .. (1kB)
+[ivy:retrieve] 	[SUCCESSFUL ] org.apache#test;1.0!test.jar (16ms)
+[ivy:retrieve] :: resolution report :: resolve 4836ms :: artifacts dl 2761ms
+	---------------------------------------------------------------------
+	|                  |            modules            ||   artifacts   |
+	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+	---------------------------------------------------------------------
+	|      default     |   2   |   2   |   1   |   0   ||   2   |   2   |
+	---------------------------------------------------------------------
+[ivy:retrieve] :: retrieving :: org.apache#chained-resolvers
+[ivy:retrieve] 	confs: [default]
+[ivy:retrieve] 	2 artifacts copied, 0 already retrieved (166kB/62ms)
+
+run:
+    [mkdir] Created dir: /ivy/chained-resolvers/chainedresolvers-project/build
+    [javac] /ivy/chained-resolvers/chainedresolvers-project/build.xml:58: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+    [javac] Compiling 1 source file to /ivy/chained-resolvers/chainedresolvers-project/build
+     [java] standard message :example world !
+     [java] capitalized by org.apache.commons.lang.WordUtils : Example World !
+     [java] upperCased by test.StringUtils : EXAMPLE WORLD !
+
+BUILD SUCCESSFUL
+Total time: 10 seconds
+
+</pre></div></div>
+
+We can see in the log of the resolve task, that the two dependencies have been retrieved (2 artifacts) and copied to the Ivy cache directory (2 downloaded). <br class="xooki-br"/><br class="xooki-br"/>Also notice that the 'run' Ant target succeeded in using both commons-lang.jar coming from the ibiblio repository and test.jar coming from the local repository.<br class="xooki-br"/><br class="xooki-br"/><h1>Going further</h1>
+This very simple example helps us see how to set up two resolvers in a chain. The <a href="../resolver/chain.html">chain resolver's reference documentation</a> is available for those who would like to know all the features offered by this resolver.<br class="xooki-br"/><br class="xooki-br"/>Below are a few more interesting things worth knowing about chain resolvers. After reading them, go ahead and try tweaking this example using your new wealth of knowledge!
+<ul>
+<li>a chain is not limited to two nested resolvers, you can use as many as you want</li>
+<li>by setting <tt>returnFirst="true"</tt>, you can have a chain which stops as soon as it has found a result for a given module</li>
+<li>by setting <tt>dual="true"</tt>, the full chain will be used both for module descriptors and artifacts, while setting <tt>dual="false"</tt>, the resolver in the chain which found the module descriptor (if any) is also used for artifacts</li>
+</ul>
+
+	
+ 		</div><!-- main -->
+		</td>
+	</tr>
+</table>
+
+<table id="footer-menu" summary="Navigation elements." border="0"
+	cellpadding="0" cellspacing="0" width="100%">
+	<tr>
+		<td align="center" valign="middle">
+		<div class="primary-links">:: 
+			<a href="../index.html">Home</a> ::
+			<a href="../download.html">Download</a> ::
+			<a href="../history/latest-milestone/index.html">Documentation</a> ::
+			<a href="../get-involved.html">Get Involved</a> ::
+			<a href="../search.html">Search</a> ::
+		</div>
+		</td>
+	</tr>
+</table>
+
+
+
+<div id="footer-message"></div>
+
+
+</div><!-- body -->
+</body>
+</html>