"Morrison, John" wrote:
> 
> Update...

I really like this.  It is pretty much what I envisioned.  Enclosed is
a diff to fine tune it just a little bit.  There are two classes of changes
in there: removing duplicate calls of dependant targets, and additional
comments.

I have found that for documentation generation and javadocs, if those
targets are included in multiple locations (i.e. the dist chain depends
on other targets and each of them depend on the docs target), then the
target gets run multiple times.  Part of this is due to the fact that
the <uptodate/> target is not used in them, and due to the fact that
Ant doesn't currently have a way to detect if the target has already
been run.  As a result, I tend to keep my "depends" attributes with
the minimal set required.

The comments I added merely give examples of what might be left over
after calling "ant clean".
--- build.xml   Fri Sep 28 13:52:22 2001
+++ change-build.xml    Fri Sep 28 09:14:52 2001
@@ -49,7 +49,7 @@
   <!-- Public Targets -->
 
   <target name="main"
-          depends="init, all, check"
+          depends="all, check"
           description="Alias for all, check."/>
   
   <target name="all"
@@ -64,7 +64,7 @@
   </target>
 
   <target name="install"
-          depends="init, all, docs, dist"
+          depends="all, docs, dist"
           description="Ensures that everything is built, including documentation.">
     <!-- This target ensures that everything is built, including documentation.
       It then copies the files in the corresponding directories already
@@ -114,12 +114,13 @@
   </target>
   
   <target name="distclean"
-          depends="init, clean"
+          depends="clean"
           description="Deletes all files that a left from clean and returns the 
project to its distributed state.">
     <!-- This deletes all files that are left from clean and returns the
       project to its distributed state. -->
       
-    <!-- Delete what? -->
+    <!-- Examples of extra files that might be left from clean are: the distribution 
+jars
+         and directories created by the "dist" target or any generated announcements. 
+-->
     <!--
       <delete>
         <fileset dir=""/>
@@ -128,7 +129,7 @@
   </target>
   
   <target name="docs"
-          depends="init, javadocs, printerdocs"
+          depends="javadocs, printerdocs"
           description="Generates all documentation for a project.">
     <!-- This generates all documentation for a project.  This includes user
       docs and javadocs.  If there are no user docs, then we just generate the
@@ -157,7 +158,7 @@
                  bottom="${copyright.message}">
                  <classpath refid="classpath"/>
          </javadoc>
-    -->
+
   </target>
   
   <target name="printerdocs"
@@ -176,7 +177,7 @@
   </target>
   
   <target name="dist"
-          depends="init, all, docs"
+          depends="all, docs"
           description="Generates all the artifacts used for a distribution.">
     <!-- This target should be used for generating all the artifacts used for a
       distribution.  That means the tar ball and zip file used to distribute
@@ -186,7 +187,7 @@
   </target>
 
   <target name="test"
-          depends="init, check"
+          depends="check"
           description="Alias for check">
     <!-- optional target -->
   </target>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to