> On Tue, 14 May 2002 14:28:37 -0700 Jon Scott Stevens <[EMAIL PROTECTED]> wrote:

> Could you please re-submit your patches without tab's in it?

> Thx!

> -jon

Jon,

Thanks for pointing out my mistake. I thought I changed my tabs to spaces. I usually 
have the tab setting on in my editor so changing was new to me.

Hopefully I did better this time. I believe I may have stripped some trailing spaces 
too.

Let me know if there is a problem of course.

-Peter

-------------8<------------------------

Index: build-bootstrap.xml
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-maven/build-bootstrap.xml,v
retrieving revision 1.81
diff -u -r1.81 build-bootstrap.xml
--- build-bootstrap.xml 14 May 2002 00:07:59 -0000      1.81
+++ build-bootstrap.xml 15 May 2002 00:45:20 -0000
@@ -14,11 +14,11 @@
   <!-- In order to bootstrap Maven you must have the following            -->
   <!-- properties defined in order for the bootstrap to work              -->
   <!-- correctly:                                                         -->
-  <!--                                                                    -->   
+  <!--                                                                    -->
   <!-- ${lib.repo}  : Local JAR repository                                -->
   <!-- ${maven.home}: Maven installation directory                        -->
   <!-- ================================================================== -->
-  
+
   <target
     name="check-properties"
     depends="check-lib-repo">
@@ -33,7 +33,7 @@
       | ERROR!
       |
       | You must set ${lib.repo} in your ${user.home}/build.properties
-      | 
+      |
       | Please refer to the bootstrap document:
       | http://jakarta.apache.org/turbine/maven/bootstrap.html
       +------------------------------------------------------------------
@@ -48,7 +48,7 @@
       | ERROR!
       |
       | You must set ${maven.home} in your ${user.home}/build.properties
-      | 
+      |
       | Please refer to the bootstrap document:
       | http://jakarta.apache.org/turbine/maven/bootstrap.html
       +------------------------------------------------------------------
@@ -58,12 +58,12 @@
   <!-- ================================================================== -->
   <!-- D E F A U L T  B O O T S T R A P                                   -->
   <!-- ================================================================== -->
-  
+
   <target
     name="bootstrap"
     depends="check-properties,clean"
     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"/>
@@ -71,20 +71,25 @@
     <ant antfile="build.xml" target="maven:jar"/>
     <antcall target="dist"/>
     <ant dir="${maven.home}/install"/>
-    
+
     <!-- 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}"/>
+    <!-- Sometimes the installer may not have permission to create a     -->
+    <!-- maven dir, but permission to install files in the dir. So only  -->
+    <!-- the contents of the maven dir are deleted, not the dir itself   -->
+    <delete dir="${maven.home}" quiet="true" includeEmptyDirs="true">
+      <fileset includes="../${maven.home}/**" />
+    </delete>
 
     <!-- Remove any cruft left in build.dest -->
     <delete dir="target"/>
 
     <!-- Remove the maven.jar from lib.repo -->
-    <delete file="${lib.repo}/maven.jar"/>  
+    <delete file="${lib.repo}/maven.jar"/>
   </target>
 
   <!-- ================================================================== -->
@@ -119,8 +124,8 @@
       projectDescriptor="project.xml"
       listFile="jars.list"
     />
-    
-  </target>    
+
+  </target>
 
   <!-- ================================================================== -->
   <!-- G E T  B O O T S T R A P  J A R S                                  -->
@@ -150,7 +155,7 @@
       dest="${lib.repo}"
       baseUrl="${maven.get.jars.baseUrl}/"
     />
-  
+
   </target>
 
   <!-- ================================================================== -->
@@ -163,11 +168,11 @@
   <!-- 1. GetList: Allows us to download a list of JARs into a specified  -->
   <!--    directory. Used to pull down the JARs to build Maven before     -->
   <!--    we have use of the POM.                                         -->
-  <!--                                                                    -->   
-  <!-- 2. CreateClasspath: Allows us to create a class from a list of     -->   
+  <!--                                                                    -->
+  <!-- 2. CreateClasspath: Allows us to create a class from a list of     -->
   <!--    JARs. Used in the phase2-compile which compiles the classes     -->
-  <!--    required to generate the build system.                          --> 
-  <!--                                                                    -->   
+  <!--    required to generate the build system.                          -->
+  <!--                                                                    -->
   <!-- 3. CreatePatternSet: Allows us to create a patternset that can     -->
   <!--    be used within a fileset definition. Used in the dist to        -->
   <!--    copy the JARs specified in our jars.list into the Maven         -->
