You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/11/26 02:52:04 UTC

svn commit: r720706 - in /maven/components/branches/maven-2.0.x: build.xml maven-integration-tests/pom.xml

Author: jdcasey
Date: Tue Nov 25 17:52:03 2008
New Revision: 720706

URL: http://svn.apache.org/viewvc?rev=720706&view=rev
Log:
avoid the hard-coding of /tmp to make bootstrap with ITs more compatible with Solaris, FreeBSD operating systems

Modified:
    maven/components/branches/maven-2.0.x/build.xml
    maven/components/branches/maven-2.0.x/maven-integration-tests/pom.xml

Modified: maven/components/branches/maven-2.0.x/build.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/build.xml?rev=720706&r1=720705&r2=720706&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/build.xml (original)
+++ maven/components/branches/maven-2.0.x/build.xml Tue Nov 25 17:52:03 2008
@@ -19,8 +19,6 @@
 
 <project default="all" basedir="." xmlns:artifact="urn:maven-artifact-ant">
   
-  <property name="it.workdir.version" value="2.0.x"/>
-
   <target name="initTaskDefs" unless="taskdefs.inited">
   	<xmlproperty file="pom.xml" prefix="pom.xml" />
     <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.0.8.jar"/>
@@ -41,12 +39,18 @@
     <fail unless="maven.home" message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script"/>
   </target>
 
-  <target name="read-pom" depends="initTaskDefs,initLocalRepo" unless="pom.version">
+  <target name="read-poms" depends="initTaskDefs,initLocalRepo" unless="pom.version">
     <copy file="pom.xml" tofile="dependencies.xml"/>
     <replace file="${basedir}/dependencies.xml" token="&lt;!--start--&gt;" value="&lt;!--"/>
     <replace file="${basedir}/dependencies.xml" token="&lt;!--end--&gt;" value="--&gt;"/>
-    <artifact:pom file="${basedir}/dependencies.xml" id="pom"/>
+    <artifact:pom file="${basedir}/dependencies.xml" id="pom">
+      <localRepository path="${maven.repo.local}"/>
+    </artifact:pom>
     <delete file="${basedir}/dependencies.xml"/>
+    
+    <artifact:pom file="${basedir}/maven-integration-tests/pom.xml" id="itPom">
+      <localRepository path="${maven.repo.local}"/>
+    </artifact:pom>
   </target>
 
   <target name="init" depends="isMavenHomeSet,initLocalRepo">
@@ -60,7 +64,7 @@
     <delete dir="bootstrap"/>
   </target>
 
-  <target name="pull" depends="init, read-pom" unless="skip.pull">    
+  <target name="pull" depends="init, read-poms" unless="skip.pull">    
     <property name="verbose" value="false"/>
     <property name="bootstrap.repository" value="${basedir}/bootstrap-repository"/>
     <!-- Pull the dependencies that Maven needs to build -->
@@ -209,19 +213,22 @@
   
   <target name="its-win32" if="its.win32">
     <echo>Retrieving integration tests</echo>
-    <exec failonerror="true" dir="${basedir}/maven-integration-tests" executable="cmd">
+    <exec dir="${basedir}/${itPom.artifactId}" executable="cmd">
       <arg value="/c"/>
       <arg value="${maven.home}\bin\mvn.bat"/>
-      <arg value="-B"/>
-      <arg value="initialize"/>
+      <arg value="process-resources"/>
+    </exec>
+    <exec dir="${basedir}/${itPom.artifactId}/target/classes" executable="cmd">
+      <arg value="/c"/>
+      <arg value="${maven.home}\bin\mvn.bat"/>
+      <arg value="package"/>
     </exec>
     
     <echo>Running integration tests</echo>
-    <!-- Hard-coding to /tmp/ to avoid long path names that will make windows scream. -->
-    <exec failonerror="true" dir="/tmp/maven-integration-tests-${it.workdir.version}" executable="cmd">
+    <!-- Using java.io.tmpdir to avoid long path names that will make windows scream. -->
+    <exec failonerror="true" dir="${java.io.tmpdir}/${itPom.artifactId}-${itPom.version}" executable="cmd">
       <arg value="/c"/>
       <arg value="${maven.home}\bin\mvn.bat"/>
-      <arg value="-B"/>
       <arg value="-Prun-its"/>
       <arg value="clean"/>
       <arg value="install"/>
