From 11af84f764212f34d8f2a8efa4d381f08e3b7339 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 20 Apr 2011 04:57:23 +0000 Subject: [PATCH] code in tutorial relies on references being resolved even if the definition has never been reached. Found by Magnus Strandberg git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1095268 13f79535-47bb-0310-9956-ffa450edef68 --- manual/tutorial-HelloWorldWithAnt.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manual/tutorial-HelloWorldWithAnt.html b/manual/tutorial-HelloWorldWithAnt.html index bcb980afc..d367f548d 100644 --- a/manual/tutorial-HelloWorldWithAnt.html +++ b/manual/tutorial-HelloWorldWithAnt.html @@ -414,11 +414,13 @@ Now we add a junit instruction to our buildfile:

     ...
 
+    <path id="application" location="${jar.dir}/${ant.project.name}.jar"/>
+
     <target name="run" depends="jar">
         <java fork="true" classname="${main-class}">
             <classpath>
                 <path refid="classpath"/>
-                <path id="application" location="${jar.dir}/${ant.project.name}.jar"/>
+                <path refid="application"/>
             </classpath>
         </java>
     </target>
@@ -440,7 +442,8 @@ Now we add a junit instruction to our buildfile:

-

We reuse the path to our own jar file as defined in run-target by giving it an ID. +

We reuse the path to our own jar file as defined in run-target by + giving it an ID and making it globally available. The printsummary=yes lets us see more detailed information than just a "FAILED" or "PASSED" message. How much tests failed? Some errors? Printsummary lets us know. The classpath is set up to find our classes. To run tests the batchtest here is used, so you could easily add more test classes in the future just