@@ -176,7 +181,7 @@
 
   <target
     name="phase1-compile">
-    
+
     <delete dir="${basedir}/bootstrap"/>
     <mkdir dir="${basedir}/bootstrap"/>
 
@@ -211,13 +216,13 @@
         <pathelement location="${basedir}/bootstrap"/>
       </classpath>
     </taskdef>
-    
+
     <create-classpath
       listFile="jars.list"
       reference="bootstrap-classpath"
       baseDir="${lib.repo}"
     />
-    
+
     <javac
       destdir="${basedir}/bootstrap"
       debug="on"
@@ -233,9 +238,9 @@
       <exclude name="org/apache/maven/ProjectResolver*"/>
     </javac>
 
-    <!-- 
+    <!--
       After we have compiled the classes required to generate
-      the build system we need to make a temporary bootstrap 
+      the build system we need to make a temporary bootstrap
       maven.jar file and place it in lib.repo so that the generated
       build system will work. Maven expects the presence of
       ${lib.repo}/maven.jar and we want to use Maven as it
@@ -249,26 +254,30 @@
       basedir="${basedir}/bootstrap"
       excludes="**/package.html"
     />
-    
+
   </target>
 
   <!-- ================================================================== -->
   <!-- I N S T A L L                                                      -->
   <!-- ================================================================== -->
-
+  <!-- don't create the directory if it already exists -->
+  <target name="create-maven-home" unless="maven.home.exists" >
+    <mkdir dir="${maven.home}"/>
+  </target>
+  <target name="check-home-dir" >
+    <available property="maven.home.exists" file="{maven.home}" type="dir" />
+    <antcall target="create-maven-home" />
+  </target>
   <target
     name="install"
-    depends="generate-build">
-
-    <delete dir="${maven.home}"/>
-    <mkdir dir="${maven.home}"/>
+    depends="clean,check-home-dir,generate-build">
 
-    <copy 
+    <copy
       tofile="maven/build-gump.xml"
       file="src/templates/build/build-gump.xml"
     />
 
-    <copy 
+    <copy
       tofile="maven/project.xsd"
       file="src/dtd/project.xsd"
     />
@@ -280,7 +289,7 @@
     <copy todir="${maven.home}/stylesheets">
       <fileset dir="src/dvsl/xdocs"/>
     </copy>
-    
+
     <copy todir="${maven.home}/dvsl/gump">
       <fileset dir="src/dvsl/gump"/>
     </copy>
@@ -314,27 +323,27 @@
     allow a user to easily create a sample Maven project.
     -->
 
-    <copy 
+    <copy
       toDir="${maven.home}/examples"
       file="src/examples/build-project.xml"
     />
 
-    <copy 
+    <copy
       toDir="${maven.home}/examples"
       file="project.xml"
     />
 
-    <copy 
+    <copy
       toDir="${maven.home}/examples"
       file="project.properties"
     />
 
-    <copy 
+    <copy
       toDir="${maven.home}/examples"
       file="src/templates/build/build.xml"
     />
 
-  </target>   
+  </target>
 
   <!-- ================================================================== -->
   <!-- D I S T R I B U T I O N S                                          -->
@@ -344,11 +353,11 @@
   <!-- manually install Maven.                                            -->
   <!-- ================================================================== -->
 
-  <target 
+  <target
     name="dist">
 
     <mkdir dir="${maven.home}/install"/>
-    
+
     <copy tofile="${maven.home}/install/maven.jar" file="target/maven.jar"/>
     <copy todir="${maven.home}/install" file="src/install/build.xml"/>
 
@@ -359,7 +368,7 @@
         <pathelement location="target/classes"/>
       </classpath>
     </taskdef>
-    
+
     <create-patternset
       listFile="jars.list"
       reference="install-patternset"
@@ -367,7 +376,7 @@
 
     <copy todir="${maven.home}/install">
       <fileset dir="${lib.repo}">
-        <patternset refid="install-patternset"/>     
+        <patternset refid="install-patternset"/>
       </fileset>
     </copy>
 
@@ -422,7 +431,7 @@
         <pathelement location="target/maven.jar"/>
       </classpath>
     </taskdef>
-    
+
     <create-classpath
       listFile="jars.list"
       reference="bootstrap-classpath"
@@ -439,7 +448,7 @@
     </taskdef>
 
     <ant dir="src/descriptors"/>
-    
+
     <package-project-map
       descriptorDir="src/descriptors/project"
       map="${maven.home}/package-project.map"

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

Reply via email to