@@ -230,16 +237,17 @@
 
   <target name="its-unix" if="its.unix">
     <echo>Retrieving integration tests</echo>
-    <exec failonerror="true" dir="${basedir}/maven-integration-tests" executable="${maven.home}/bin/mvn">
-      <arg value="-B"/>
-      <arg value="initialize"/>
+    <exec dir="${basedir}/${itPom.artifactId}" executable="${maven.home}/bin/mvn">
+      <arg value="process-resources"/>
+    </exec>
+    <exec dir="${basedir}/${itPom.artifactId}/target/classes" executable="${maven.home}/bin/mvn">
+      <arg value="package"/>
     </exec>
     
     <echo>Running integration tests</echo>
-    <!-- Hard-coding to /tmp/ to avoid long path names that will make windows scream. -->
-    <exec failonerror="true" dir="/tmp/maven-integration-tests-${it.workdir.version}" executable="${maven.home}/bin/mvn">
+    <!-- Using java.io.tmpdir to avoid long path names that will make windows scream. -->
+    <exec failonerror="true" dir="${java.io.tmpdir}/${itPom.artifactId}-${itPom.version}" executable="${maven.home}/bin/mvn">
       <arg value="-Prun-its"/>
-      <arg value="-B"/>
       <arg value="clean"/>
       <arg value="install"/>
     </exec>
@@ -253,7 +261,7 @@
 
   <target name="with-its" depends="all,run-its"/>
   
-  <target name="set-temp-maven-home" depends="read-pom">
+  <target name="set-temp-maven-home" depends="read-poms">
     <property name="maven.home" value="${java.io.tmpdir}/apache-maven-${pom.version}"/>
     <echo>Using temporary maven install directory: ${maven.home}</echo>
   </target>

Modified: maven/components/branches/maven-2.0.x/maven-integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-integration-tests/pom.xml?rev=720706&r1=720705&r2=720706&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-integration-tests/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-integration-tests/pom.xml Tue Nov 25 17:52:03 2008
@@ -11,6 +11,9 @@
   
   <properties>
     <integrationTestSVNDir>trunk</integrationTestSVNDir>
+    
+    <!-- Using java.io.tmpdir to avoid long path names that will make windows scream. -->
+    <itDir>${java.io.tmpdir}/${pom.artifactId}-${pom.version}</itDir>
   </properties>
   
   <profiles>
@@ -19,8 +22,7 @@
       <activation>
         <activeByDefault>true</activeByDefault>
         <file>
-          <!-- NOT INTERPOLATED. These values must be explicit. -->
-          <exists>/tmp/maven-integration-tests-2.0.x/pom.xml</exists>
+          <exists>${itDir}/pom.xml</exists>
         </file>
       </activation>
       <build>
@@ -30,7 +32,7 @@
             <executions>
               <execution>
                 <id>scm</id>
-                <phase>initialize</phase>
+                <phase>package</phase>
                 <goals>
                   <goal>update</goal>
                 </goals>
@@ -44,8 +46,7 @@
       <id>checkout</id>
       <activation>
         <file>
-          <!-- NOT INTERPOLATED. These values must be explicit. -->
-          <missing>/tmp/maven-integration-tests-2.0.x/pom.xml</missing>
+          <missing>${itDir}/pom.xml</missing>
         </file>
       </activation>
       <build>
@@ -55,7 +56,7 @@
             <executions>
               <execution>
                 <id>scm</id>
-                <phase>initialize</phase>
+                <phase>package</phase>
                 <goals>
                   <goal>checkout</goal>
                 </goals>
@@ -74,10 +75,7 @@
         <version>1.1</version>
         <configuration>
           <connectionUrl>scm:svn:http://svn.apache.org/repos/asf/maven/core-integration-testing/${integrationTestSVNDir}</connectionUrl>
-          
-          <!-- Hard-coding to /tmp/ to avoid long path names that will make windows scream. -->
-          <!-- NOT INTERPOLATED DURING PROFILE ACTIVATION, so making these values explicit throughout to avoid confusion. -->
-          <checkoutDirectory>/tmp/maven-integration-tests-2.0.x</checkoutDirectory>
+          <checkoutDirectory>${itDir}</checkoutDirectory>
         </configuration>
       </plugin>
     </plugins>