incubator-ivy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r536488 [14/19] - 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/tuto...
Date Wed, 09 May 2007 10:58:16 GMT
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=536488&r1=536487&r2=536488
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html Wed May  9 03:58:10 2007
@@ -1,145 +1,145 @@
-<!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: 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>
-<script type="text/javascript">xooki.postProcess();</script>
-</body>
-</html>
+<!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: 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>
+<script type="text/javascript">xooki.postProcess();</script>
+</body>
+</html>

Propchange: incubator/ivy/core/trunk/doc/doc/tutorial/ivyrep.html
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/multi-project.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/multi-project.html?view=diff&rev=536488&r1=536487&r2=536488
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/multi-project.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/multi-project.html Wed May  9 03:58:10 2007
@@ -1,338 +1,338 @@
-<!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: 2};</script>	
-	<script type="text/javascript" src="../../xooki/xooki.js"></script>
-</head>
-<body>
-	<textarea id="xooki-source">
-This example is an illustration of dependency between two project.
-
-The dependant project declares that it uses the standalone one. We will illustrate two things : 
-<ul>
-  <li>public libraries declared by standalone project will automatically be recovered by the dependant project</li>
-  <li>the dependant project will retrieve the "latest" version of the standalone project</li>
-</ul>
-<h1>the projects used</h1>
-<h2>the project : standalone</h2>
-The standalone project is very simple. It depends on the apache library commons-lang and contains only one class: standalone.Main which provides two services:
-<ul>
-  <li>return the version of the project</li>
-  <li>capitalize a string using org.apache.commons.lang.WordUtils.capitalizeFully</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 ivy project file</li>
-  <li>src\standalone\Main.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="standalone" />
-    <dependencies>
-        <dependency org="apache" name="commons-lang" rev="2.0" />
-    </dependencies>
-</ivy-module>
-</code>
-
-The ivy dependency file declares only one dependency on apache commons-lang library which by default is a public dependency (see <a href="../../doc/ivyfile.html">ivy file definition</a>).
-<h2>the project : depending</h2>
-The project depending is very simple too. It declares only one dependency on the latest version of the standalone project and it contains only one class depending.Main which make 2 things:
-<ul>
-  <li>getting the version of the standalone project throw a call to standalone.Main.getVersion()</li>
-  <li>transform a string throw a call to standalone.Main.capitalizeWords(str)</li>
-</ul>
-Take a look at it's <b>ivy.xml</b> file:
-<code>
-<ivy-module version="1.0">
-    <info organisation="jayasoft" module="depending" />
-    <dependencies>
-        <dependency name="standalone" rev="latest.integration" />
-    </dependencies>
-</ivy-module>
-</code>
-
-<h2>the <b>ivy</b> settings</h2>
-The ivy settings is made in the config directory wich contains 2 files :
-<ul>
-  <li>ivysettings.properties : a property file</li>
-  <li>ivysettings.xml : the file containing the ivy settings</li>
-</ul>
-
-Let's analyse the ivysettings.xml file.
-<code>
-<ivysettings>
-        <properties file="${ivy.settings.dir}/ivysettings.properties" />
-        <settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="libraries" />
-        <resolvers>
-                <filesystem name="projects">
-                        <artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
-                        <ivy pattern="${repository.dir}/[module]-[revision].xml" />
-                </filesystem>
-                <ivyrep name="libraries" />
-        </resolvers>
-        <modules>
-                <module organisation="jayasoft" name=".*" resolver="projects" />
-        </modules>
-</ivysettings>
-</code>
-The file contains four main tags: properties, settings, resolvers and modules.
-<h2>the <b>properties</b> tag</h2>
-This tag only load some properties for the ivy process in the same manner as ant will do it.
-<h2>the <b>settings</b> tag</h2>
-This tag is in charge to initialize some parameters for ivy process. The directory that ivy will use to cache (to store) artifacts found will be in a sub directory called ivy-cache of the directory containing the ivysettings.xml file itself. 
-The second parameter, tells ivy to use a resolver called "libraries" as its default resolver. As a recall, a resolver is in charge to resolve an artifact from some information like: the organisation that provides the artifact, the name of the library and the version of the library. More information can be found in the <a href="../../doc/configuration.html">settings documentation</a>.
-<h2>the <b>resolvers</b> tag</h2>
-This tag defines the resolvers to use. Here we have two resolvers defined: "projects" and "libraries".
-The filesystem resolver called "projects" is able to resolve the internal dependencies wanted. 
-The ivyrep resolver called "libraries" is able to find dependencies on <a href="../../ivyrep.html">ivyrep</a>.
-<h2>the <b>modules</b> tag</h2>
-The modules tag allows to configure which resolver should be use for which module. Here the settings only tells to use the "projects" resolver for all modules having for organisation "jayasoft" and any module name (.* regexp matches any module name).
-For other modules (i.e. all modules not from jayasoft), since there is no special settings, the default resolver will be used: "libraries".
-<h1>walkthrough</h1>
-<div class="step">
-<h2>step 1: preparation</h2>
-Open a DOS or shell window, and go to the "dependance" directory.
-</div>
-<div class="step">
-<h2>step 2: clean directory tree</h2>
-On the prompt type : ant
-This will clean up the entire project directory tree. You can do it each time you want to clean up this example.
-</div>
-<div class="step">
-<h2>step 3: publication of standalone project</h2>
-Goto standalone directory  and publish the project
-<div class="shell"><pre>I:\standalone>ant publish
-Buildfile: build.xml
-
-configure:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-
-resolve:
-:: resolving dependencies :: jayasoft/standalone-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] (6672ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   1   |   1   |   0   |   0   ||   1   |   1   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/standalone
-        confs: [default]
-        1 artifacts copied, 0 already retrieved
-
-compile:
-    [mkdir] Created dir: I:\standalone\build\classes
-    [javac] Compiling 1 source file to I:\standalone\build\classes
-
-jar:
-[propertyfile] Creating new property file: I:\standalone\build\classes\version.properties
-      [jar] Building jar: I:\standalone\build\standalone.jar
-
-publish:
-:: delivering :: jayasoft/standalone-working@xmen :: 1 :: release :: Wed Apr 27 08:41:47 CEST 2005
-        delivering ivy file to I:\standalone/build/ivy.xml
-:: publishing :: jayasoft/standalone-working@xmen
-        published standalone to I:\config\repository\standalone-1.jar
-        published ivy to I:\config\repository\standalone-1.xml
-     [echo] project standalone released with version 1
-
-BUILD SUCCESSFUL
-Total time: 10 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>
-To give more details on the publish, as you can see the call to the publish task has resulted in two main things:
-- the delivery of a resolved ivy file to build/ivy.xml. This has been done because by default the publish task not only publishes artifacts but also ivy file. So it has looked to the path where the ivy file to publish should be, using the artifactspattern: ${build.dir}/[artifact].[ext].
-For an ivy file, this resolves to build/ivy.xml. Because this file does not exist, it automatically make a call to the deliver task which delivers a resolved ivy file to this destination.
-- the publication of artifact standalone and resolved ivy file to the repository. Both are mere copy of files found in the current project, more precisely in the build dir. This is because the artifactspattern has been set to ${build.dir}/[artifact].[ext], so standalone artifact is found in build/standalone.jar and ivy file in build/ivy.xml. And because we have asked the publish task to publish them using the "projects" resolver, these files are copied to repository\standalone-1.jar and to repository\standalone-1.xml, respecting the artifact and ivy patterns of our settings (see above).
-
-<div class="step">
-<h2>step 4: running the depending project</h2>
-Goto to directory depending and run ant
-<div class="shell"><pre>I:\depending>ant
-Buildfile: build.xml
-
-clean:
-
-configure:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-
-resolve:
-:: resolving dependencies :: jayasoft/depending-working@xmen
-        confs: [default]
-        [1] jayasoft/standalone
-downloading file:/I:/config/repository/standalone-1.jar(1) ...
-. (1kB)
-        [SUCCESSFUL ] jayasoft/standalone-1/standalone.jar[jar] (15ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   2   |   2   |   2   |   0   ||   2   |   1   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/depending
-        confs: [default]
-        2 artifacts copied, 0 already retrieved
-
-compile:
-    [mkdir] Created dir: I:\depending\build\classes
-    [javac] Compiling 1 source file to I:\depending\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 the version 1 of the project standalone. The call to standalone.Main.getVersion() has returned 1. If you look in the depending/lib directory, you should see standalone-1.jar which is the artifact version 1 of the project standalone</li>
-  <li>the call to standalone.Main.capitalizeWords(str) succeed, which means that the required library were in the classpath. If you look at the lib directory, you will see that the library commons-lang-2.0.jar was retrieved. This library was declared to be used by the project "standalone", so ivy get it too for the dependant project.</li>
-</ul>
-</div>
-<div class="step">
-<h2>step 5 : new version of standalone project</h2>
-Like we did before in step 3, publish again the standalone project. This will result as a new version of the project.
-<div class="shell"><pre>I:\standalone>ant publish
-Buildfile: build.xml
-
-configure:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-
-resolve:
-:: resolving dependencies :: jayasoft/standalone-working@xmen
-        confs: [default]
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   1   |   0   |   0   |   0   ||   1   |   0   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/standalone
-        confs: [default]
-        0 artifacts copied, 1 already retrieved
-
-compile:
-
-jar:
-[propertyfile] Updating property file: I:\standalone\build\classes\version.properties
-      [jar] Building jar: I:\standalone\build\standalone.jar
-
-publish:
-   [delete] Deleting: I:\standalone\build\ivy.xml
-:: delivering :: jayasoft/standalone-working@xmen :: 2 :: release :: Wed Apr 27 09:17:13 CEST 2005
-        delivering ivy file to I:\standalone/build/ivy.xml
-:: publishing :: jayasoft/standalone-working@xmen
-        published standalone to I:\config\repository\standalone-2.jar
-        published ivy to I:\config\repository\standalone-2.xml
-     [echo] project standalone released with version 2
-
-BUILD SUCCESSFUL
-Total time: 2 seconds</pre></div>
-Now if you look in your repository folder, you must find 2 version published of the standalone project.
-Let's look at it:
-<div class="shell"><pre>I:\dependence\standalone>dir ..\config\repository /w
- Le volume dans le lecteur I s'appelle DATA
- Le numéro de série du volume est 30E5-91BA
-
- Répertoire de I:\dependence\config\repository
-
-[.]                [..]               standalone-1.jar   standalone-1.xml   standalone-2.jar   standalone-2.xml
-               4 fichier(s)            3 936 octets
-               2 Rép(s)   9 874 350 080 octets libres
-
-I:\dependence\standalone></pre></div>
-</div>
-Ok now our repository contains two versions of the project <b>standalone</b>, other projects can refer to both versions.
-<div class="step">
-<h2>step 6 : depending got the new version</h2>
-What do we expect about running again the depending project? Two major things are expected: 
-<ul>
-  <li>retrieve the version 2 as the latest.integration version of the standalone project</li>
-  <li>running the test must display version 2 of standalone project</li>
-</ul>
-Let's go!!!
-<div class="shell"><pre>I:\depending>ant
-Buildfile: build.xml
-
-clean:
-   [delete] Deleting 3 files from I:\depending
-   [delete] Deleted 4 directories from I:\depending
-
-configure:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-
-resolve:
-:: resolving dependencies :: jayasoft/depending-working@xmen
-        confs: [default]
-        [2] jayasoft/standalone
-downloading file:/I:/config/repository/standalone-2.jar(2) ...
-. (1kB)
-        [SUCCESSFUL ] jayasoft/standalone-2/standalone.jar[jar] (0ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   2   |   2   |   2   |   0   ||   2   |   1   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/depending
-        confs: [default]
-        2 artifacts copied, 0 already retrieved
-
-compile:
-    [mkdir] Created dir: I:\depending\build\classes
-    [javac] Compiling 1 source file to I:\depending\build\classes
-
-run:
-     [java] you are using version 2 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>
-Ok we have the result expected as the run target shows that we are using the version 2 of the main class of standalone project. If we take a look at the resolve target results, we can see that one artifact has been downloaded to the ivy cache. In fact this file is the version 2 of the standalone project that was taken from the repository, you can now retrieve it in the ivy-cache directory.
-</div>
-
-	</textarea>
-<script type="text/javascript">xooki.postProcess();</script>
-</body>
-</html>
+<!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: 2};</script>	
+	<script type="text/javascript" src="../../xooki/xooki.js"></script>
+</head>
+<body>
+	<textarea id="xooki-source">
+This example is an illustration of dependency between two project.
+
+The dependant project declares that it uses the standalone one. We will illustrate two things : 
+<ul>
+  <li>public libraries declared by standalone project will automatically be recovered by the dependant project</li>
+  <li>the dependant project will retrieve the "latest" version of the standalone project</li>
+</ul>
+<h1>the projects used</h1>
+<h2>the project : standalone</h2>
+The standalone project is very simple. It depends on the apache library commons-lang and contains only one class: standalone.Main which provides two services:
+<ul>
+  <li>return the version of the project</li>
+  <li>capitalize a string using org.apache.commons.lang.WordUtils.capitalizeFully</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 ivy project file</li>
+  <li>src\standalone\Main.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="standalone" />
+    <dependencies>
+        <dependency org="apache" name="commons-lang" rev="2.0" />
+    </dependencies>
+</ivy-module>
+</code>
+
+The ivy dependency file declares only one dependency on apache commons-lang library which by default is a public dependency (see <a href="../../doc/ivyfile.html">ivy file definition</a>).
+<h2>the project : depending</h2>
+The project depending is very simple too. It declares only one dependency on the latest version of the standalone project and it contains only one class depending.Main which make 2 things:
+<ul>
+  <li>getting the version of the standalone project throw a call to standalone.Main.getVersion()</li>
+  <li>transform a string throw a call to standalone.Main.capitalizeWords(str)</li>
+</ul>
+Take a look at it's <b>ivy.xml</b> file:
+<code>
+<ivy-module version="1.0">
+    <info organisation="jayasoft" module="depending" />
+    <dependencies>
+        <dependency name="standalone" rev="latest.integration" />
+    </dependencies>
+</ivy-module>
+</code>
+
+<h2>the <b>ivy</b> settings</h2>
+The ivy settings is made in the config directory wich contains 2 files :
+<ul>
+  <li>ivysettings.properties : a property file</li>
+  <li>ivysettings.xml : the file containing the ivy settings</li>
+</ul>
+
+Let's analyse the ivysettings.xml file.
+<code>
+<ivysettings>
+        <properties file="${ivy.settings.dir}/ivysettings.properties" />
+        <settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="libraries" />
+        <resolvers>
+                <filesystem name="projects">
+                        <artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
+                        <ivy pattern="${repository.dir}/[module]-[revision].xml" />
+                </filesystem>
+                <ivyrep name="libraries" />
+        </resolvers>
+        <modules>
+                <module organisation="jayasoft" name=".*" resolver="projects" />
+        </modules>
+</ivysettings>
+</code>
+The file contains four main tags: properties, settings, resolvers and modules.
+<h2>the <b>properties</b> tag</h2>
+This tag only load some properties for the ivy process in the same manner as ant will do it.
+<h2>the <b>settings</b> tag</h2>
+This tag is in charge to initialize some parameters for ivy process. The directory that ivy will use to cache (to store) artifacts found will be in a sub directory called ivy-cache of the directory containing the ivysettings.xml file itself. 
+The second parameter, tells ivy to use a resolver called "libraries" as its default resolver. As a recall, a resolver is in charge to resolve an artifact from some information like: the organisation that provides the artifact, the name of the library and the version of the library. More information can be found in the <a href="../../doc/configuration.html">settings documentation</a>.
+<h2>the <b>resolvers</b> tag</h2>
+This tag defines the resolvers to use. Here we have two resolvers defined: "projects" and "libraries".
+The filesystem resolver called "projects" is able to resolve the internal dependencies wanted. 
+The ivyrep resolver called "libraries" is able to find dependencies on <a href="../../ivyrep.html">ivyrep</a>.
+<h2>the <b>modules</b> tag</h2>
+The modules tag allows to configure which resolver should be use for which module. Here the settings only tells to use the "projects" resolver for all modules having for organisation "jayasoft" and any module name (.* regexp matches any module name).
+For other modules (i.e. all modules not from jayasoft), since there is no special settings, the default resolver will be used: "libraries".
+<h1>walkthrough</h1>
+<div class="step">
+<h2>step 1: preparation</h2>
+Open a DOS or shell window, and go to the "dependance" directory.
+</div>
+<div class="step">
+<h2>step 2: clean directory tree</h2>
+On the prompt type : ant
+This will clean up the entire project directory tree. You can do it each time you want to clean up this example.
+</div>
+<div class="step">
+<h2>step 3: publication of standalone project</h2>
+Goto standalone directory  and publish the project
+<div class="shell"><pre>I:\standalone>ant publish
+Buildfile: build.xml
+
+configure:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+
+resolve:
+:: resolving dependencies :: jayasoft/standalone-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] (6672ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   1   |   1   |   0   |   0   ||   1   |   1   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/standalone
+        confs: [default]
+        1 artifacts copied, 0 already retrieved
+
+compile:
+    [mkdir] Created dir: I:\standalone\build\classes
+    [javac] Compiling 1 source file to I:\standalone\build\classes
+
+jar:
+[propertyfile] Creating new property file: I:\standalone\build\classes\version.properties
+      [jar] Building jar: I:\standalone\build\standalone.jar
+
+publish:
+:: delivering :: jayasoft/standalone-working@xmen :: 1 :: release :: Wed Apr 27 08:41:47 CEST 2005
+        delivering ivy file to I:\standalone/build/ivy.xml
+:: publishing :: jayasoft/standalone-working@xmen
+        published standalone to I:\config\repository\standalone-1.jar
+        published ivy to I:\config\repository\standalone-1.xml
+     [echo] project standalone released with version 1
+
+BUILD SUCCESSFUL
+Total time: 10 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>
+To give more details on the publish, as you can see the call to the publish task has resulted in two main things:
+- the delivery of a resolved ivy file to build/ivy.xml. This has been done because by default the publish task not only publishes artifacts but also ivy file. So it has looked to the path where the ivy file to publish should be, using the artifactspattern: ${build.dir}/[artifact].[ext].
+For an ivy file, this resolves to build/ivy.xml. Because this file does not exist, it automatically make a call to the deliver task which delivers a resolved ivy file to this destination.
+- the publication of artifact standalone and resolved ivy file to the repository. Both are mere copy of files found in the current project, more precisely in the build dir. This is because the artifactspattern has been set to ${build.dir}/[artifact].[ext], so standalone artifact is found in build/standalone.jar and ivy file in build/ivy.xml. And because we have asked the publish task to publish them using the "projects" resolver, these files are copied to repository\standalone-1.jar and to repository\standalone-1.xml, respecting the artifact and ivy patterns of our settings (see above).
+
+<div class="step">
+<h2>step 4: running the depending project</h2>
+Goto to directory depending and run ant
+<div class="shell"><pre>I:\depending>ant
+Buildfile: build.xml
+
+clean:
+
+configure:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+
+resolve:
+:: resolving dependencies :: jayasoft/depending-working@xmen
+        confs: [default]
+        [1] jayasoft/standalone
+downloading file:/I:/config/repository/standalone-1.jar(1) ...
+. (1kB)
+        [SUCCESSFUL ] jayasoft/standalone-1/standalone.jar[jar] (15ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   2   |   2   |   2   |   0   ||   2   |   1   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/depending
+        confs: [default]
+        2 artifacts copied, 0 already retrieved
+
+compile:
+    [mkdir] Created dir: I:\depending\build\classes
+    [javac] Compiling 1 source file to I:\depending\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 the version 1 of the project standalone. The call to standalone.Main.getVersion() has returned 1. If you look in the depending/lib directory, you should see standalone-1.jar which is the artifact version 1 of the project standalone</li>
+  <li>the call to standalone.Main.capitalizeWords(str) succeed, which means that the required library were in the classpath. If you look at the lib directory, you will see that the library commons-lang-2.0.jar was retrieved. This library was declared to be used by the project "standalone", so ivy get it too for the dependant project.</li>
+</ul>
+</div>
+<div class="step">
+<h2>step 5 : new version of standalone project</h2>
+Like we did before in step 3, publish again the standalone project. This will result as a new version of the project.
+<div class="shell"><pre>I:\standalone>ant publish
+Buildfile: build.xml
+
+configure:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+
+resolve:
+:: resolving dependencies :: jayasoft/standalone-working@xmen
+        confs: [default]
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   1   |   0   |   0   |   0   ||   1   |   0   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/standalone
+        confs: [default]
+        0 artifacts copied, 1 already retrieved
+
+compile:
+
+jar:
+[propertyfile] Updating property file: I:\standalone\build\classes\version.properties
+      [jar] Building jar: I:\standalone\build\standalone.jar
+
+publish:
+   [delete] Deleting: I:\standalone\build\ivy.xml
+:: delivering :: jayasoft/standalone-working@xmen :: 2 :: release :: Wed Apr 27 09:17:13 CEST 2005
+        delivering ivy file to I:\standalone/build/ivy.xml
+:: publishing :: jayasoft/standalone-working@xmen
+        published standalone to I:\config\repository\standalone-2.jar
+        published ivy to I:\config\repository\standalone-2.xml
+     [echo] project standalone released with version 2
+
+BUILD SUCCESSFUL
+Total time: 2 seconds</pre></div>
+Now if you look in your repository folder, you must find 2 version published of the standalone project.
+Let's look at it:
+<div class="shell"><pre>I:\dependence\standalone>dir ..\config\repository /w
+ Le volume dans le lecteur I s'appelle DATA
+ Le numéro de série du volume est 30E5-91BA
+
+ Répertoire de I:\dependence\config\repository
+
+[.]                [..]               standalone-1.jar   standalone-1.xml   standalone-2.jar   standalone-2.xml
+               4 fichier(s)            3 936 octets
+               2 Rép(s)   9 874 350 080 octets libres
+
+I:\dependence\standalone></pre></div>
+</div>
+Ok now our repository contains two versions of the project <b>standalone</b>, other projects can refer to both versions.
+<div class="step">
+<h2>step 6 : depending got the new version</h2>
+What do we expect about running again the depending project? Two major things are expected: 
+<ul>
+  <li>retrieve the version 2 as the latest.integration version of the standalone project</li>
+  <li>running the test must display version 2 of standalone project</li>
+</ul>
+Let's go!!!
+<div class="shell"><pre>I:\depending>ant
+Buildfile: build.xml
+
+clean:
+   [delete] Deleting 3 files from I:\depending
+   [delete] Deleted 4 directories from I:\depending
+
+configure:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+
+resolve:
+:: resolving dependencies :: jayasoft/depending-working@xmen
+        confs: [default]
+        [2] jayasoft/standalone
+downloading file:/I:/config/repository/standalone-2.jar(2) ...
+. (1kB)
+        [SUCCESSFUL ] jayasoft/standalone-2/standalone.jar[jar] (0ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   2   |   2   |   2   |   0   ||   2   |   1   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/depending
+        confs: [default]
+        2 artifacts copied, 0 already retrieved
+
+compile:
+    [mkdir] Created dir: I:\depending\build\classes
+    [javac] Compiling 1 source file to I:\depending\build\classes
+
+run:
+     [java] you are using version 2 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>
+Ok we have the result expected as the run target shows that we are using the version 2 of the main class of standalone project. If we take a look at the resolve target results, we can see that one artifact has been downloaded to the ivy cache. In fact this file is the version 2 of the standalone project that was taken from the repository, you can now retrieve it in the ivy-cache directory.
+</div>
+
+	</textarea>
+<script type="text/javascript">xooki.postProcess();</script>
+</body>
+</html>

Propchange: incubator/ivy/core/trunk/doc/doc/tutorial/multi-project.html
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/multiple.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/multiple.html?view=diff&rev=536488&r1=536487&r2=536488
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/multiple.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/multiple.html Wed May  9 03:58:10 2007
@@ -1,134 +1,134 @@
-<!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: 2};</script>	
-	<script type="text/javascript" src="../../xooki/xooki.js"></script>
-</head>
-<body>
-	<textarea id="xooki-source">
-This example is an illustration of how artifacts can be retrieved by multiple resolvers. Using multiple resolvers is very important when using continous integration. Indeed, in such environments, you can use multiple repositories and so multiple resolvers to retrieve both released versions of projects than continous integrated versions produced for example with cruise-control. In our example, we will just show how to use two resolvers, one on a local repository and one using ibiblio repository.
-
-<h1>project description</h1>
-<h2>the project : chained-resolvers</h2>
-The project is very simple and contains only one test class : example.Hello
-It depends on two libraries apache commons-lang and a little test library (sources are included in jar file). The test library is used by the project to uppercase a string, and commons-lang is used to capitalize the same string.
-
-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="chained-resolvers" />
-    <dependencies>
-        <dependency org="apache" name="commons-lang" rev="2.0" />
-        <dependency name="test" rev="1.0" />
-    </dependencies>
-</ivy-module>
-</code>
-As we expect, the ivy file declares to be dependent on the two libraries that the project use : apache commons-lang.jar and test.jar.
-
-<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="chain-example" />
-  <resolvers>
-    <chain name="chain-example">
-      <filesystem name="libraries">
-        <artifact pattern="${ivy.settings.dir}/repository/[artifact]-[revision].[type]" />
-      </filesystem>
-      <ibiblio name="ibiblio" />
-    </chain>
-  </resolvers>
-</ivysettings>
-</code>
-<h2>the <b>settings</b> tag</h2>
-This tag initializes ivy with some parameters. Here only one is used, the name of the resolver to use by default.
-
-<h2>the <b>resolvers</b> tag</h2>
-Under this tag, we can find the description of the resolvers that ivy will use. In our example, we have only one resolver, called "chain-example", which is quite special as it defines a list (a chain) of resolvers.
-The resolvers put in the chain are : 
-<ul>
-  <li>libraries : it is a file resolver. This one is configured to look for artifacts in the "repository" sub directory of the directory that contains the ivysettings.xml file.</li>
-  <li>ibiblio : this resolver is a special one. It looks in the ibiblio maven repository to retrieve the libraries.</li>
-</ul>
-
-<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 it each time you want to clean up this example.
-</div>
-<div class="step">
-<h2>step 3 : run the project</h2>
-Goto chainedresolvers-project directory. And simply run <b>ant</b>.
-<div class="shell"><pre>I:\chained-resolvers\chainedresolvers-project>ant
-Buildfile: build.xml
-
-configure:
-:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
-
-resolve:
-:: resolving dependencies :: jayasoft/chained-resolvers-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] (5390ms)
-downloading file:/I:/chained-resolvers/config/repository/test-1.0.jar(1.0) ...
-. (1kB)
-        [SUCCESSFUL ] jayasoft/test-1.0/test.jar[jar] (16ms)
-:: resolution report ::
-        ---------------------------------------------------------------------
-        |                  |            modules            ||   artifacts   |
-        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
-        ---------------------------------------------------------------------
-        |      default     |   2   |   2   |   0   |   0   ||   2   |   2   |
-        ---------------------------------------------------------------------
-:: retrieving :: jayasoft/chained-resolvers
-        confs: [default]
-        2 artifacts copied, 0 already retrieved
-
-run:
-    [mkdir] Created dir: I:\chained-resolvers\chainedresolvers-project\build
-    [javac] Compiling 1 source file to I:\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: 9 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). The run target succeed in using both commons-lang.jar comming from ibiblio repository and test.jar coming from the local repository.
-
-	</textarea>
-<script type="text/javascript">xooki.postProcess();</script>
-</body>
-</html>
+<!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: 2};</script>	
+	<script type="text/javascript" src="../../xooki/xooki.js"></script>
+</head>
+<body>
+	<textarea id="xooki-source">
+This example is an illustration of how artifacts can be retrieved by multiple resolvers. Using multiple resolvers is very important when using continous integration. Indeed, in such environments, you can use multiple repositories and so multiple resolvers to retrieve both released versions of projects than continous integrated versions produced for example with cruise-control. In our example, we will just show how to use two resolvers, one on a local repository and one using ibiblio repository.
+
+<h1>project description</h1>
+<h2>the project : chained-resolvers</h2>
+The project is very simple and contains only one test class : example.Hello
+It depends on two libraries apache commons-lang and a little test library (sources are included in jar file). The test library is used by the project to uppercase a string, and commons-lang is used to capitalize the same string.
+
+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="chained-resolvers" />
+    <dependencies>
+        <dependency org="apache" name="commons-lang" rev="2.0" />
+        <dependency name="test" rev="1.0" />
+    </dependencies>
+</ivy-module>
+</code>
+As we expect, the ivy file declares to be dependent on the two libraries that the project use : apache commons-lang.jar and test.jar.
+
+<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="chain-example" />
+  <resolvers>
+    <chain name="chain-example">
+      <filesystem name="libraries">
+        <artifact pattern="${ivy.settings.dir}/repository/[artifact]-[revision].[type]" />
+      </filesystem>
+      <ibiblio name="ibiblio" />
+    </chain>
+  </resolvers>
+</ivysettings>
+</code>
+<h2>the <b>settings</b> tag</h2>
+This tag initializes ivy with some parameters. Here only one is used, the name of the resolver to use by default.
+
+<h2>the <b>resolvers</b> tag</h2>
+Under this tag, we can find the description of the resolvers that ivy will use. In our example, we have only one resolver, called "chain-example", which is quite special as it defines a list (a chain) of resolvers.
+The resolvers put in the chain are : 
+<ul>
+  <li>libraries : it is a file resolver. This one is configured to look for artifacts in the "repository" sub directory of the directory that contains the ivysettings.xml file.</li>
+  <li>ibiblio : this resolver is a special one. It looks in the ibiblio maven repository to retrieve the libraries.</li>
+</ul>
+
+<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 it each time you want to clean up this example.
+</div>
+<div class="step">
+<h2>step 3 : run the project</h2>
+Goto chainedresolvers-project directory. And simply run <b>ant</b>.
+<div class="shell"><pre>I:\chained-resolvers\chainedresolvers-project>ant
+Buildfile: build.xml
+
+configure:
+:: Ivy 1.0-rc3 - 20050421161206 :: http://ivy.jayasoft.org/ ::
+
+resolve:
+:: resolving dependencies :: jayasoft/chained-resolvers-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] (5390ms)
+downloading file:/I:/chained-resolvers/config/repository/test-1.0.jar(1.0) ...
+. (1kB)
+        [SUCCESSFUL ] jayasoft/test-1.0/test.jar[jar] (16ms)
+:: resolution report ::
+        ---------------------------------------------------------------------
+        |                  |            modules            ||   artifacts   |
+        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
+        ---------------------------------------------------------------------
+        |      default     |   2   |   2   |   0   |   0   ||   2   |   2   |
+        ---------------------------------------------------------------------
+:: retrieving :: jayasoft/chained-resolvers
+        confs: [default]
+        2 artifacts copied, 0 already retrieved
+
+run:
+    [mkdir] Created dir: I:\chained-resolvers\chainedresolvers-project\build
+    [javac] Compiling 1 source file to I:\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: 9 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). The run target succeed in using both commons-lang.jar comming from ibiblio repository and test.jar coming from the local repository.
+
+	</textarea>
+<script type="text/javascript">xooki.postProcess();</script>
+</body>
+</html>

