You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ka...@apache.org on 2002/03/25 22:28:37 UTC

cvs commit: jakarta-turbine-maven/src/templates/build build-docs.xml build-maven.xml build-metrics.xml build-test.xml

kaz         02/03/25 13:28:37

  Modified:    src/templates/build build-docs.xml build-maven.xml
                        build-metrics.xml build-test.xml
  Log:
  Added a local-init target that can execute initialization tasks that are
  specific to a single build-*.xml file.  Currently, the init target is
  shared across all the build files.  This allows us to get rid of some
  local redundancy within the build files (such as mkdir's).
  
  Revision  Changes    Path
  1.36      +28 -36    jakarta-turbine-maven/src/templates/build/build-docs.xml
  
  Index: build-docs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-docs.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- build-docs.xml	25 Mar 2002 16:49:21 -0000	1.35
  +++ build-docs.xml	25 Mar 2002 21:28:37 -0000	1.36
  @@ -4,9 +4,28 @@
   
   #parse("build.init.target")
   
  +  <!-- ================================================================== -->
  +  <!-- L O C A L   I N I T                                                -->
  +  <!-- ================================================================== -->
  +
  +  <target
  +    name="local-init"
  +    depends="init">
  +
  +    <mkdir dir="src"/>
  +    <mkdir dir="${docs.src}"/>
  +    <mkdir dir="${docs.src}/images"/>
  +    <mkdir dir="${docs.src}/stylesheets"/>
  +    <mkdir dir="${docs.dest}"/>
  +    <mkdir dir="${docs.dest}/xref"/>
  +    <mkdir dir="${gen.docs}"/>
  +    <mkdir dir="${javadoc.destdir}"/>
  +
  +  </target>
  +
     <target
       name="docs"
  -    depends="init, jdepend-metrics, junit-report, cvs-change-log, generate-xdocs, docs:site"
  +    depends="local-init, jdepend-metrics, junit-report, cvs-change-log, generate-xdocs, docs:site"
       description="o Generate html project documentation xdoc sources">
     </target>
   
  @@ -28,7 +47,7 @@
   
     <target
       name="cross-ref"
  -    depends="init">
  +    depends="local-init">
       
       <jxr
         startDir="src"
  @@ -48,14 +67,11 @@
   
     <target
       name="cvs-change-log"
  -    depends="init">
  +    depends="local-init">
       
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${gen.docs}"/>
  -
       <change-log
         projectDescriptor="project.xml"
  -      baseDir="src"
  +      baseDir="."
         output="${gen.docs}/changelog.xml"
         days="5"
       />
  @@ -68,25 +84,19 @@
   
     <target
       name="generate-xdocs"
  -    depends="init, docs:index, docs:mail-lists, docs:developer-list, docs:dependencies"
  +    depends="local-init, docs:index, docs:mail-lists, docs:developer-list, docs:dependencies"
       description="o Generates xdocs for site based on project descriptor" />
   
     <target
       name="docs:index"
       description="o Generates front page">
   
  -    <taskdef 
  -      name="dvsl" 
  -      classname="org.apache.tools.dvsl.DVSLTask">
  -      
  +    <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
         <classpath>
           <path refid="maven-classpath"/>
         </classpath>
       </taskdef>
   
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${gen.docs}"/>
  -
       <dvsl
         basedir="."
         style="${maven.home}/stylesheets/index.dvsl"
  @@ -105,9 +115,6 @@
         </classpath>
       </taskdef>
   
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${gen.docs}"/>
  -
       <dvsl
         basedir="."
         style="${maven.home}/stylesheets/mail-lists.dvsl"
  @@ -126,9 +133,6 @@
         </classpath>
       </taskdef>
   
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${gen.docs}"/>
  -
       <dvsl
         basedir="."
         style="${maven.home}/stylesheets/developer-list.dvsl"
  @@ -147,9 +151,6 @@
         </classpath>
       </taskdef>
   
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${gen.docs}"/>
  -
       <dvsl
         basedir="."
         style="${maven.home}/stylesheets/dependencies.dvsl"
  @@ -164,7 +165,7 @@
   
     <target
       name="docs:site"
  -    depends="init"
  +    depends="local-init"
       description="o Generate html project documentation xdoc sources">
   
       <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
  @@ -173,13 +174,6 @@
         </classpath>
       </taskdef>
   
  -    <!-- Make sure the source doc directories exist -->
  -    <mkdir dir="${docs.src}"/>
  -    <mkdir dir="${docs.src}/images"/>
  -    <mkdir dir="${docs.src}/stylesheets"/>
  -
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${docs.dest}"/>
   
       <!-- Transform the auto-generated xdocs first -->
       <dvsl
  @@ -259,7 +253,7 @@
   
     <target
       name="site"
  -    depends="init,docs,javadocs,cross-ref"
  +    depends="local-init,docs,javadocs,cross-ref"
     />
   
     <!-- ================================================================== -->
  @@ -301,10 +295,8 @@
   
     <target
       name="javadocs"
  -    depends="init"
  +    depends="local-init"
       description="o Generates the Javadoc API documentation">
  -
  -    <mkdir dir="${javadoc.destdir}"/>
   
       <!-- Get the year to display in the Javadocs -->
       <tstamp>
  
  
  
  1.11      +18 -12    jakarta-turbine-maven/src/templates/build/build-maven.xml
  
  Index: build-maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-maven.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build-maven.xml	18 Mar 2002 16:19:13 -0000	1.10
  +++ build-maven.xml	25 Mar 2002 21:28:37 -0000	1.11
  @@ -5,12 +5,26 @@
   #parse("build.init.target")
   
     <!-- ================================================================== -->
  +  <!-- L O C A L   I N I T                                                -->
  +  <!-- ================================================================== -->
  +
  +  <target
  +    name="local-init"
  +    depends="init">
  +
  +    <mkdir dir="${build.dest}"/>
  +    <mkdir dir="${docs.dest}"/>
  +    <mkdir dir="${distDir}"/>
  +
  +  </target>
  +
  +  <!-- ================================================================== -->
     <!-- E N V I R O N M E N T                                              -->
     <!-- ================================================================== -->
   
     <target 
       name="env"
  -    depends="init">
  +    depends="local-init">
   
       <property name="classpath" refid="classpath"/>
   
  @@ -31,7 +45,7 @@
     <target
       name="update-jars" 
       description="o Update JARs required for building"
  -    depends="init,update-jars-proxy,update-jars-noproxy">
  +    depends="local-init,update-jars-proxy,update-jars-noproxy">
     </target>
   
     <target 
  @@ -95,9 +109,6 @@
       depends="env"
       description="o Compile project source code with javac">
   
  -    <!-- Make sure the target directory exists -->
  -    <mkdir dir="${build.dest}"/>
  -
       <javac
         destdir="${build.dest}"
         excludes="**/package.html"
  @@ -206,8 +217,6 @@
         +-------------------------------------------------------+
       </echo>
   
  -    <mkdir dir="${distDir}"/>
  -
       <!-- Copy the project descriptor -->
       <copy todir="${distDir}" file="project.xml"/>
   
  @@ -326,7 +335,7 @@
   
     <target
       name="gump-descriptor"
  -    depends="init"
  +    depends="local-init"
       description="o Generate Gump descriptor from Maven descriptor">
   
       <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
  @@ -335,9 +344,6 @@
         </classpath>
       </taskdef>
   
  -    <!-- Make sure the target directory -->
  -    <mkdir dir="${docs.dest}"/>
  -
       <dvsl
         basedir="."
         destdir="./"
  @@ -354,7 +360,7 @@
   
     <target 
       name="clean"
  -    depends="init"
  +    depends="local-init"
       description="o Cleans up the build directory">
       <echo message="Cleaning up ${build.dir}"/>
       <delete dir="${build.dir}"/>
  
  
  
  1.13      +15 -3     jakarta-turbine-maven/src/templates/build/build-metrics.xml
  
  Index: build-metrics.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-metrics.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build-metrics.xml	18 Mar 2002 02:25:47 -0000	1.12
  +++ build-metrics.xml	25 Mar 2002 21:28:37 -0000	1.13
  @@ -5,6 +5,18 @@
   #parse("build.init.target")
   
     <!-- ================================================================== -->
  +  <!-- L O C A L   I N I T                                                -->
  +  <!-- ================================================================== -->
  +
  +  <target
  +    name="local-init"
  +    depends="init">
  +
  +    <mkdir dir="${build.dest}"/>
  +
  +  </target>
  +
  +  <!-- ================================================================== -->
     <!-- C O M P I L E                                                      -->
     <!-- ================================================================== -->
   
  @@ -29,7 +41,7 @@
   
     <target 
       name="jdepend-report" 
  -    depends="init,compile"
  +    depends="local-init,compile"
       unless="use.jdepend.gui">
       <java 
         classname="jdepend.textui.JDepend" 
  @@ -49,7 +61,7 @@
   
     <target 
       name="jdepend-gui" 
  -    depends="init,compile"
  +    depends="local-init,compile"
       if="use.jdepend.gui">
       <java 
         classname="jdepend.swingui.JDepend" 
  @@ -69,7 +81,7 @@
   
     <target 
       name="jdepend-xml" 
  -    depends="init">
  +    depends="local-init">
   
       <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
         <classpath>
  
  
  
  1.17      +15 -12    jakarta-turbine-maven/src/templates/build/build-test.xml
  
  Index: build-test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-test.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build-test.xml	25 Mar 2002 18:35:57 -0000	1.16
  +++ build-test.xml	25 Mar 2002 21:28:37 -0000	1.17
  @@ -5,16 +5,27 @@
   #parse("build.init.target")
   
     <!-- ================================================================== -->
  +  <!-- L O C A L   I N I T                                                -->
  +  <!-- ================================================================== -->
  +
  +  <target
  +    name="local-init"
  +    depends="init">
  +
  +    <mkdir dir="${build.dest}"/>
  +    <mkdir dir="${test.reportsDirectory}"/>
  +
  +  </target>
  +
  +  <!-- ================================================================== -->
     <!-- C O M P I L E  T E S T S                                           -->
     <!-- ================================================================== -->
   
     <target
       name="compile"
  -    depends="init"
  +    depends="local-init"
       description="==> compiles the test source code">
       
  -    <mkdir dir="${build.dest}"/>
  -    
       <javac 
         destdir="${build.dest}"
         excludes="**/package.html"
  @@ -57,8 +68,6 @@
         Running all JUnit tests
       </echo>
       
  -    <mkdir dir="${test.reportsDirectory}"/>
  -    
       <junit printSummary="yes" failureProperty="test.failure">
         <sysproperty key="basedir" value="${basedir}"/>
         <formatter type="xml"/>
  @@ -91,10 +100,6 @@
         </classpath>
       </taskdef>
   
  -    <!-- Create the directory so we can still build docs even if the
  -         unit tests were note executed. -->
  -    <mkdir dir="${test.reportsDirectory}"/>
  -
       <!-- Consolidate the reports into a single -->
       <junitreport todir="${test.reportsDirectory}">
         <fileset dir="${test.reportsDirectory}">
  @@ -128,9 +133,7 @@
       <echo>
         Running a single JUnit test
       </echo>
  -    
  -    <mkdir dir="${test.reportsDirectory}"/>
  -    
  +
       <junit printSummary="yes" haltonfailure="yes">
         <sysproperty key="basedir" value="${basedir}"/>
         <formatter type="plain"/>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>