Author: nickboldt
Date: 2010-05-08 14:22:50 -0400 (Sat, 08 May 2010)
New Revision: 21978
Modified:
branches/modular_build/build/build.xml
branches/modular_build/parent-pom.xml
Log:
better fallback support for source checkout/update when svnant / svnkit unavailable
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-08 16:47:19 UTC (rev 21977)
+++ branches/modular_build/build/build.xml 2010-05-08 18:22:50 UTC (rev 21978)
@@ -163,31 +163,20 @@
<target name="get.svnant" unless="svnant.jar.exists">
<property name="SVNANT_MIRROR"
value="http://www.tigris.org/files/documents/906/46267" />
<if>
- <os family="windows" />
+ <not>
+ <os family="windows" />
+ </not>
<then>
- <if>
- <available file="${WORKINGDIR}/svnant.jar" type="file" />
- <then>
- <copy todir="${COMMON_TOOLS}" failonerror="true">
- <fileset dir="${WORKINGDIR}" includes="*.jar" />
- </copy>
- </then>
- <else>
- <!-- ant <get> does not work due to 302/200 redirections -->
- <get src="${SVNANT_MIRROR}/svnant-1.3.0.zip"
- dest="${COMMON_TOOLS}/svnant-1.3.0.zip"
- verbose="true"
- usetimestamp="true"
- />
- </else>
- </if>
+ <property name="svnant.enabled" value="false" />
</then>
<else>
+ <property name="svnant.enabled" value="true" />
<exec executable="wget" dir="${COMMON_TOOLS}">
<arg line="${SVNANT_MIRROR}/svnant-1.3.0.zip --no-clobber" />
</exec>
</else>
</if>
+
<if>
<available file="${COMMON_TOOLS}/svnant-1.3.0.zip" type="file"
/>
<then>
@@ -208,7 +197,7 @@
</not>
<then>
<fail>Error!
-Cannot proceed - must install svnant.jar from ${SVNANT_MIRROR}/svnant-1.3.0.zip into
${COMMON_TOOLS}/.
+Build cannot proceed - must install svnant.jar + other jars from
${SVNANT_MIRROR}/svnant-1.3.0.zip into ${COMMON_TOOLS}/.
</fail>
</then>
</elseif>
@@ -297,26 +286,63 @@
<equals arg1="@{op}" arg2="up" />
<then>
<now level="info">Update @{COMPONENT}</now>
- <svn javahl="false" svnkit="true"
failonerror="false">
- <update recurse="${svn.recurse}" dir="@{component}" />
- </svn>
+ <if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true"
failonerror="false">
+ <update recurse="${svn.recurse}" dir="@{component}"
/>
+ </svn>
+ </then>
+ <else>
+ <antcall target="mvn">
+ <param name="MAVEN_DIR" value="${WORKINGDIR}" />
+ <param name="MAVEN_FLAGS"
+ value="scm:update -e -q -B -fae -Dmaven.test.skip
-DworkingDirectory=${WORKINGDIR}/@{component}
-DconnectionUrl=scm:svn:${svn.root}/@{component}
-DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
+ />
+ <param name="noXvfb" value="true" />
+ </antcall>
+ </else>
+ </if>
</then>
<else>
<now level="info">Fetch sources from ${svn.root}/@{component} into
${WORKINGDIR}/@{component}</now>
- <svn javahl="false" svnkit="true"
failonerror="true">
- <checkout recurse="${svn.recurse}"
- url="${svn.root}/@{component}"
- destpath="${WORKINGDIR}/@{component}"
- />
- </svn>
+ <if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true"
failonerror="true">
+ <checkout recurse="${svn.recurse}"
+ url="${svn.root}/@{component}"
+ destpath="${WORKINGDIR}/@{component}"
+ />
+ </svn>
+
+ </then>
+ <else>
+ <antcall target="mvn">
+ <param name="MAVEN_DIR" value="${WORKINGDIR}" />
+ <param name="MAVEN_FLAGS"
+ value="scm:checkout -e -q -B -fae -Dmaven.test.skip
-DskipCheckoutIfExists=true -DcheckoutDirectory=${WORKINGDIR}/@{component}
-DworkingDirectory=${WORKINGDIR}/@{component}
-DconnectionUrl=scm:svn:${svn.root}/@{component}
-DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
+ />
+ <param name="noXvfb" value="true" />
+ </antcall>
+ </else>
+ </if>
</else>
</if>
<!-- Store svn info so we can compare it later and thus not need to update or
checkout every time -->
- <svn javahl="false" svnkit="true"
failonerror="false">
- <info target="${WORKINGDIR}/@{component}"
propprefix="svn.info.@{component}" verbose="false" />
- </svn>
<if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true"
failonerror="false">
+ <info target="${WORKINGDIR}/@{component}"
+ propprefix="svn.info.@{component}"
+ verbose="false"
+ />
+ </svn>
+ </then>
+ </if>
+ <if>
<isset property="svn.info.(a){component}.rev" />
<then>
<echo
file="${WORKINGDIR}/svn.info-@{component}.txt">svn.info.(a){component}.rev =
${svn.info.(a){component}.rev}
@@ -371,13 +397,18 @@
<then>
<property file="${WORKINGDIR}/svn.info-(a){COMPONENT}.txt" />
<!-- check svn info; if new version found, svn up -->
- <svn javahl="false" svnkit="true"
failonerror="false">
- <info target="${WORKINGDIR}/@{COMPONENT}"
- propprefix="svn.info.(a){COMPONENT}.check"
- verbose="false"
- />
- </svn>
<if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true"
failonerror="false">
+ <info target="${WORKINGDIR}/@{COMPONENT}"
+ propprefix="svn.info.(a){COMPONENT}.check"
+ verbose="false"
+ />
+ </svn>
+ </then>
+ </if>
+ <if>
<or>
<not>
<isset property="svn.info.(a){COMPONENT}.rev" />
Modified: branches/modular_build/parent-pom.xml
===================================================================
--- branches/modular_build/parent-pom.xml 2010-05-08 16:47:19 UTC (rev 21977)
+++ branches/modular_build/parent-pom.xml 2010-05-08 18:22:50 UTC (rev 21978)
@@ -37,9 +37,9 @@
<artifactId>maven-scm-plugin</artifactId>
<version>1.0</version>
<configuration>
- <!-- <goals>install</goals> -->
- <skipCheckoutIfExists>true</skipCheckoutIfExists>
- <checkoutDirectory>sources</checkoutDirectory>
+ <useNonInteractive>true</useNonInteractive>
+ <connectionType>connection</connectionType>
+ <!-- <connectionType>developerConnection</connectionType> -->
</configuration>
</plugin>
@@ -50,11 +50,6 @@
<configuration>
<resolver>p2</resolver>
<environments>
- <!-- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment> -->
<environment>
<os>macosx</os>
<ws>cocoa</ws>
@@ -225,6 +220,17 @@
</activation>
<repositories>
<repository>
+ <id>svnkit13</id>
+ <
url>http://eclipse.svnkit.com/1.3.x/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
<id>subclipse16</id>
<
url>http://subclipse.tigris.org/update_1.6.x/</url>
<layout>p2</layout>