Propchange: incubator/ivy/core/trunk/doc/doc/tutorial/multiple.html
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: incubator/ivy/core/trunk/doc/doc/tutorial/multiproject.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/doc/tutorial/multiproject.html?view=diff&rev=536488&r1=536487&r2=536488
==============================================================================
--- incubator/ivy/core/trunk/doc/doc/tutorial/multiproject.html (original)
+++ incubator/ivy/core/trunk/doc/doc/tutorial/multiproject.html Wed May  9 03:58:10 2007
@@ -1,187 +1,187 @@
-<!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: 2};</script>	
-	<script type="text/javascript" src="../../xooki/xooki.js"></script>
-</head>
-<body>
-	<textarea id="xooki-source">
-<strong>Warning: tutorial in progress !</strong>
-
-In the previous tutorial you have seen how to deal with dependencies between two simple projects.
-
-This tutorial will guide you through the use of ivy in a more complete environment. All the sources of this tutorial are available in src/example/multi-project in ivy distribution (warning: the sources attached with ivy 1.3 contain an error in the common.xml file. Please use either latest build to find proper example sources or replace the common.xml file with <a href="../../samples/multi-project/common.xml">this one</a>).
-
-<h1>Context</h1>
-Here is a 10000ft overview of the projects involved in this tutorial:
-<ul>
-<li>version</li> helps to identify module by a version
-<li>list</li> gives a list of files in a directory (recursively)
-<li>size</li> gives the total size of all files in a directory, or of a collection of files
-<li>find</li> find files in a given dir or among a list of files which match a given name
-<li>sizewhere</li> gives the total size of files matching a name in a directory
-<li>console</li> give access to all other modules features through a simple console app
-</ul>
-For sure this is not aimed to demonstrate how to develop a complex app or give indication of advanced algorithm :-)
-
-But this gives a simple understanding of how ivy can be used to develop an application divided in multiple modules.
-
-Now, here is how these modules relate to each other:
-<a href="../../samples/projects-dependencies-graph.jpg"><img src="../../samples/projects-dependencies-graph-small.jpg" alt="dependencies graph"/><br/><center><i>click to enlarge</i></center></a>
-
-Modules in yellow are the modules described in this tutorial, and modules in blue are external dependencies (we will see how to generate this graph later in this tutorial).
-
-As you can see, we have here a pretty interesting set of modules with dependencies between each other, each depending on the latest version of the others.
-
-<h1>The example files</h1>
-The sources for this tutorial can be found in src/example/multi-project in the ivy distribution. In this directory, you will find the following files:
-<ul>
-<li><a href="./misc/ivy/samples/multi-project/build.xml">build.xml</a></li>This is a root build file which can be used to call targets on all modules, in the order of their dependencies (ensuring that a module is always built before any module depending on it, for instance)
-<li>common
-<ul>
-<li><a href="./misc/ivy/samples/multi-project/common.xml">common.xml</a></li> the common build file imported by all build.xml files for each project. This build defines the targets which can be used in all projects.
-<li>build.properties</li>some properties common to all projects
-</ul>
-</li>
-<li>projects</li>
-contains a directory per module, with for each
-<ul>
-<li>ivy.xml</li>Ivy file of the module, describing its dependencies upon other modules and / or external modules.
-Example:
-<code type="xml">
-<ivy-module version="1.0">
-    <info 
-        organisation="jayasoft"
-        module="find"
-        status="integration"/>
-    <configurations>
-      <conf name="core"/>
-      <conf name="standalone" extends="core"/>
-    </configurations>
-    <publications>
-      <artifact name="find" type="jar" conf="core" />
-    </publications>
-    <dependencies>
-      <dependency name="version" rev="latest.integration" conf="core->default" />
-      <dependency name="list" rev="latest.integration" conf="core" />
-      <dependency org="apache" name="commons-collections" rev="3.1" conf="core->default" />
-      <dependency org="apache" name="commons-cli" rev="1.0" conf="standalone->default" />
-    </dependencies>
-</ivy-module>
-</code>
-<li>build.xml</li>The build file of the project, which consists mainly in an import of the common build file and of a module specific properties file:
-<code type="xml">
-<project name="find" default="compile">
-	<property file="build.properties"/>
-	
-	<import file="${common.dir}/common.xml"/>
-</project>
-</code>
-<li>build.properties</li>Module specific properties + properties to find the common build file
-<code>
-projects.dir = ${basedir}/..
-wkspace.dir = ${projects.dir}/..
-common.dir = ${wkspace.dir}/common
-</code>
-<li>src</li> the source directory with all java sources
-</ul>
-</ul>
-
-Note that this doesn't demonstrate good practice for software development in general, in particular you won't find any unit test in this samples, even if we think unit testing is very important. But this isn't the aim of this tutorial.
-
-Now that you are a bit more familiar with the structure, let's have a look at the most important part of this example: the common build file. Indeed, as you have seen all modules build files only import the common build file, and defines their dependencies in their ivy files (with which you should begin to be familiar).
-
-So, here are some aspects of this common build file:
-<h2>ivy settings</h2>
-<code type="xml">
-<target name="configure">
-    <!-- setup ivy default configuration with some custom info -->
-    <property name="ivy.local.default.root" value="${repository.dir}/local"/>
-    <property name="ivy.shared.default.root" value="${repository.dir}/shared"/>
-
-    <!-- here is how we would have configured ivy if we had our own ivysettings file
-        <ivy:configure file="${common.dir}/ivysettings.xml" />
-    -->
-</target>
-</code>
-
-This target configures ivy only by setting two properties: the location for the local repository and the location for the shared repository. It's the only settings done here, since ivy 1.3 is configured by default to work in a team environment (see <a href="../../tutorial/defaultconf.html">default settings tutorial</a> for details about this). For sure in a real environment the shared repository location would rather be in a team shared directory (or in a more complex repository, again see the default settings tutorial to see how to use something really different).
-This target only indicates in comments how the settings would have been done if the default settings wasn't ok for our purpose.
-
-<h2>resolve dependencies</h2>
-<code type="xml">
-<target name="resolve" depends="configure, clean-lib" description="--> retrieve dependencies with ivy">
-    <mkdir dir="${lib.dir}"/> <!-- not usually necessary, ivy creates the directory IF there are dependencies -->
-    <!-- this target is named resolve even if we do a retrieve: 
-         in fact a resolve will be called, and then the retrieve will simply copy files in the lib directory -->
-    <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" />
-</target>
-</code>
-Here we see that we only call a retrieve task, the resolve being done automatically with default parameters (which are ok in our case). So here nothing special, we simply use ivy to retrieve dependencies in the lib directory, putting artifacts without revision in their names (it's easier to use with an ide, for instance).
-
-<h2>publish</h2>
-<code type="xml">
-<target name="publish" depends="clean-build, new-version, jar" description="--> publish this project in the ivy repository">
-    <property name="revision" value="${version}"/>
-    <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]" 
-        resolver="shared"
-        pubrevision="${revision}" 
-        status="release"
-    	/>
-    <echo message="project ${ant.project.name} released with version ${revision}" />
-</target>
-</code>
-This target let publish the module in the shared repository, with the revision found in the version property, which is set by other targets. It can be used when a module reaches a specific milestone, or whenever you want the teeam to benefit from a new version of the module.
-<h2>publish-local</h2>
-<code type="xml">
-<target name="publish-local" depends="local-version, jar" description="--> publish this project in the local ivy repository">
-    <delete file="${build.dir}/ivy.xml"/> <!-- delete last produced ivy file to be sure a new one will be generated -->
-    <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]" 
-        resolver="local"
-        pubrevision="${revision}"
-        pubdate="${now}"
-        status="integration"
-    	/>
-    <echo message="project ${ant.project.name} published locally with version ${revision}" />
-</target>
-</code>
-This is very similar to the publish task, except that this publish the revision in the local repository, which is used only in your environment and doesn't disturb the team. When you change something in a module and want to benefit from the change in another one, you can simply call publish-local in this module, and then your next build of the other module will automatically get this local version.
-<h2>clean-local</h2>
-<code type="xml">
-<target name="clean-local" depends="configure" description="cleans the local repository for the current module">
-    <delete dir="${ivy.local.default.root}/${ant.project.name}"/>
-</target>
-</code>
-This target is used when you don't want to use your local version of a module anymore, for example when you release a new version to the whole team.
-<h2>report</h2>
-<code type="xml">
-<target name="report" depends="resolve" description="--> generates a report of dependencies">
-    <ivy:report todir="${build.dir}"/>
-</target>
-</code>
-Generates both an html report and a graphml report.
-
-For example, to generate a graph like the one shown at the beginning of this tutorial, you just have to follow the instructions given <a href="../yed.html">here</a> with the graphml file you will find in <code>projects/console/build/</code> after having called report in the console project, and that's it, you have a clear overview of all your app dependencies !
-	</textarea>
-<script type="text/javascript">xooki.postProcess();</script>
-</body>
-</html>
+<!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: 2};</script>	
+	<script type="text/javascript" src="../../xooki/xooki.js"></script>
+</head>
+<body>
+	<textarea id="xooki-source">
+<strong>Warning: tutorial in progress !</strong>
+
+In the previous tutorial you have seen how to deal with dependencies between two simple projects.
+
+This tutorial will guide you through the use of ivy in a more complete environment. All the sources of this tutorial are available in src/example/multi-project in ivy distribution (warning: the sources attached with ivy 1.3 contain an error in the common.xml file. Please use either latest build to find proper example sources or replace the common.xml file with <a href="../../samples/multi-project/common.xml">this one</a>).
+
+<h1>Context</h1>
+Here is a 10000ft overview of the projects involved in this tutorial:
+<ul>
+<li>version</li> helps to identify module by a version
+<li>list</li> gives a list of files in a directory (recursively)
+<li>size</li> gives the total size of all files in a directory, or of a collection of files
+<li>find</li> find files in a given dir or among a list of files which match a given name
+<li>sizewhere</li> gives the total size of files matching a name in a directory
+<li>console</li> give access to all other modules features through a simple console app
+</ul>
+For sure this is not aimed to demonstrate how to develop a complex app or give indication of advanced algorithm :-)
+
+But this gives a simple understanding of how ivy can be used to develop an application divided in multiple modules.
+
+Now, here is how these modules relate to each other:
+<a href="../../samples/projects-dependencies-graph.jpg"><img src="../../samples/projects-dependencies-graph-small.jpg" alt="dependencies graph"/><br/><center><i>click to enlarge</i></center></a>
+
+Modules in yellow are the modules described in this tutorial, and modules in blue are external dependencies (we will see how to generate this graph later in this tutorial).
+
+As you can see, we have here a pretty interesting set of modules with dependencies between each other, each depending on the latest version of the others.
+
+<h1>The example files</h1>
+The sources for this tutorial can be found in src/example/multi-project in the ivy distribution. In this directory, you will find the following files:
+<ul>
+<li><a href="./misc/ivy/samples/multi-project/build.xml">build.xml</a></li>This is a root build file which can be used to call targets on all modules, in the order of their dependencies (ensuring that a module is always built before any module depending on it, for instance)
+<li>common
+<ul>
+<li><a href="./misc/ivy/samples/multi-project/common.xml">common.xml</a></li> the common build file imported by all build.xml files for each project. This build defines the targets which can be used in all projects.
+<li>build.properties</li>some properties common to all projects
+</ul>
+</li>
+<li>projects</li>
+contains a directory per module, with for each
+<ul>
+<li>ivy.xml</li>Ivy file of the module, describing its dependencies upon other modules and / or external modules.
+Example:
+<code type="xml">
+<ivy-module version="1.0">
+    <info 
+        organisation="jayasoft"
+        module="find"
+        status="integration"/>
+    <configurations>
+      <conf name="core"/>
+      <conf name="standalone" extends="core"/>
+    </configurations>
+    <publications>
+      <artifact name="find" type="jar" conf="core" />
+    </publications>
+    <dependencies>
+      <dependency name="version" rev="latest.integration" conf="core->default" />
+      <dependency name="list" rev="latest.integration" conf="core" />
+      <dependency org="apache" name="commons-collections" rev="3.1" conf="core->default" />
+      <dependency org="apache" name="commons-cli" rev="1.0" conf="standalone->default" />
+    </dependencies>
+</ivy-module>
+</code>
+<li>build.xml</li>The build file of the project, which consists mainly in an import of the common build file and of a module specific properties file:
+<code type="xml">
+<project name="find" default="compile">
+	<property file="build.properties"/>
+	
+	<import file="${common.dir}/common.xml"/>
+</project>
+</code>
+<li>build.properties</li>Module specific properties + properties to find the common build file
+<code>
+projects.dir = ${basedir}/..
+wkspace.dir = ${projects.dir}/..
+common.dir = ${wkspace.dir}/common
+</code>
+<li>src</li> the source directory with all java sources
+</ul>
+</ul>
+
+Note that this doesn't demonstrate good practice for software development in general, in particular you won't find any unit test in this samples, even if we think unit testing is very important. But this isn't the aim of this tutorial.
+
+Now that you are a bit more familiar with the structure, let's have a look at the most important part of this example: the common build file. Indeed, as you have seen all modules build files only import the common build file, and defines their dependencies in their ivy files (with which you should begin to be familiar).
+
+So, here are some aspects of this common build file:
+<h2>ivy settings</h2>
+<code type="xml">
+<target name="configure">
+    <!-- setup ivy default configuration with some custom info -->
+    <property name="ivy.local.default.root" value="${repository.dir}/local"/>
+    <property name="ivy.shared.default.root" value="${repository.dir}/shared"/>
+
+    <!-- here is how we would have configured ivy if we had our own ivysettings file
+        <ivy:configure file="${common.dir}/ivysettings.xml" />
+    -->
+</target>
+</code>
+
+This target configures ivy only by setting two properties: the location for the local repository and the location for the shared repository. It's the only settings done here, since ivy 1.3 is configured by default to work in a team environment (see <a href="../../tutorial/defaultconf.html">default settings tutorial</a> for details about this). For sure in a real environment the shared repository location would rather be in a team shared directory (or in a more complex repository, again see the default settings tutorial to see how to use something really different).
+This target only indicates in comments how the settings would have been done if the default settings wasn't ok for our purpose.
+
+<h2>resolve dependencies</h2>
+<code type="xml">
+<target name="resolve" depends="configure, clean-lib" description="--> retrieve dependencies with ivy">
+    <mkdir dir="${lib.dir}"/> <!-- not usually necessary, ivy creates the directory IF there are dependencies -->
+    <!-- this target is named resolve even if we do a retrieve: 
+         in fact a resolve will be called, and then the retrieve will simply copy files in the lib directory -->
+    <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" />
+</target>
+</code>
+Here we see that we only call a retrieve task, the resolve being done automatically with default parameters (which are ok in our case). So here nothing special, we simply use ivy to retrieve dependencies in the lib directory, putting artifacts without revision in their names (it's easier to use with an ide, for instance).
+
+<h2>publish</h2>
+<code type="xml">
+<target name="publish" depends="clean-build, new-version, jar" description="--> publish this project in the ivy repository">
+    <property name="revision" value="${version}"/>
+    <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]" 
+        resolver="shared"
+        pubrevision="${revision}" 
+        status="release"
+    	/>
+    <echo message="project ${ant.project.name} released with version ${revision}" />
+</target>
+</code>
+This target let publish the module in the shared repository, with the revision found in the version property, which is set by other targets. It can be used when a module reaches a specific milestone, or whenever you want the teeam to benefit from a new version of the module.
+<h2>publish-local</h2>
+<code type="xml">
+<target name="publish-local" depends="local-version, jar" description="--> publish this project in the local ivy repository">
+    <delete file="${build.dir}/ivy.xml"/> <!-- delete last produced ivy file to be sure a new one will be generated -->
+    <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]" 
+        resolver="local"
+        pubrevision="${revision}"
+        pubdate="${now}"
+        status="integration"
+    	/>
+    <echo message="project ${ant.project.name} published locally with version ${revision}" />
+</target>
+</code>
+This is very similar to the publish task, except that this publish the revision in the local repository, which is used only in your environment and doesn't disturb the team. When you change something in a module and want to benefit from the change in another one, you can simply call publish-local in this module, and then your next build of the other module will automatically get this local version.
+<h2>clean-local</h2>
+<code type="xml">
+<target name="clean-local" depends="configure" description="cleans the local repository for the current module">
+    <delete dir="${ivy.local.default.root}/${ant.project.name}"/>
+</target>
+</code>
+This target is used when you don't want to use your local version of a module anymore, for example when you release a new version to the whole team.
+<h2>report</h2>
+<code type="xml">
+<target name="report" depends="resolve" description="--> generates a report of dependencies">
+    <ivy:report todir="${build.dir}"/>
+</target>
+</code>
+Generates both an html report and a graphml report.
+
+For example, to generate a graph like the one shown at the beginning of this tutorial, you just have to follow the instructions given <a href="../yed.html">here</a> with the graphml file you will find in <code>projects/console/build/</code> after having called report in the console project, and that's it, you have a clear overview of all your app dependencies !
+	</textarea>
+<script type="text/javascript">xooki.postProcess();</script>
+</body>
+</html>

Propchange: incubator/ivy/core/trunk/doc/doc/tutorial/multiproject.html
------------------------------------------------------------------------------
    svn:eol-style = LF



Mime
View raw message