You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by xa...@apache.org on 2007/03/27 09:36:31 UTC

svn commit: r522842 [6/17] - in /incubator/ivy/core/trunk: ./ doc/ doc/doc/ doc/doc/configuration/ doc/doc/configuration/macrodef/ doc/doc/configuration/namespace/ doc/doc/ivyfile/ doc/doc/releasenotes/ doc/doc/resolver/ doc/doc/tutorial/ doc/doc/tutor...

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/conf.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/conf.html?view=diff&rev=522842&r1=522841&r2=522842
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/conf.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/conf.html Tue Mar 27 02:36:03 2007
@@ -1,288 +1,306 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
 <html>
 <head>
 	<script type="text/javascript">var xookiConfig = {level: 2};</script>	
 	<script type="text/javascript" src="../../xooki/xooki.js"></script>
 </head>
 <body>
-	<textarea id="xooki-source">
-This tutorial introduces the use of configuration in ivy files. Ivy configurations is indeed a very important concept. Someone even told me one day that using Ivy without using configurations is like eating a good cheese without touching the glass of Chateau Margaux 1976 you have just aside :-)
-
-More seriously, configurations in ivy can be better understood as views on your module, and you will see how they can be used efficiently here.
-
-Reference documentation on configurations can be found <a href="../../doc/terminology.html">here</a> and <a href="../../doc/ivyfile/configurations.html">here</a>.
-<h1>Introduction</h1>
-Source code available in src/example/configurations/multi-projects.
-We have two projects :
-  - a library that define an api to filter String array and two implementations of this api.
-  - a very small app that use this library.
-  
-The library produces 3 artifacts:
-  - the api jar,
-  - an implementation jar with no external dependency,
-  - an other implementation that needs commons-collection to perform.
-
-The application only need api to compile and can use any of the two implementation at runtime.
-
-<h1>The library project</h1>
-The first project we defined in this tutorial is the filter-framework.
-In order to have a fine grained artifacts publication definition, we defined configurations to map usage other can make of our library.
-<h2>The ivy.xml file</h2>
-
-<div class="ivy-file">
-<code type="xml">
-<ivy-module version="1.3">
-    <info organisation="jayasoft" module="filter-framework"/>
-    <configurations>
-    	<conf name="api"  description="only provide filter framework API"/>
-      <conf name="homemade-impl" extends="api" description="provide a home made implementation of our api"/>
-      <conf name="cc-impl" extends="api" description="provide an implementation that use apache common collection framework"/>
-      <conf name="test" extends="cc-impl" visibility="private" description="for testing our framework"/>
-    </configurations>
-    <publications>
-      <artifact name="filter-api" type="jar"  conf="api" ext="jar"/>
-      <artifact name="filter-hmimpl" type="jar"  conf="homemade-impl" ext="jar"/>
-      <artifact name="filter-ccimpl" type="jar"  conf="cc-impl" ext="jar"/>      
-    </publications>
-    <dependencies>
-        <dependency org="apache" name="commons-collections" rev="3.1" conf="cc-impl->default"/>
-        <dependency org="junit" name="junit" rev="3.8" conf="test->default"/>
-    </dependencies>
-</ivy-module>
-</code> 
-</div>
-<h2>Explanation</h2>
-As you can see we defined 3 public configurations and a private one (defined junit dependency for testing).
-The 2 implementations conf  <b>homemade-impl</b>,  <b>cc-impl</b> extends <b>api</b> configuration so artifacts defined in api will also be required in its extending conf.
-In the publications tag we defined the artifacts we produce (here it's jars) and we affect them a configuration.
-Later when others will use our library they will have a very flexible way to defined what they need.
-
-<h2>See it in action</h2>
-The library project is build using ant. Open a shell in the root directory of the project and type <b>ant</b>.
-<div class="shell"><pre>
-Buildfile: build.xml
-clean:
-resolve:
-:: Ivy 20060123130642 - 20060123130642 :: http://ivy.jayasoft.org/ ::
-no configuration file found, using default...
-:: configuring :: url = jar:file:/C:/dev/ant/apache-ant-1.6.2/lib/ivy-20060123130642.jar!/fr/jayasoft/ivy/conf/ivysettings.xml
-:: resolving dependencies :: [ jayasoft | filter-framework | working@SPIDER ]
-        confs: [api, homemade-impl, cc-impl, test]
-        found [ apache | commons-collections | 3.1 ] in main
-        found [ junit | junit | 3.8 ] in main
-downloading http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-3.1.jar ................(546kB)
-        [SUCCESSFUL ] [ apache | commons-collections | 3.1 ]/commons-collections.jar[jar] (34320ms)
-downloading http://www.ibiblio.org/maven/junit/jars/junit-3.8.jar ........................... (118kB)
-        [SUCCESSFUL ] [ junit | junit | 3.8 ]/junit.jar[jar] (8462ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |        api       |   0   |   0   |   0   |   0   ||   0   |   0   |
-        |   homemade-impl  |   0   |   0   |   0   |   0   ||   0   |   0   |
-        |      cc-impl     |   1   |   1   |   1   |   0   ||   1   |   1   |
-        |       test       |   2   |   2   |   1   |   0   ||   2   |   2   |
-        ---------------------------------------------------------------------
-:: retrieving :: [ jayasoft | filter-framework ]
-        confs: [api, homemade-impl, cc-impl, test]
-        3 artifacts copied, 0 already retrieved
-
-build:
-    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build
-    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib
-    [javac] Compiling 4 source files to D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build
-      [jar] Building jar: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib\filter-api.jar
-      [jar] Building jar: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib\filter-hmimpl.jar
-      [jar] Building jar: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib\filter-ccimpl.jar
-
-test:
-    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build\test-report
-    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build\test-classes
-    [javac] Compiling 3 source files to D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build\test-classes
-    [junit] Running filter.ccimpl.CCFilterTest
-    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.02 sec
-    [junit] Running filter.hmimpl.HMFilterTest
-    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.01 sec
-
-publish:
-:: delivering :: [ jayasoft | filter-framework | working@SPIDER ] :: 1.3 :: release :: Tue Jan 24 10:53:41 CET 2006
-        delivering ivy file to distrib/ivy.xml
-:: publishing :: [ jayasoft | filter-framework | working@SPIDER ]
-        published filter-api to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/jars/filter-api.jar
-        published filter-ccimpl to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/jars/filter-ccimpl.jar
-        published filter-hmimpl to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/jars/filter-hmimpl.jar
-        published ivy to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/ivys/ivy.xml
-     [echo] project filter-framework released with version 1.3
-
-BUILD SUCCESSFUL
-</pre></div>
-The ant's default target is publish. 
-This target use ivy to publish our library binaries in a local repository. 
-As we do not specify any repository path the default one is use. ({home.dir}/.ivy/local/jayasoft/filter-framework/)
-Now we are ready to use our library.
-
-<h1>The application project</h1>
-
-Now that we have shipped our fantastic library, we want to use it!
-The tutorial comes with a sample application called myapp. You will find it in the tutorial folder.
-<h2>The ivy.xml file</h2>
-
-<div class="ivy-file">
-<code type="xml">
-<ivy-module version="1.3">
-    <info organisation="jayasoft" module="myapp"/>
-   
-    <configurations>
-      <conf name="build" visibility="private" description="compilation only need api jar" />
-      <conf name="noexternaljar" description="use only company jar" />
-      <conf name="withexternaljar" description="use company jar and third party jars" />    
-    </configurations>
-    
-    <dependencies>
-        <dependency org="jayasoft" name="filter-framework" rev="latest.integration" conf="build->api; noexternaljar->homemade-impl; withexternaljar->cc-impl"/>
-    </dependencies>
-</ivy-module>
-</code> 
-</div>
-<h2>Explanation</h2>
-We create 3 configurations that define the way we want to use the application.
-The build configuration, (as said before) only need api to compile.
-The other configuration are defined for runtime.
-One configuration will only use "home-made" jars, and the second one will use external jars.
-
-We also defined a dependency on the previous library.
-In the dependency we use configuration mapping to match ours and library configurations.
-You can found more information on configuration mapping <a href="../../doc/ivyfile/configurations.html">here</a>
-<ol>
-  <li><b>build->api</b> : here we tell ivy that our <b>build</b> configuration depends on the api configuration of the dependcy</li>
-  <li><b>noexternaljar->homemade-impl</b> : here we tell ivy that our <b>noexternaljar</b> configuration depends on the <b>homemade-impl</b> configuration of the dependcy.</li>
-  <li><b>withexternaljar->cc-impl</b> : here we tell ivy that our <b>withexternaljar</b> configuration depends on the <b>cc-impl</b> configuration of the dependcy</li>
-</ol>
-Note that we never declares any of the dependency artifacts we need in each configuration: it's the dependency module file which declares the published artifacts and which should be used in each configuration.
-
-In the ant buld.xml file we defined a resolve target as follow:
-
-<code type="xml">
-<target name="resolve" description="--> retreive dependencies with ivy">
-	<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact].[ext]"/>
-</target> 
-</code> 
-
-When we call this target, Ivy will do a resolve using our ivy.xml file in the root folder and will after do retrieve putting all the artifacts in folder for each configuration. Here is how your lib directory should look like after a call to this target:
-<div class="shell"><pre>
- Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib
-
-01/24/2006  11:19 AM    <REP>          build
-01/24/2006  11:19 AM    <REP>          noexternaljar
-01/24/2006  11:19 AM    <REP>          withexternaljar
-               0 fichier(s)                0 octets
-
- Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib\build
-
-01/24/2006  10:53 AM             1,174 filter-api.jar
-               1 fichier(s)            1,174 octets
-
- Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib\noexternaljar
-
-01/24/2006  10:53 AM             1,174 filter-api.jar
-01/24/2006  10:53 AM             1,030 filter-hmimpl.jar
-               2 fichier(s)            2,204 octets
-
- Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib\withexternaljar
-01/24/2006  10:53 AM           559,366 commons-collections.jar
-01/24/2006  10:53 AM             1,174 filter-api.jar
-01/24/2006  10:53 AM             1,626 filter-ccimpl.jar
-               3 fichier(s)          562,166 octets
-</pre></div>
-As you can see for each configuration we have now a set of jars.
-
-Let's try to launch our app.
-
-<h2>See it in action</h2>
-Use ant to run the application.
-Default ant target is run-cc and will launch application using common collection jar.
-<div class="shell"><pre>
-Buildfile: build.xml
-
-resolve:
-:: Ivy 20060123130642 - 20060123130642 :: http://ivy.jayasoft.org/ ::
-no configuration file found, using default...
-:: configuring :: url = jar:file:/C:/dev/ant/apache-ant-1.6.2/lib/ivy-20060123130642.jar!/fr/jayasoft/ivy/conf/ivysettings.xml
-:: resolving dependencies :: [ jayasoft | myapp | working@SPIDER ]
-        confs: [build, noexternaljar, withexternaljar]
-        found [ jayasoft | filter-framework | 1.3 ] in local
-        [1.3] [ jayasoft | filter-framework | latest.integration ]
-        found [ apache | commons-collections | 3.1 ] in default
-downloading D:\users\mm\.ivy\local\jayasoft\filter-framework\1.3\jars\filter-ccimpl.jar .... (1kB)
-        [SUCCESSFUL ] [ jayasoft | filter-framework | 1.3 ]/filter-ccimpl.jar[jar] (0ms)
-downloading D:\users\mm\.ivy\local\jayasoft\filter-framework\1.3\jars\filter-api.jar .... (1kB)
-        [SUCCESSFUL ] [ jayasoft | filter-framework | 1.3 ]/filter-api.jar[jar] (0ms)
-downloading D:\users\mm\.ivy\local\jayasoft\filter-framework\1.3\jars\filter-hmimpl.jar .... (1kB)
-        [SUCCESSFUL ] [ jayasoft | filter-framework | 1.3 ]/filter-hmimpl.jar[jar] (10ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |       build      |   1   |   1   |   1   |   0   ||   1   |   1   |
-        |   noexternaljar  |   1   |   1   |   1   |   0   ||   2   |   2   |
-        |  withexternaljar |   2   |   1   |   1   |   0   ||   3   |   2   |
-        ---------------------------------------------------------------------
-:: retrieving :: [ jayasoft | myapp ]
-        confs: [build, noexternaljar, withexternaljar]
-        6 artifacts copied, 0 already retrieved
-
-build:
-    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\myapp\build
-    [javac] Compiling 1 source file to D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\myapp\build
-
-run-cc:
-     [java] Filtering with:class filter.ccimpl.CCFilter
-     [java] Result :[two, tree]
-</pre></div>
-Launching application with only home made jars is straingforward.
-type ant run-hm
-
-<div class="shell"><pre>
-Buildfile: build.xml
-
-resolve:
-:: Ivy 20060123130642 - 20060123130642 :: http://ivy.jayasoft.org/ ::
-no configuration file found, using default...
-:: configuring :: url = jar:file:/C:/dev/ant/apache-ant-1.6.2/lib/ivy-20060123130642.jar!/fr/jayasoft/ivy/conf/ivysettings.xml
-:: resolving dependencies :: [ jayasoft | myapp | working@SPIDER ]
-        confs: [build, noexternaljar, withexternaljar]
-        found [ jayasoft | filter-framework | 1.3 ] in default
-        [1.3] [ jayasoft | filter-framework | latest.integration ]
-        found [ apache | commons-collections | 3.1 ] in default
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |       build      |   1   |   1   |   0   |   0   ||   1   |   0   |
-        |   noexternaljar  |   1   |   1   |   0   |   0   ||   2   |   0   |
-        |  withexternaljar |   2   |   1   |   0   |   0   ||   3   |   0   |
-        ---------------------------------------------------------------------
-:: retrieving :: [ jayasoft | myapp ]
-        confs: [build, noexternaljar, withexternaljar]
-        0 artifacts copied, 6 already retrieved
-
-build:
-
-run-hm:
-     [java] Filtering with:class filter.hmimpl.HMFilter
-     [java] Result :[two, tree]
-
-BUILD SUCCESSFUL
-</pre></div>
-Nice we got the same result but we can see that implementation class are different.
-
-<h1>Conclusion</h1>
-<b>You should use configuration as often as possible</b>
-Configurations are very important concept in ivy. They allow you to groups artifacts set by meaning.
-When you write ivy file for projects that are supposed to be reused, use configurations to allow people to get only they what they need without having to specify it by hand using artifact tag in dependency section. 
+	<textarea id="xooki-source">
+This tutorial introduces the use of configuration in ivy files. Ivy configurations is indeed a very important concept. Someone even told me one day that using Ivy without using configurations is like eating a good cheese without touching the glass of Chateau Margaux 1976 you have just aside :-)
+
+More seriously, configurations in ivy can be better understood as views on your module, and you will see how they can be used efficiently here.
+
+Reference documentation on configurations can be found <a href="../../doc/terminology.html">here</a> and <a href="../../doc/ivyfile/configurations.html">here</a>.
+<h1>Introduction</h1>
+Source code available in src/example/configurations/multi-projects.
+We have two projects :
+  - a library that define an api to filter String array and two implementations of this api.
+  - a very small app that use this library.
+  
+The library produces 3 artifacts:
+  - the api jar,
+  - an implementation jar with no external dependency,
+  - an other implementation that needs commons-collection to perform.
+
+The application only need api to compile and can use any of the two implementation at runtime.
+
+<h1>The library project</h1>
+The first project we defined in this tutorial is the filter-framework.
+In order to have a fine grained artifacts publication definition, we defined configurations to map usage other can make of our library.
+<h2>The ivy.xml file</h2>
+
+<div class="ivy-file">
+<code type="xml">
+<ivy-module version="1.3">
+    <info organisation="jayasoft" module="filter-framework"/>
+    <configurations>
+    	<conf name="api"  description="only provide filter framework API"/>
+      <conf name="homemade-impl" extends="api" description="provide a home made implementation of our api"/>
+      <conf name="cc-impl" extends="api" description="provide an implementation that use apache common collection framework"/>
+      <conf name="test" extends="cc-impl" visibility="private" description="for testing our framework"/>
+    </configurations>
+    <publications>
+      <artifact name="filter-api" type="jar"  conf="api" ext="jar"/>
+      <artifact name="filter-hmimpl" type="jar"  conf="homemade-impl" ext="jar"/>
+      <artifact name="filter-ccimpl" type="jar"  conf="cc-impl" ext="jar"/>      
+    </publications>
+    <dependencies>
+        <dependency org="apache" name="commons-collections" rev="3.1" conf="cc-impl->default"/>
+        <dependency org="junit" name="junit" rev="3.8" conf="test->default"/>
+    </dependencies>
+</ivy-module>
+</code> 
+</div>
+<h2>Explanation</h2>
+As you can see we defined 3 public configurations and a private one (defined junit dependency for testing).
+The 2 implementations conf  <b>homemade-impl</b>,  <b>cc-impl</b> extends <b>api</b> configuration so artifacts defined in api will also be required in its extending conf.
+In the publications tag we defined the artifacts we produce (here it's jars) and we affect them a configuration.
+Later when others will use our library they will have a very flexible way to defined what they need.
+
+<h2>See it in action</h2>
+The library project is build using ant. Open a shell in the root directory of the project and type <b>ant</b>.
+<div class="shell"><pre>
+Buildfile: build.xml
+clean:
+resolve:
+:: Ivy 20060123130642 - 20060123130642 :: http://ivy.jayasoft.org/ ::
+no configuration file found, using default...
+:: configuring :: url = jar:file:/C:/dev/ant/apache-ant-1.6.2/lib/ivy-20060123130642.jar!/fr/jayasoft/ivy/conf/ivysettings.xml
+:: resolving dependencies :: [ jayasoft | filter-framework | working@SPIDER ]
+        confs: [api, homemade-impl, cc-impl, test]
+        found [ apache | commons-collections | 3.1 ] in main
+        found [ junit | junit | 3.8 ] in main
+downloading http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-3.1.jar ................(546kB)
+        [SUCCESSFUL ] [ apache | commons-collections | 3.1 ]/commons-collections.jar[jar] (34320ms)
+downloading http://www.ibiblio.org/maven/junit/jars/junit-3.8.jar ........................... (118kB)
+        [SUCCESSFUL ] [ junit | junit | 3.8 ]/junit.jar[jar] (8462ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |        api       |   0   |   0   |   0   |   0   ||   0   |   0   |
+        |   homemade-impl  |   0   |   0   |   0   |   0   ||   0   |   0   |
+        |      cc-impl     |   1   |   1   |   1   |   0   ||   1   |   1   |
+        |       test       |   2   |   2   |   1   |   0   ||   2   |   2   |
+        ---------------------------------------------------------------------
+:: retrieving :: [ jayasoft | filter-framework ]
+        confs: [api, homemade-impl, cc-impl, test]
+        3 artifacts copied, 0 already retrieved
+
+build:
+    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build
+    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib
+    [javac] Compiling 4 source files to D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build
+      [jar] Building jar: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib\filter-api.jar
+      [jar] Building jar: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib\filter-hmimpl.jar
+      [jar] Building jar: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\distrib\filter-ccimpl.jar
+
+test:
+    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build\test-report
+    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build\test-classes
+    [javac] Compiling 3 source files to D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\filter-framework\build\test-classes
+    [junit] Running filter.ccimpl.CCFilterTest
+    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.02 sec
+    [junit] Running filter.hmimpl.HMFilterTest
+    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.01 sec
+
+publish:
+:: delivering :: [ jayasoft | filter-framework | working@SPIDER ] :: 1.3 :: release :: Tue Jan 24 10:53:41 CET 2006
+        delivering ivy file to distrib/ivy.xml
+:: publishing :: [ jayasoft | filter-framework | working@SPIDER ]
+        published filter-api to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/jars/filter-api.jar
+        published filter-ccimpl to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/jars/filter-ccimpl.jar
+        published filter-hmimpl to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/jars/filter-hmimpl.jar
+        published ivy to D:\users\mm\.ivy/local/jayasoft/filter-framework/1.3/ivys/ivy.xml
+     [echo] project filter-framework released with version 1.3
+
+BUILD SUCCESSFUL
+</pre></div>
+The ant's default target is publish. 
+This target use ivy to publish our library binaries in a local repository. 
+As we do not specify any repository path the default one is use. ({home.dir}/.ivy/local/jayasoft/filter-framework/)
+Now we are ready to use our library.
+
+<h1>The application project</h1>
+
+Now that we have shipped our fantastic library, we want to use it!
+The tutorial comes with a sample application called myapp. You will find it in the tutorial folder.
+<h2>The ivy.xml file</h2>
+
+<div class="ivy-file">
+<code type="xml">
+<ivy-module version="1.3">
+    <info organisation="jayasoft" module="myapp"/>
+   
+    <configurations>
+      <conf name="build" visibility="private" description="compilation only need api jar" />
+      <conf name="noexternaljar" description="use only company jar" />
+      <conf name="withexternaljar" description="use company jar and third party jars" />    
+    </configurations>
+    
+    <dependencies>
+        <dependency org="jayasoft" name="filter-framework" rev="latest.integration" conf="build->api; noexternaljar->homemade-impl; withexternaljar->cc-impl"/>
+    </dependencies>
+</ivy-module>
+</code> 
+</div>
+<h2>Explanation</h2>
+We create 3 configurations that define the way we want to use the application.
+The build configuration, (as said before) only need api to compile.
+The other configuration are defined for runtime.
+One configuration will only use "home-made" jars, and the second one will use external jars.
+
+We also defined a dependency on the previous library.
+In the dependency we use configuration mapping to match ours and library configurations.
+You can found more information on configuration mapping <a href="../../doc/ivyfile/configurations.html">here</a>
+<ol>
+  <li><b>build->api</b> : here we tell ivy that our <b>build</b> configuration depends on the api configuration of the dependcy</li>
+  <li><b>noexternaljar->homemade-impl</b> : here we tell ivy that our <b>noexternaljar</b> configuration depends on the <b>homemade-impl</b> configuration of the dependcy.</li>
+  <li><b>withexternaljar->cc-impl</b> : here we tell ivy that our <b>withexternaljar</b> configuration depends on the <b>cc-impl</b> configuration of the dependcy</li>
+</ol>
+Note that we never declares any of the dependency artifacts we need in each configuration: it's the dependency module file which declares the published artifacts and which should be used in each configuration.
+
+In the ant buld.xml file we defined a resolve target as follow:
+
+<code type="xml">
+<target name="resolve" description="--> retreive dependencies with ivy">
+	<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact].[ext]"/>
+</target> 
+</code> 
+
+When we call this target, Ivy will do a resolve using our ivy.xml file in the root folder and will after do retrieve putting all the artifacts in folder for each configuration. Here is how your lib directory should look like after a call to this target:
+<div class="shell"><pre>
+ Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib
+
+01/24/2006  11:19 AM    <REP>          build
+01/24/2006  11:19 AM    <REP>          noexternaljar
+01/24/2006  11:19 AM    <REP>          withexternaljar
+               0 fichier(s)                0 octets
+
+ Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib\build
+
+01/24/2006  10:53 AM             1,174 filter-api.jar
+               1 fichier(s)            1,174 octets
+
+ Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib\noexternaljar
+
+01/24/2006  10:53 AM             1,174 filter-api.jar
+01/24/2006  10:53 AM             1,030 filter-hmimpl.jar
+               2 fichier(s)            2,204 octets
+
+ Repertoire de D:\ivy\src\example\configurations\multi-projects\myapp\lib\withexternaljar
+01/24/2006  10:53 AM           559,366 commons-collections.jar
+01/24/2006  10:53 AM             1,174 filter-api.jar
+01/24/2006  10:53 AM             1,626 filter-ccimpl.jar
+               3 fichier(s)          562,166 octets
+</pre></div>
+As you can see for each configuration we have now a set of jars.
+
+Let's try to launch our app.
+
+<h2>See it in action</h2>
+Use ant to run the application.
+Default ant target is run-cc and will launch application using common collection jar.
+<div class="shell"><pre>
+Buildfile: build.xml
+
+resolve:
+:: Ivy 20060123130642 - 20060123130642 :: http://ivy.jayasoft.org/ ::
+no configuration file found, using default...
+:: configuring :: url = jar:file:/C:/dev/ant/apache-ant-1.6.2/lib/ivy-20060123130642.jar!/fr/jayasoft/ivy/conf/ivysettings.xml
+:: resolving dependencies :: [ jayasoft | myapp | working@SPIDER ]
+        confs: [build, noexternaljar, withexternaljar]
+        found [ jayasoft | filter-framework | 1.3 ] in local
+        [1.3] [ jayasoft | filter-framework | latest.integration ]
+        found [ apache | commons-collections | 3.1 ] in default
+downloading D:\users\mm\.ivy\local\jayasoft\filter-framework\1.3\jars\filter-ccimpl.jar .... (1kB)
+        [SUCCESSFUL ] [ jayasoft | filter-framework | 1.3 ]/filter-ccimpl.jar[jar] (0ms)
+downloading D:\users\mm\.ivy\local\jayasoft\filter-framework\1.3\jars\filter-api.jar .... (1kB)
+        [SUCCESSFUL ] [ jayasoft | filter-framework | 1.3 ]/filter-api.jar[jar] (0ms)
+downloading D:\users\mm\.ivy\local\jayasoft\filter-framework\1.3\jars\filter-hmimpl.jar .... (1kB)
+        [SUCCESSFUL ] [ jayasoft | filter-framework | 1.3 ]/filter-hmimpl.jar[jar] (10ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |       build      |   1   |   1   |   1   |   0   ||   1   |   1   |
+        |   noexternaljar  |   1   |   1   |   1   |   0   ||   2   |   2   |
+        |  withexternaljar |   2   |   1   |   1   |   0   ||   3   |   2   |
+        ---------------------------------------------------------------------
+:: retrieving :: [ jayasoft | myapp ]
+        confs: [build, noexternaljar, withexternaljar]
+        6 artifacts copied, 0 already retrieved
+
+build:
+    [mkdir] Created dir: D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\myapp\build
+    [javac] Compiling 1 source file to D:\svn\jayasoft\projects\tools\ivy\src\example\configurations\multi-projects\myapp\build
+
+run-cc:
+     [java] Filtering with:class filter.ccimpl.CCFilter
+     [java] Result :[two, tree]
+</pre></div>
+Launching application with only home made jars is straingforward.
+type ant run-hm
+
+<div class="shell"><pre>
+Buildfile: build.xml
+
+resolve:
+:: Ivy 20060123130642 - 20060123130642 :: http://ivy.jayasoft.org/ ::
+no configuration file found, using default...
+:: configuring :: url = jar:file:/C:/dev/ant/apache-ant-1.6.2/lib/ivy-20060123130642.jar!/fr/jayasoft/ivy/conf/ivysettings.xml
+:: resolving dependencies :: [ jayasoft | myapp | working@SPIDER ]
+        confs: [build, noexternaljar, withexternaljar]
+        found [ jayasoft | filter-framework | 1.3 ] in default
+        [1.3] [ jayasoft | filter-framework | latest.integration ]
+        found [ apache | commons-collections | 3.1 ] in default
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |       build      |   1   |   1   |   0   |   0   ||   1   |   0   |
+        |   noexternaljar  |   1   |   1   |   0   |   0   ||   2   |   0   |
+        |  withexternaljar |   2   |   1   |   0   |   0   ||   3   |   0   |
+        ---------------------------------------------------------------------
+:: retrieving :: [ jayasoft | myapp ]
+        confs: [build, noexternaljar, withexternaljar]
+        0 artifacts copied, 6 already retrieved
+
+build:
+
+run-hm:
+     [java] Filtering with:class filter.hmimpl.HMFilter
+     [java] Result :[two, tree]
+
+BUILD SUCCESSFUL
+</pre></div>
+Nice we got the same result but we can see that implementation class are different.
+
+<h1>Conclusion</h1>
+<b>You should use configuration as often as possible</b>
+Configurations are very important concept in ivy. They allow you to groups artifacts set by meaning.
+When you write ivy file for projects that are supposed to be reused, use configurations to allow people to get only they what they need without having to specify it by hand using artifact tag in dependency section. 
 	</textarea>
 <script type="text/javascript">xooki.postProcess();</script>
 </body>

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/defaultconf.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/defaultconf.html?view=diff&rev=522842&r1=522841&r2=522842
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/defaultconf.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/defaultconf.html Tue Mar 27 02:36:03 2007
@@ -1,198 +1,216 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
 <html>
 <head>
 	<script type="text/javascript">var xookiConfig = {level: 2};</script>	
 	<script type="text/javascript" src="../../xooki/xooki.js"></script>
 </head>
 <body>
-	<textarea id="xooki-source">
-Until Ivy 1.2a, the default resolver was a simple ivyrep resolver, with only a small number of possibilities of configuration. Whenever you wanted to do something slightly more complicated than looking for ivy files on ivyrep and artifacts on ibiblio, you had to write your own ivysettings file (see other tutorials and <a href="../../doc/configuration.html">settings</a> reference for details about this).
-
-Ivy 1.3 introduced new default settings a lot more flexible.
-
-<h1>Concept</h1>
-This default settings mainly consist of 3 kind of repositories:
-<ul>
-<li>local</li> a repository which is private to the user. 
-<li>shared</li> a repository which is shared between all the member of a team
-<li>public</li> a public repository on which most modules can be found
-</ul>
-
-Note that if you work alone, the distinction between local and shared repository is not very important, but there are some things to know to distinguish them.
-
-Now let's describe each of these repositories concept in more details. We will describe how they are setup physically later.
-<h2>Local</h2>
-The local repository is particularly useful when you want to do something without being disturb by anything else happening in the environment. This means that whenever ivy is able to locate a module in this repository it will be used, no matter of what is available in others.
-
-For instance, if you have a module declaring a dependency on the module foo in revision latest.integration, then if a revision of foo is found in the local repository, it will be used, <em>even if a more recent revision is available in other repositories</em>. 
-
-This may be disturbing for some of you, but imagine you have to implement a new feature on a project, and in order to achieve that you need to modify two modules: you add a new method in module foo and exploit this new method in module bar. Then if you publish the module foo to your local repository, you will be sure to get it in your bar module, even if someone else publish a new revision of foo in the shared repository (this revision not having the new method you are currently adding). 
-
-But be careful, when you have finished your development and publish it on the shared you will have to clean your local repository to benefit from new versions published in the shared repository.
-
-Note also that modules found in the local repository must be complete, i.e. they must provide both a module descriptor and the published artifacts. 
-<h2>Shared</h2>
-As its name suggest, the shared repository is aimed to be shared among a whole development team. It is a place where you can publish your team private modules for instance, and it's also a place where you can put modules not available in the public repository (sun jars, for instance), or simply not accurate (bad or incomplete module descriptors for instance).
-
-Note that modules can be split across the shared repository and the public one: you can have the module descritor in the shared repository and the artifacts in the public one, for instance.
-<h2>Public</h2>
-The public repository is the place where most modules can be found, but which sometimes lack the information you need. It's usually a repository available through an internet connection only, even if this is not mandatory.
-<h1>Setting up the repositories</h1>
-Now that we have seen the objective of each of the three repositories, let's see how they are setup and how to configure them to fit your needs.
-
-First, several repositories uses the same root in your filesystem. Referenced as ${ivy.default.ivy.user.dir}, this is by default the directory .ivy in your user home.
-
-Note that several things can be done by setting ivy variable. To set them without defining your own ivysettings.xml file, you can:<ul>
-<li>set an ant property before any call to ivy in your build file if you use ivy from ant</li>
-<li>set an environment variable if you use ivy from the command line</li>
-</ul>
-For instance:
-<code type="xml">
-<target name="resolve">
-  <property name="ivy.default.ivy.user.dir" value="/path/to/ivy/user/dir"/>
-  <ivy:resolve />
-</target>
-</code>
-
-Now we will show how to override default values for the different kind of repositories, note that you can find what are these default values below in the detail of the default settings.
-<h2>Local</h2>
-By default, the local repository lies in ${ivy.default.ivy.user.dir}/local. This is usually a good place, but you may want to modify it however. No problem, you just have to set the following ivy variable to the directory you want to use: <code>ivy.local.default.root</code>. For instance:
-<code>ivy.local.default.root=/opt/ivy/repository/local</code>.
-
-If you already have something you would like to use as your local repository, you may also want to modify the layout of this repository. Once again, two variables are available for that:
-<code>ivy.local.default.ivy.pattern</code> gives the pattern to find ivy files
-<code>ivy.local.default.artifact.pattern</code> gives the pattern to find artifacts
-For example:
-<code>
-ivy.local.default.root=/opt/ivy/repository/local
-ivy.local.default.ivy.pattern=[module]/[revision]/ivy.xml
-ivy.local.default.artifact.pattern=[module]/[revision]/[artifact].[ext]
-</code>
-<h2>Shared</h2>
-By default, the shared repository lies in ${ivy.default.ivy.user.dir}/shared. This is fine if you work alone, but the shared repository is supposed to be, mmm, shared! So changing this directory is often required, and it is usually modified to point to a shared directory. You can use <code>ivy.shared.default.root</code> variable to specify in a new directory. Moreover, you can also configure the layout with variables similar to the one for the local repository:
-<code>ivy.shared.default.ivy.pattern</code> gives the pattern to find ivy files
-<code>ivy.shared.default.artifact.pattern</code> gives the pattern to find artifacts
-For example:
-<code>
-ivy.shared.default.root=/opt/ivy/repository/shared
-ivy.shared.default.ivy.pattern=[organisation]/[module]/[revision]/ivy.xml
-ivy.shared.default.artifact.pattern=[organisation]/[module]/[revision]/[artifact].[ext]
-</code>
-
-<h2>Public</h2>
-By default, the public repository is ivyrep. To change the setting of this resolver, you can use the standard way to configure ivyrep:
-<code>ivy.ivyrep.default.ivy.root</code> specify the root for ivy files
-<code>ivy.ivyrep.default.ivy.pattern</code> specify the layout for ivy files
-<code>ivy.ivyrep.default.artifact.root</code> specify the root for artifacts
-<code>ivy.ivyrep.default.artifact.pattern</code> specify the layout for artifacts
-For instance:
-<code>
-ivy.ivyrep.default.ivy.root=http://myserver/ivy/
-ivy.ivyrep.default.artifact.root=http://myserver/ivy/
-</code>
-
-<h1>Going further</h1>
-OK, so we have seen how to easily change the settings of the three main repositories. But what if I want my shared repository is on a web server ? What if the public repository is not compatible with ivyrep ? What if ... 
-
-Everything can be changed in the default settings, for sure, you can even do your own settings. But you can also benefit from a part of the default settings without writing a complete one.
-
-But before explaining how, you will need to have a quick overview of how ivy is configured by default.
-
-By default, ivy is configured using an ivysettings.xml which is packaged in the ivy jar. Here is this settings file:
-<code type="xml">
-<ivysettings>
-  <settings defaultResolver="default"/>
-  <include url="${ivy.default.conf.dir}/ivysettings-public.xml"/>
-  <include url="${ivy.default.conf.dir}/ivysettings-shared.xml"/>
-  <include url="${ivy.default.conf.dir}/ivysettings-local.xml"/>
-  <include url="${ivy.default.conf.dir}/ivysettings-main-chain.xml"/>
-  <include url="${ivy.default.conf.dir}/ivysettings-default-chain.xml"/>
-</ivysettings>
-</code>
-OK, so not much info here, except a lot of inclusions. These inclusions have been done on purpose so that you can easily change only one part of the ivysettings and benefit of the rest easily. For example, if you want to define your own public resolver, you will just have to configure ivy with an ivysettings like that:
-<code type="xml">
-<ivysettings>
-  <settings defaultResolver="default"/>
-  <include url="http://myserver/ivy/myivysettings-public.xml"/>
-  <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
-  <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
-  <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
-  <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
-</ivysettings>
-</code>
-Note that only the ivysettings-public inclusion has changed to include a home made public resolver. Note also that this can be used like that thanks to the fact that ${ivy.default.settings.dir} is a variable which is always set to the place where ivy default settings files are (i.e. packaged in the jar).
-To finish this example, you for sure have to write your own ivysettings file for defining your own public resolver. For instance:
-<code type="xml">
-<ivysettings>
-  <resolvers>
-    <filesystem name="public">
-      <ivy pattern="/path/to/my/public/rep/[organisation]/[module]/ivy-[revision].xml" />
-      <artifact pattern="/path/to/my/public/rep/[organisation]/[module]/[artifact]-[revision].[ext]" />
-    </filesystem>
-  </resolvers>
-</ivysettings>
-</code>
-No the last thing you will need in order to properly take advantage of the default settings is the content of each included ivysettings file:
-<strong>ivysettings-public.xml</strong>
-<code type="xml">
-<ivysettings>
-  <resolvers>
-    <ivyrep name="public"/>
-  </resolvers>
-</ivysettings>
-</code>
-<strong>ivysettings-shared.xml</strong>
-<code type="xml">
-<ivysettings>
-  <property name="ivy.shared.default.root"             value="${ivy.default.ivy.user.dir}/shared" override="false"/>
-  <property name="ivy.shared.default.ivy.pattern"      value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
-  <property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
-  <resolvers>
-    <filesystem name="shared">
-      <ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
-      <artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
-    </filesystem>
-  </resolvers>
-</ivysettings>
-</code>
-<strong>ivysettings-local.xml</strong>
-<code type="xml">
-<ivysettings>
-  <property name="ivy.local.default.root"             value="${ivy.default.ivy.user.dir}/local" override="false"/>
-  <property name="ivy.local.default.ivy.pattern"      value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
-  <property name="ivy.local.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
-  <resolvers>
-    <filesystem name="local">
-      <ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
-      <artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
-    </filesystem>
-  </resolvers>
-</ivysettings>
-</code>
-<strong>ivysettings-main-chain.xml</strong>
-<code type="xml">
-<ivysettings>
-  <resolvers>
-    <chain name="main" dual="true">
-      <resolver ref="shared"/>
-      <resolver ref="public"/>
-    </chain>
-  </resolvers>
-</ivysettings>
-</code>
-<strong>ivysettings-default-chain.xml</strong>
-<code type="xml">
-<ivysettings>
-  <resolvers>
-    <chain name="default" returnFirst="true">
-      <resolver ref="local"/>
-      <resolver ref="main"/>
-    </chain>
-  </resolvers>
-</ivysettings>
-</code>
-
-Here you are, you have enough clues to configure that the way you want... check the <a href="../../doc/configuration.html">settings documentation</a> to see if what you want to do is possible, and go ahead !
+	<textarea id="xooki-source">
+Until Ivy 1.2a, the default resolver was a simple ivyrep resolver, with only a small number of possibilities of configuration. Whenever you wanted to do something slightly more complicated than looking for ivy files on ivyrep and artifacts on ibiblio, you had to write your own ivysettings file (see other tutorials and <a href="../../doc/configuration.html">settings</a> reference for details about this).
+
+Ivy 1.3 introduced new default settings a lot more flexible.
+
+<h1>Concept</h1>
+This default settings mainly consist of 3 kind of repositories:
+<ul>
+<li>local</li> a repository which is private to the user. 
+<li>shared</li> a repository which is shared between all the member of a team
+<li>public</li> a public repository on which most modules can be found
+</ul>
+
+Note that if you work alone, the distinction between local and shared repository is not very important, but there are some things to know to distinguish them.
+
+Now let's describe each of these repositories concept in more details. We will describe how they are setup physically later.
+<h2>Local</h2>
+The local repository is particularly useful when you want to do something without being disturb by anything else happening in the environment. This means that whenever ivy is able to locate a module in this repository it will be used, no matter of what is available in others.
+
+For instance, if you have a module declaring a dependency on the module foo in revision latest.integration, then if a revision of foo is found in the local repository, it will be used, <em>even if a more recent revision is available in other repositories</em>. 
+
+This may be disturbing for some of you, but imagine you have to implement a new feature on a project, and in order to achieve that you need to modify two modules: you add a new method in module foo and exploit this new method in module bar. Then if you publish the module foo to your local repository, you will be sure to get it in your bar module, even if someone else publish a new revision of foo in the shared repository (this revision not having the new method you are currently adding). 
+
+But be careful, when you have finished your development and publish it on the shared you will have to clean your local repository to benefit from new versions published in the shared repository.
+
+Note also that modules found in the local repository must be complete, i.e. they must provide both a module descriptor and the published artifacts. 
+<h2>Shared</h2>
+As its name suggest, the shared repository is aimed to be shared among a whole development team. It is a place where you can publish your team private modules for instance, and it's also a place where you can put modules not available in the public repository (sun jars, for instance), or simply not accurate (bad or incomplete module descriptors for instance).
+
+Note that modules can be split across the shared repository and the public one: you can have the module descritor in the shared repository and the artifacts in the public one, for instance.
+<h2>Public</h2>
+The public repository is the place where most modules can be found, but which sometimes lack the information you need. It's usually a repository available through an internet connection only, even if this is not mandatory.
+<h1>Setting up the repositories</h1>
+Now that we have seen the objective of each of the three repositories, let's see how they are setup and how to configure them to fit your needs.
+
+First, several repositories uses the same root in your filesystem. Referenced as ${ivy.default.ivy.user.dir}, this is by default the directory .ivy in your user home.
+
+Note that several things can be done by setting ivy variable. To set them without defining your own ivysettings.xml file, you can:<ul>
+<li>set an ant property before any call to ivy in your build file if you use ivy from ant</li>
+<li>set an environment variable if you use ivy from the command line</li>
+</ul>
+For instance:
+<code type="xml">
+<target name="resolve">
+  <property name="ivy.default.ivy.user.dir" value="/path/to/ivy/user/dir"/>
+  <ivy:resolve />
+</target>
+</code>
+
+Now we will show how to override default values for the different kind of repositories, note that you can find what are these default values below in the detail of the default settings.
+<h2>Local</h2>
+By default, the local repository lies in ${ivy.default.ivy.user.dir}/local. This is usually a good place, but you may want to modify it however. No problem, you just have to set the following ivy variable to the directory you want to use: <code>ivy.local.default.root</code>. For instance:
+<code>ivy.local.default.root=/opt/ivy/repository/local</code>.
+
+If you already have something you would like to use as your local repository, you may also want to modify the layout of this repository. Once again, two variables are available for that:
+<code>ivy.local.default.ivy.pattern</code> gives the pattern to find ivy files
+<code>ivy.local.default.artifact.pattern</code> gives the pattern to find artifacts
+For example:
+<code>
+ivy.local.default.root=/opt/ivy/repository/local
+ivy.local.default.ivy.pattern=[module]/[revision]/ivy.xml
+ivy.local.default.artifact.pattern=[module]/[revision]/[artifact].[ext]
+</code>
+<h2>Shared</h2>
+By default, the shared repository lies in ${ivy.default.ivy.user.dir}/shared. This is fine if you work alone, but the shared repository is supposed to be, mmm, shared! So changing this directory is often required, and it is usually modified to point to a shared directory. You can use <code>ivy.shared.default.root</code> variable to specify in a new directory. Moreover, you can also configure the layout with variables similar to the one for the local repository:
+<code>ivy.shared.default.ivy.pattern</code> gives the pattern to find ivy files
+<code>ivy.shared.default.artifact.pattern</code> gives the pattern to find artifacts
+For example:
+<code>
+ivy.shared.default.root=/opt/ivy/repository/shared
+ivy.shared.default.ivy.pattern=[organisation]/[module]/[revision]/ivy.xml
+ivy.shared.default.artifact.pattern=[organisation]/[module]/[revision]/[artifact].[ext]
+</code>
+
+<h2>Public</h2>
+By default, the public repository is ivyrep. To change the setting of this resolver, you can use the standard way to configure ivyrep:
+<code>ivy.ivyrep.default.ivy.root</code> specify the root for ivy files
+<code>ivy.ivyrep.default.ivy.pattern</code> specify the layout for ivy files
+<code>ivy.ivyrep.default.artifact.root</code> specify the root for artifacts
+<code>ivy.ivyrep.default.artifact.pattern</code> specify the layout for artifacts
+For instance:
+<code>
+ivy.ivyrep.default.ivy.root=http://myserver/ivy/
+ivy.ivyrep.default.artifact.root=http://myserver/ivy/
+</code>
+
+<h1>Going further</h1>
+OK, so we have seen how to easily change the settings of the three main repositories. But what if I want my shared repository is on a web server ? What if the public repository is not compatible with ivyrep ? What if ... 
+
+Everything can be changed in the default settings, for sure, you can even do your own settings. But you can also benefit from a part of the default settings without writing a complete one.
+
+But before explaining how, you will need to have a quick overview of how ivy is configured by default.
+
+By default, ivy is configured using an ivysettings.xml which is packaged in the ivy jar. Here is this settings file:
+<code type="xml">
+<ivysettings>
+  <settings defaultResolver="default"/>
+  <include url="${ivy.default.conf.dir}/ivysettings-public.xml"/>
+  <include url="${ivy.default.conf.dir}/ivysettings-shared.xml"/>
+  <include url="${ivy.default.conf.dir}/ivysettings-local.xml"/>
+  <include url="${ivy.default.conf.dir}/ivysettings-main-chain.xml"/>
+  <include url="${ivy.default.conf.dir}/ivysettings-default-chain.xml"/>
+</ivysettings>
+</code>
+OK, so not much info here, except a lot of inclusions. These inclusions have been done on purpose so that you can easily change only one part of the ivysettings and benefit of the rest easily. For example, if you want to define your own public resolver, you will just have to configure ivy with an ivysettings like that:
+<code type="xml">
+<ivysettings>
+  <settings defaultResolver="default"/>
+  <include url="http://myserver/ivy/myivysettings-public.xml"/>
+  <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
+  <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
+  <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
+  <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
+</ivysettings>
+</code>
+Note that only the ivysettings-public inclusion has changed to include a home made public resolver. Note also that this can be used like that thanks to the fact that ${ivy.default.settings.dir} is a variable which is always set to the place where ivy default settings files are (i.e. packaged in the jar).
+To finish this example, you for sure have to write your own ivysettings file for defining your own public resolver. For instance:
+<code type="xml">
+<ivysettings>
+  <resolvers>
+    <filesystem name="public">
+      <ivy pattern="/path/to/my/public/rep/[organisation]/[module]/ivy-[revision].xml" />
+      <artifact pattern="/path/to/my/public/rep/[organisation]/[module]/[artifact]-[revision].[ext]" />
+    </filesystem>
+  </resolvers>
+</ivysettings>
+</code>
+No the last thing you will need in order to properly take advantage of the default settings is the content of each included ivysettings file:
+<strong>ivysettings-public.xml</strong>
+<code type="xml">
+<ivysettings>
+  <resolvers>
+    <ivyrep name="public"/>
+  </resolvers>
+</ivysettings>
+</code>
+<strong>ivysettings-shared.xml</strong>
+<code type="xml">
+<ivysettings>
+  <property name="ivy.shared.default.root"             value="${ivy.default.ivy.user.dir}/shared" override="false"/>
+  <property name="ivy.shared.default.ivy.pattern"      value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
+  <property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
+  <resolvers>
+    <filesystem name="shared">
+      <ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
+      <artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
+    </filesystem>
+  </resolvers>
+</ivysettings>
+</code>
+<strong>ivysettings-local.xml</strong>
+<code type="xml">
+<ivysettings>
+  <property name="ivy.local.default.root"             value="${ivy.default.ivy.user.dir}/local" override="false"/>
+  <property name="ivy.local.default.ivy.pattern"      value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
+  <property name="ivy.local.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
+  <resolvers>
+    <filesystem name="local">
+      <ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
+      <artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
+    </filesystem>
+  </resolvers>
+</ivysettings>
+</code>
+<strong>ivysettings-main-chain.xml</strong>
+<code type="xml">
+<ivysettings>
+  <resolvers>
+    <chain name="main" dual="true">
+      <resolver ref="shared"/>
+      <resolver ref="public"/>
+    </chain>
+  </resolvers>
+</ivysettings>
+</code>
+<strong>ivysettings-default-chain.xml</strong>
+<code type="xml">
+<ivysettings>
+  <resolvers>
+    <chain name="default" returnFirst="true">
+      <resolver ref="local"/>
+      <resolver ref="main"/>
+    </chain>
+  </resolvers>
+</ivysettings>
+</code>
+
+Here you are, you have enough clues to configure that the way you want... check the <a href="../../doc/configuration.html">settings documentation</a> to see if what you want to do is possible, and go ahead !
 	</textarea>
 <script type="text/javascript">xooki.postProcess();</script>
 </body>

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/dual.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/dual.html?view=diff&rev=522842&r1=522841&r2=522842
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/dual.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/dual.html Tue Mar 27 02:36:03 2007
@@ -1,150 +1,168 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
 <html>
 <head>
 	<script type="text/javascript">var xookiConfig = {level: 2};</script>	
 	<script type="text/javascript" src="../../xooki/xooki.js"></script>
 </head>
 <body>
-	<textarea id="xooki-source">
-This tutorial presents the use of the DualResolver, a feature introduced in the version 0.6 of Ivy.
-
-Dual Resolver is used when ivy files can be found in a repository while artifacts are in another. It is especially useful to use full power of ivy (including transitive dependencies) with the ibiblio repository for artifacts. The problem with the maven ibiblio repository is that it does not contain ivy files. Since transitive dependencies are based upon ivy files, using the ibiblio resolver does not permit to use transitive dependencies.
-
-The solution to this problem is to store your own repository only for ivy files, and use ibiblio for artifacts. That's what is done in this tutorial.
-
-<h1>project description</h1>
-Let's have a look at the src/example/dual directory in your ivy distribution.
-It contains a build file and 3 directories:
-<ul>
-<li>config: 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 test class : example.Hello
-It depends on two libraries: apache commons-lang and apache commons-httpclient.
-
-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>
-Take a look at it's <b>ivy.xml</b> file:
-<code>
-<ivy-module version="1.0">
-    <info organisation="jayasoft" module="hello-ivy" />
-    <dependencies>
-        <dependency org="apache" name="commons-httpclient" rev="2.0.2" />
-        <dependency org="apache" name="commons-lang" rev="2.0" />
-    </dependencies>
-</ivy-module>
-</code>
-
-As you can see, nothing special here... Indeed, it's the philosophy of ivy to keep ivy files independent of the way dependencies are retrieved.
-
-<h2>the <b>ivy</b> settings</h2>
-The ivy settings is made in the config directory it contains only one file: ivysettings.xml.
-
-Let's analyse it.
-<code>
-<ivysettings>
-  <settings defaultResolver="dual-example" />
-  <resolvers>
-    <dual name="dual-example">
-      <filesystem name="ivys">
-        <ivy pattern="${ivy.settings.dir}/../repository/[module]-ivy-[revision].xml" />
-      </filesystem>
-      <ibiblio name="ibiblio" />
-    </dual>
-  </resolvers>
-</ivysettings>
-</code>
-
-Here we configure 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" resolver of the dual resolver, and the second one is what is called the "artifact" resolver. It is important that the dual resolver exactly has two sub resolvers in this given order.
-The ivy resolver, here a filesystem one, is used only to find ivy files. The settings given in this resolver says that all ivy files are in the same directory, named like that: [module]-ivy-[revision].xml. If we check the repository directory, we can confirm that it contains a file named commons-httpclient-ivy-2.0.2.xml. It fulfills the given pattern and will thus be find by this resolver.
-The artifact resolver is simply an ibiblio one, and will thus try to find required artifacts in the maven ibiblio repository.
-
-<h1>walkthrough</h1>
-<div class="step">
-<h2>step 1 : preparation</h2>
-Open a DOS or shell window, and go to the "dual" directory.
-</div>
-<div class="step">
-<h2>step 2 : clean up</h2>
-On the prompt type : ant<br>
-This will clean up the entire project directory tree (compiled classes and retrieved libs) and ivy cache. 
-You can do it each time you want to clean up this example.
-</div>
-<div class="step">
-<h2>step 3 : run the project</h2>
-Goto project directory. And simply run <b>ant</b>.
-<div class="shell"><pre>
-I:\dual\project>ant
-Buildfile: build.xml
-
-configure:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-
-resolve:
-:: resolving dependencies :: jayasoft/hello-ivy-working@xmen
-        confs: [default]
-downloading http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.0.jar(2.0) ...
-.....
-.........
-..........
-...........
-. (165kB)
-        [SUCCESSFUL ] apache/commons-lang-2.0/commons-lang.jar[jar] (8032ms)
-downloading http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.2.jar(2.0.2) ...
-...........
-......
-....
-..........
-............
-........ (220kB)
-        [SUCCESSFUL ] apache/commons-httpclient-2.0.2/commons-httpclient.jar[jar] (10031ms)
-downloading http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.4.jar(1.0.4) ...
-......... (37kB)
-        [SUCCESSFUL ] apache/commons-logging-1.0.4/commons-logging.jar[jar] (1469ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   3   |   3   |   1   |   0   ||   3   |   3   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/hello-ivy
-        confs: [default]
-        3 artifacts copied, 0 already retrieved
-
-run:
-    [mkdir] Created dir: I:\dual\project\build
-    [javac] Compiling 1 source file to I:\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: 24 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 repository directory:
-<code>
-<ivy-module version="1.0">
-    <info organisation="apache" module="commons-httpclient" revision="2.0.2" status="release" publication="20041010174300" />
-    <dependencies>
-        <dependency name="commons-logging" rev="1.0.4" conf="default" />
-    </dependencies>
-</ivy-module>
-</code>
-<br/>
-So everything worked well, ivy file has been found in the repository directory and artifacts have been downloaded from ibiblio. You now just have to write ivy files for the module you often use, and they will be much easier to use... And imagine a world in which each module delivers also an ivy file. Since it is independent of the way to retrieve dependencies, it would made all dependencies handling much easier, wouldn't it?
-
-
+	<textarea id="xooki-source">
+This tutorial presents the use of the DualResolver, a feature introduced in the version 0.6 of Ivy.
+
+Dual Resolver is used when ivy files can be found in a repository while artifacts are in another. It is especially useful to use full power of ivy (including transitive dependencies) with the ibiblio repository for artifacts. The problem with the maven ibiblio repository is that it does not contain ivy files. Since transitive dependencies are based upon ivy files, using the ibiblio resolver does not permit to use transitive dependencies.
+
+The solution to this problem is to store your own repository only for ivy files, and use ibiblio for artifacts. That's what is done in this tutorial.
+
+<h1>project description</h1>
+Let's have a look at the src/example/dual directory in your ivy distribution.
+It contains a build file and 3 directories:
+<ul>
+<li>config: 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 test class : example.Hello
+It depends on two libraries: apache commons-lang and apache commons-httpclient.
+
+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>
+Take a look at it's <b>ivy.xml</b> file:
+<code>
+<ivy-module version="1.0">
+    <info organisation="jayasoft" module="hello-ivy" />
+    <dependencies>
+        <dependency org="apache" name="commons-httpclient" rev="2.0.2" />
+        <dependency org="apache" name="commons-lang" rev="2.0" />
+    </dependencies>
+</ivy-module>
+</code>
+
+As you can see, nothing special here... Indeed, it's the philosophy of ivy to keep ivy files independent of the way dependencies are retrieved.
+
+<h2>the <b>ivy</b> settings</h2>
+The ivy settings is made in the config directory it contains only one file: ivysettings.xml.
+
+Let's analyse it.
+<code>
+<ivysettings>
+  <settings defaultResolver="dual-example" />
+  <resolvers>
+    <dual name="dual-example">
+      <filesystem name="ivys">
+        <ivy pattern="${ivy.settings.dir}/../repository/[module]-ivy-[revision].xml" />
+      </filesystem>
+      <ibiblio name="ibiblio" />
+    </dual>
+  </resolvers>
+</ivysettings>
+</code>
+
+Here we configure 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" resolver of the dual resolver, and the second one is what is called the "artifact" resolver. It is important that the dual resolver exactly has two sub resolvers in this given order.
+The ivy resolver, here a filesystem one, is used only to find ivy files. The settings given in this resolver says that all ivy files are in the same directory, named like that: [module]-ivy-[revision].xml. If we check the repository directory, we can confirm that it contains a file named commons-httpclient-ivy-2.0.2.xml. It fulfills the given pattern and will thus be find by this resolver.
+The artifact resolver is simply an ibiblio one, and will thus try to find required artifacts in the maven ibiblio repository.
+
+<h1>walkthrough</h1>
+<div class="step">
+<h2>step 1 : preparation</h2>
+Open a DOS or shell window, and go to the "dual" directory.
+</div>
+<div class="step">
+<h2>step 2 : clean up</h2>
+On the prompt type : ant<br>
+This will clean up the entire project directory tree (compiled classes and retrieved libs) and ivy cache. 
+You can do it each time you want to clean up this example.
+</div>
+<div class="step">
+<h2>step 3 : run the project</h2>
+Goto project directory. And simply run <b>ant</b>.
+<div class="shell"><pre>
+I:\dual\project>ant
+Buildfile: build.xml
+
+configure:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+
+resolve:
+:: resolving dependencies :: jayasoft/hello-ivy-working@xmen
+        confs: [default]
+downloading http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.0.jar(2.0) ...
+.....
+.........
+..........
+...........
+. (165kB)
+        [SUCCESSFUL ] apache/commons-lang-2.0/commons-lang.jar[jar] (8032ms)
+downloading http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.2.jar(2.0.2) ...
+...........
+......
+....
+..........
+............
+........ (220kB)
+        [SUCCESSFUL ] apache/commons-httpclient-2.0.2/commons-httpclient.jar[jar] (10031ms)
+downloading http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.4.jar(1.0.4) ...
+......... (37kB)
+        [SUCCESSFUL ] apache/commons-logging-1.0.4/commons-logging.jar[jar] (1469ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   3   |   3   |   1   |   0   ||   3   |   3   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/hello-ivy
+        confs: [default]
+        3 artifacts copied, 0 already retrieved
+
+run:
+    [mkdir] Created dir: I:\dual\project\build
+    [javac] Compiling 1 source file to I:\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: 24 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 repository directory:
+<code>
+<ivy-module version="1.0">
+    <info organisation="apache" module="commons-httpclient" revision="2.0.2" status="release" publication="20041010174300" />
+    <dependencies>
+        <dependency name="commons-logging" rev="1.0.4" conf="default" />
+    </dependencies>
+</ivy-module>
+</code>
+<br/>
+So everything worked well, ivy file has been found in the repository directory and artifacts have been downloaded from ibiblio. You now just have to write ivy files for the module you often use, and they will be much easier to use... And imagine a world in which each module delivers also an ivy file. Since it is independent of the way to retrieve dependencies, it would made all dependencies handling much easier, wouldn't it?
+
+
 	</textarea>
 <script type="text/javascript">xooki.postProcess();</script>
 </body>

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html?view=diff&rev=522842&r1=522841&r2=522842
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html Tue Mar 27 02:36:03 2007
@@ -1,125 +1,143 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
 <html>
 <head>
 	<script type="text/javascript">var xookiConfig = {level: 2};</script>	
 	<script type="text/javascript" src="../../xooki/xooki.js"></script>
 </head>
 <body>
-	<textarea id="xooki-source">
-In this example, we will see the easiest way to use ivy and benefit from its transitive dependencies feature. 
-No settings or other complicated files to write, only the list of libraries the project will use.
-
-<h1>The ivy.xml file</h1>
-This file is used to describe, the dependencies of the project on other libraries.
-Here is the sample : 
-<code>
-<ivy-module version="1.0">
-    <info organisation="jayasoft" module="hello-ivy" />
-    <dependencies>
-        <dependency org="apache" name="commons-lang" rev="2.0" />
-        <dependency org="apache" name="commons-cli" rev="1.0" />
-    </dependencies>
-</ivy-module>
-</code>
-The build file corresponding to use it, contains only :
-<code>
-<project xmlns:ivy="antlib:fr.jayasoft.ivy.ant" name="hello-ivy" default="run">
-    
-    ...
-    
-    <!-- ================================= 
-          target: resolve              
-         ================================= -->
-    <target name="resolve" description="--> retreive dependencies with ivy">
-        <ivy:retrieve />
-    </target>
-</project>
-</code>
-<h1>Running the project</h1>
-To run the sample, open a shell window, and go under the ivyrep example directory.
-Then, on the command prompt, just run ant :
-<div class="shell"><pre>
-I:\ivyrep>ant
-Buildfile: build.xml
-
-resolve:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-no configuration file found, using default...
-:: resolving dependencies :: jayasoft/ivyrep-example-working@xmen
-        confs: [default]
-downloading http://www.ibiblio.org/maven/commons-cli/jars/commons-cli-1.0.jar(1.0) ...
-...... (31kB)
-        [SUCCESSFUL ] apache/commons-cli-1.0/commons-cli.jar[jar] (1437ms)
-downloading http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.0.jar(2.0) ...
-..................................... (165kB)
-        [SUCCESSFUL ] apache/commons-lang-2.0/commons-lang.jar[jar] (5640ms)
-downloading http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.jar(1.0) ...
-..... (21kB)
-        [SUCCESSFUL ] apache/commons-logging-1.0/commons-logging.jar[jar] (1250ms)
-:: resolution report ::
-        :: evicted modules:
-        apache/commons-lang-1.0 by [apache/commons-lang-2.0] in [default]
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   4   |   3   |   2   |   1   ||   3   |   3   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/ivyrep-example
-        confs: [default]
-        3 artifacts copied, 0 already retrieved
-
-run:
-    [mkdir] Created dir: I:\ivyrep\build
-    [javac] Compiling 1 source file to I:\ivyrep\build
-     [java] standard message : hello ivy !
-     [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
-
-BUILD SUCCESSFUL
-Total time: 16 seconds</pre></div>
-<h1>What happened ?</h1>
-Without any settings, other than it's default settings, ivy uses the ivyrep resolver. This resolver looks for ivy files on <a href="../../ivyrep.html">ivyrep</a>, and for artifacts on ibiblio. That's what happened here. 
-
-The resolve task has found an <a href="http://ivyrep.jayasoft.org/apache/commons-cli/ivy-1.0.xml">ivy file on ivyrep for commons-cli 1.0</a>.
-This ivy file indicates that commons-cli 1.0 depends on commons-lang 1.0 and commons-logging 1.0.
-
-The resolve task detects the conflict between the revision 2.0 of commons-lang that is asked in the ivy above, and the revision 1.0 required in commons-cli. With no particular conflict manager, the 2.0 is selected, and the 1.0 is evicted. The 1.0 being evicted, it is not downloaded at all.
-
-The resolve task has then downloaded the commons-cli 1.0, commons-logging 1.0 and commons-lang.jar 2.0 files from ibiblioand put them to the ivy cache. 
-Then the retrieve task has copied them in the default library directory of the project: the lib dir.
-Some will say that the task was long to achieve. Yes, it's true it was, but it has downloaded from the internet the needed files. Let's try to run it again:
-<div class="shell"><pre>
-I:\ivyrep>ant
-Buildfile: build.xml
-
-resolve:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-no configuration file found, using default...
-:: resolving dependencies :: jayasoft/ivyrep-example-working@xmen
-        confs: [default]
-:: resolution report ::
-        :: evicted modules:
-        apache/commons-lang-1.0 by [apache/commons-lang-2.0] in [default]
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   4   |   0   |   0   |   1   ||   3   |   0   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/ivyrep-example
-        confs: [default]
-        0 artifacts copied, 3 already retrieved
-
-run:
-     [java] standard message : hello ivy !
-     [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
-
-BUILD SUCCESSFUL
-Total time: 2 seconds</pre></div>
-Great ! the cache was used, no download was needed and the build was almost instantaneous.
-
-If you want to check the content of the cache, by default it is put in your user home in a .ivy/cache directory. Check the next tutorials to see how to configure this.
-
+	<textarea id="xooki-source">
+In this example, we will see the easiest way to use ivy and benefit from its transitive dependencies feature. 
+No settings or other complicated files to write, only the list of libraries the project will use.
+
+<h1>The ivy.xml file</h1>
+This file is used to describe, the dependencies of the project on other libraries.
+Here is the sample : 
+<code>
+<ivy-module version="1.0">
+    <info organisation="jayasoft" module="hello-ivy" />
+    <dependencies>
+        <dependency org="apache" name="commons-lang" rev="2.0" />
+        <dependency org="apache" name="commons-cli" rev="1.0" />
+    </dependencies>
+</ivy-module>
+</code>
+The build file corresponding to use it, contains only :
+<code>
+<project xmlns:ivy="antlib:fr.jayasoft.ivy.ant" name="hello-ivy" default="run">
+    
+    ...
+    
+    <!-- ================================= 
+          target: resolve              
+         ================================= -->
+    <target name="resolve" description="--> retreive dependencies with ivy">
+        <ivy:retrieve />
+    </target>
+</project>
+</code>
+<h1>Running the project</h1>
+To run the sample, open a shell window, and go under the ivyrep example directory.
+Then, on the command prompt, just run ant :
+<div class="shell"><pre>
+I:\ivyrep>ant
+Buildfile: build.xml
+
+resolve:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+no configuration file found, using default...
+:: resolving dependencies :: jayasoft/ivyrep-example-working@xmen
+        confs: [default]
+downloading http://www.ibiblio.org/maven/commons-cli/jars/commons-cli-1.0.jar(1.0) ...
+...... (31kB)
+        [SUCCESSFUL ] apache/commons-cli-1.0/commons-cli.jar[jar] (1437ms)
+downloading http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.0.jar(2.0) ...
+..................................... (165kB)
+        [SUCCESSFUL ] apache/commons-lang-2.0/commons-lang.jar[jar] (5640ms)
+downloading http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.jar(1.0) ...
+..... (21kB)
+        [SUCCESSFUL ] apache/commons-logging-1.0/commons-logging.jar[jar] (1250ms)
+:: resolution report ::
+        :: evicted modules:
+        apache/commons-lang-1.0 by [apache/commons-lang-2.0] in [default]
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   4   |   3   |   2   |   1   ||   3   |   3   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/ivyrep-example
+        confs: [default]
+        3 artifacts copied, 0 already retrieved
+
+run:
+    [mkdir] Created dir: I:\ivyrep\build
+    [javac] Compiling 1 source file to I:\ivyrep\build
+     [java] standard message : hello ivy !
+     [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
+
+BUILD SUCCESSFUL
+Total time: 16 seconds</pre></div>
+<h1>What happened ?</h1>
+Without any settings, other than it's default settings, ivy uses the ivyrep resolver. This resolver looks for ivy files on <a href="../../ivyrep.html">ivyrep</a>, and for artifacts on ibiblio. That's what happened here. 
+
+The resolve task has found an <a href="http://ivyrep.jayasoft.org/apache/commons-cli/ivy-1.0.xml">ivy file on ivyrep for commons-cli 1.0</a>.
+This ivy file indicates that commons-cli 1.0 depends on commons-lang 1.0 and commons-logging 1.0.
+
+The resolve task detects the conflict between the revision 2.0 of commons-lang that is asked in the ivy above, and the revision 1.0 required in commons-cli. With no particular conflict manager, the 2.0 is selected, and the 1.0 is evicted. The 1.0 being evicted, it is not downloaded at all.
+
+The resolve task has then downloaded the commons-cli 1.0, commons-logging 1.0 and commons-lang.jar 2.0 files from ibiblioand put them to the ivy cache. 
+Then the retrieve task has copied them in the default library directory of the project: the lib dir.
+Some will say that the task was long to achieve. Yes, it's true it was, but it has downloaded from the internet the needed files. Let's try to run it again:
+<div class="shell"><pre>
+I:\ivyrep>ant
+Buildfile: build.xml
+
+resolve:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+no configuration file found, using default...
+:: resolving dependencies :: jayasoft/ivyrep-example-working@xmen
+        confs: [default]
+:: resolution report ::
+        :: evicted modules:
+        apache/commons-lang-1.0 by [apache/commons-lang-2.0] in [default]
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   4   |   0   |   0   |   1   ||   3   |   0   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/ivyrep-example
+        confs: [default]
+        0 artifacts copied, 3 already retrieved
+
+run:
+     [java] standard message : hello ivy !
+     [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
+
+BUILD SUCCESSFUL
+Total time: 2 seconds</pre></div>
+Great ! the cache was used, no download was needed and the build was almost instantaneous.
+
+If you want to check the content of the cache, by default it is put in your user home in a .ivy/cache directory. Check the next tutorials to see how to configure this.
+
 	</textarea>
 <script type="text/javascript">xooki.postProcess();</script>
 </body>