Author: maartenc
Date: Thu Jun 24 21:59:45 2010
New Revision: 957727
URL: http://svn.apache.org/viewvc?rev=957727&view=rev
Log:
Invoked command line is now automatically generated.
Modified:
ant/ivy/core/trunk/doc/tutorial/build-repository/advanced.html
ant/ivy/core/trunk/doc/tutorial/build-repository/basic.html
ant/ivy/core/trunk/doc/tutorial/dual.html
ant/ivy/core/trunk/doc/tutorial/multiple.html
ant/ivy/core/trunk/doc/tutorial/start.html
Modified: ant/ivy/core/trunk/doc/tutorial/build-repository/advanced.html
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/tutorial/build-repository/advanced.html?rev=957727&r1=957726&r2=957727&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/tutorial/build-repository/advanced.html (original)
+++ ant/ivy/core/trunk/doc/tutorial/build-repository/advanced.html Thu Jun 24
21:59:45 2010
@@ -41,16 +41,14 @@ Fortunately Ivy has a very powerful answ
If you look at the repository built with the [[tutorial/build-repository/basic
previous tutorial]], you will see exactly what we were talking about: all
apache commons module use their own name as organization.
So let's see what Ivy can do using namespaces (we will dig into details later):
-<div class="shell"><pre>Z:\>ant commons-lang-1-0-ibiblio-with-namespace
-[<tutorial/log/install-namespace.txt>]</pre></div>
+<div class="shell"><pre>
+[<tutorial/log/install-namespace.txt>]
+</pre></div>
+
Now if we look at our repository, it seems to look fine.
-<div class="shell"><pre>Z:\>dir /s /B /A:-D myrepository\advanced
-Z:\myrepository\advanced\apache\commons-lang\ivys\ivy-1.0.xml
-Z:\myrepository\advanced\apache\commons-lang\ivys\ivy-1.0.xml.md5
-Z:\myrepository\advanced\apache\commons-lang\ivys\ivy-1.0.xml.sha1
-Z:\myrepository\advanced\apache\commons-lang\jars\commons-lang-1.0.jar
-Z:\myrepository\advanced\apache\commons-lang\jars\commons-lang-1.0.jar.md5
-Z:\myrepository\advanced\apache\commons-lang\jars\commons-lang-1.0.jar.sha1</pre></div>
+<div class="shell"><pre>
+[<tutorial/log/myrepository-content-namespace>]
+</pre></div>
We can even have a look at the commons-lang ivy file in our repo:
<div><code type="xml">
<?xml version="1.0" encoding="UTF-8"?>
Modified: ant/ivy/core/trunk/doc/tutorial/build-repository/basic.html
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/tutorial/build-repository/basic.html?rev=957727&r1=957726&r2=957727&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/tutorial/build-repository/basic.html (original)
+++ ant/ivy/core/trunk/doc/tutorial/build-repository/basic.html Thu Jun 24
21:59:45 2010
@@ -58,19 +58,14 @@ Let's have a look at the <em>maven2</em>
Pretty simple, we call the [[ant:install] task with the settings we have
loaded using [[ant:settings ivy:settings]] as usual, we provide fromResolver
(source) and toResolver (destination) using properties to ease the maintenance
of the script, but it's basically the name of our resolvers: 'libraries' for
the source and 'my-repository' for the destination.
Here is the ant call output :
-<div class="shell"><pre>Z:\>ant maven2
+<div class="shell"><pre>
[<tutorial/log/install.txt>]
</pre></div>
The trace tells us that the module definition was found using the "libraries"
resolver and that the corresponding artifact was downloaded from maven 2
repository. Then both were published to the filesystem repository
(my-repository).
Let's have a look at our repository :
-<div class="shell"><pre>Z:\>dir /s /B /A:-D myrepository
-Z:\myrepository\no-namespace\commons-lang\commons-lang\ivys\ivy-1.0.xml
-Z:\myrepository\no-namespace\commons-lang\commons-lang\ivys\ivy-1.0.xml.md5
-Z:\myrepository\no-namespace\commons-lang\commons-lang\ivys\ivy-1.0.xml.sha1
-Z:\myrepository\no-namespace\commons-lang\commons-lang\jars\commons-lang-1.0.jar
-Z:\myrepository\no-namespace\commons-lang\commons-lang\jars\commons-lang-1.0.jar.md5
-Z:\myrepository\no-namespace\commons-lang\commons-lang\jars\commons-lang-1.0.jar.sha1</pre>
+<div class="shell"><pre>
+[<tutorial/log/myrepository-content.txt>]
</div>
We can see that we now have the commons-lang module version 1.0 in our
repository, with a generated ivy.xml file, its jar, and all the md5 and sha1
checksums for future consistency checks when developers will use this
repository to resolve modules.
@@ -88,7 +83,7 @@ The target called is very similar to the
</code>
If you call this target, you will see that Ivy installs not only the hibernate
module but also its dependencies:
-<div class="shell"><pre>Z:\>ant maven2-deps
+<div class="shell"><pre>
[<tutorial/log/install-deps.txt>]
</pre>
</div>
@@ -100,13 +95,9 @@ You may also have notice that Ivy has in
We do not want to evict any modules because we are building our own
repository. Indeed if we get both commons-logging 1.0.2 and 1.0.4 it's because
some modules among the transitive dependencies of hibernate depend on 1.0.2 and
other on 1.0.4. If we got only 1.0.4, the module depending on 1.0.2 would be
inconsistent in your own repository (depending on a version you don't have
installed). Thus developers using this module directly would run into a problem.
If you now have a closer look at your repository, you will probably notice
that it isn't an exact replication of the original one. Let's have a look at
one module content:
-<div class="shell"><pre>Z:\>dir /s /B /A:-D
myrepository\no-namespace\org.hibernate\hibernate\
-Z:\myrepository\no-namespace\org.hibernate\hibernate\ivys\ivy-3.2.5.ga.xml
-Z:\myrepository\no-namespace\org.hibernate\hibernate\ivys\ivy-3.2.5.ga.xml.md5
-Z:\myrepository\no-namespace\org.hibernate\hibernate\ivys\ivy-3.2.5.ga.xml.sha1
-Z:\myrepository\no-namespace\org.hibernate\hibernate\jars\hibernate-3.2.5.ga.jar
-Z:\myrepository\no-namespace\org.hibernate\hibernate\jars\hibernate-3.2.5.ga.jar.md5
-Z:\myrepository\no-namespace\org.hibernate\hibernate\jars\hibernate-3.2.5.ga.jar.sha1</pre>
+<div class="shell"><pre>
+[<tutorial/log/myrepository-content-deps.txt>]
+</pre>
</div>
As you can see there is no pom here (pom is the module metadata format used by
maven 2, available on the maven 2 repository). Instead you can see there's an
ivy file, which is actually the original hibernate pom converted into an ivy
file. So now you have a true Ivy repository with ivy files, where you can use
the full power of Ivy if you want to adjust the module metadata (module
configurations, fine grain exclusions and transitivity control, per module
conflict manager, ...).
Modified: ant/ivy/core/trunk/doc/tutorial/dual.html
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/tutorial/dual.html?rev=957727&r1=957726&r2=957727&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/tutorial/dual.html (original)
+++ ant/ivy/core/trunk/doc/tutorial/dual.html Thu Jun 24 21:59:45 2010
@@ -98,7 +98,6 @@ You can do it each time you want to clea
<h2>step 3 : run the project</h2>
Goto project directory. And simply run <b>ant</b>.
<div class="shell"><pre>
-I:\dual\project>ant
[<tutorial/log/dual.txt>]
</pre></div></div>
<br/>
Modified: ant/ivy/core/trunk/doc/tutorial/multiple.html
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/tutorial/multiple.html?rev=957727&r1=957726&r2=957727&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/tutorial/multiple.html (original)
+++ ant/ivy/core/trunk/doc/tutorial/multiple.html Thu Jun 24 21:59:45 2010
@@ -110,7 +110,7 @@ Cleaning Ivy cache is something you can
<h2>step 3: run the project</h2>
Go to chainedresolvers-project directory. And simply run <b>ant</b>.
-<div class="shell"><pre>I:\chained-resolvers\chainedresolvers-project>ant
+<div class="shell"><pre>
[<tutorial/log/chained-resolvers.txt>]
</pre></div></div>
Modified: ant/ivy/core/trunk/doc/tutorial/start.html
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/tutorial/start.html?rev=957727&r1=957726&r2=957727&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/tutorial/start.html (original)
+++ ant/ivy/core/trunk/doc/tutorial/start.html Thu Jun 24 21:59:45 2010
@@ -84,7 +84,6 @@ Note that in this case we define a "reso
Ok, now that we have seen the files involved, let's run the sample to see what
happens. Open a shell (or command line) window, and enter the hello-ivy example
directory.
Then, at the command prompt, run 'ant':
<div class="shell"><pre>
-I:\hello-ivy>ant
[<tutorial/log/hello-ivy-1.txt>]
</pre></div>
<h1>What happened ?</h1>
@@ -92,7 +91,7 @@ Without any settings, Ivy retrieves file
The resolve task has found the commons-lang and commons-cli modules in the
maven 2 repository, identified that commons-cli depends on commons-logging and
so resolved it as a transitive dependency. Then Ivy has downloaded all
corresponding artifacts in its cache (by default in your user home, in a
.ivy2/cache directory). Finally, the retrieve task copies the resolved jars
from the ivy cache to the default library directory of the project: the lib dir
(you can change this easily by setting the pattern attribute on the
[[use/retrieve]] task).
You might say that the task took a long time just to write out a "Hello Ivy !"
message. But remember that a lot of time was spent downloading the required
files from the web. Let's try to run it again:
-<div class="shell"><pre>I:\hello-ivy>ant
+<div class="shell"><pre>
[<tutorial/log/hello-ivy-2.txt>]
</pre></div>
Great! the cache was used, no download was needed and the build was
instantaneous.