glennm      02/05/16 13:59:34

  Modified:    .        build-bootstrap.xml
  Log:
  Glenn McAllister - 2002/05/16
  
  I've streamlined the bootstrap process so we don't keep recompiling when we
  don't need to or copying jars all over the place.  It definately drops the
  amout of output from the build. :)
  
  Revision  Changes    Path
  1.84      +62 -19    jakarta-turbine-maven/build-bootstrap.xml
  
  Index: build-bootstrap.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/build-bootstrap.xml,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- build-bootstrap.xml       15 May 2002 19:17:43 -0000      1.83
  +++ build-bootstrap.xml       16 May 2002 20:59:34 -0000      1.84
  @@ -61,24 +61,18 @@
     
     <target
       name="bootstrap"
  -    depends="check-properties,clean"
  +    depends="check-properties,clean,install"
       description="--> Update local jars, generate maven's build system, generate 
maven, and setup the distributions.">
      
  -    <antcall target="update-jars"/>
  -    <antcall target="generate-build"/>
  -    <antcall target="install"/>
       <ant antfile="build.xml" target="maven:clean"/>
  -    <ant antfile="build.xml" target="maven:jar"/>
  -    <antcall target="dist"/>
  -    <ant dir="${maven.home}/install"/>
  +    <ant antfile="build.xml" target="maven:install-jar"/>
       
       <!-- Get rid of the generated template build files -->
       <delete dir="maven"/>
     </target>
     
  -  <target name="clean">
  -    <!-- Remove any old installations of Maven -->
  -    <delete dir="${maven.home}"/>
  +  <target name="clean"
  +          depends="clean-maven-home-dir">
   
       <!-- Remove any cruft left in build.dest -->
       <delete dir="target"/>
  @@ -97,7 +91,7 @@
   
     <target
       name="generate-build"
  -    depends="phase2-compile">
  +    depends="update-jars,phase2-compile">
   
       <delete dir="${basedir}/maven"/>
       <mkdir dir="${basedir}/maven"/>
  @@ -135,9 +129,7 @@
   
     <target
       name="update-jars"
  -    depends="phase1-compile">
  -
  -    <mkdir dir="${lib.repo}"/>
  +    depends="phase1-compile,make-lib-repo-dir">
   
       <taskdef
         name="get-list"
  @@ -256,12 +248,10 @@
     <!-- I N S T A L L                                                      -->
     <!-- ================================================================== -->
   
  + 
     <target
       name="install"
  -    depends="generate-build">
  -
  -    <delete dir="${maven.home}"/>
  -    <mkdir dir="${maven.home}"/>
  +    depends="generate-build,make-maven-home-dir">
   
       <copy 
         tofile="maven/project.xsd"
  @@ -335,7 +325,8 @@
     <!-- ================================================================== -->
   
     <target 
  -    name="dist">
  +    name="dist"
  +    depends="bootstrap">
   
       <mkdir dir="${maven.home}/install"/>
       
  @@ -435,6 +426,58 @@
         map="${maven.home}/package-project.map"
       />
   
  +  </target>
  +
  +  <!-- ================================================================== -->
  +  <!-- U T I L I T Y  T A R G E T S                                       -->
  +  <!-- ================================================================== -->
  +
  +  <!-- 
  +       Create the maven.home directory if it doesn't exists, otherwise remove
  +       the directory contents.
  +  -->
  +  <target name="make-maven-home-dir"
  +          depends="clean-maven-home-dir"
  +          unless="maven.maven.home.dir.exists">
  +    <mkdir dir="${maven.home}" />
  +  </target>
  +
  +  <!--
  +       Check for the existence of the maven.home directory.
  +  -->
  +  <target name="check-maven-home-dir">
  +    <available property="maven.maven.home.dir.exists"
  +               file="${maven.home}" 
  +               type="dir" />
  +  </target>
  +
  +  <!--
  +      If the maven.home directory exists remove it's contents.
  +  -->
  +  <target name="clean-maven-home-dir"
  +          depends="check-maven-home-dir"
  +          if="maven.maven.home.dir.exists">
  +    <delete includeEmptyDirs="yes" quiet="yes">
  +      <fileset dir="${maven.home}" />
  +    </delete>
  +  </target>
  + 
  +  <!--
  +       Create the lib.repo directory if it doesn't exist.
  +  -->
  +  <target name="make-lib-repo-dir"
  +          depends="check-lib-repo-dir"
  +          unless="maven.lib.repo.dir.exists">     
  +    <mkdir dir="${lib.repo}" />
  +  </target>
  +
  +  <!--
  +       Check for the existence of the lib.repo directory.
  +  -->
  +  <target name="check-lib-repo-dir">
  +    <available property="maven.lib.repo.dir.exists"
  +               file="${lib.repo}"
  +               type="dir" />
     </target>
   
   </project>
  
  
  

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

Reply via email to