Author: heiko.braun(a)jboss.com
Date: 2008-01-08 06:52:38 -0500 (Tue, 08 Jan 2008)
New Revision: 5412
Modified:
stack/metro/branches/hbraun/ant-import/build-metro.xml
stack/metro/branches/hbraun/ant.properties.example
Log:
Conditional build based on cvs tag
Modified: stack/metro/branches/hbraun/ant-import/build-metro.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/build-metro.xml 2008-01-08 10:19:30 UTC (rev
5411)
+++ stack/metro/branches/hbraun/ant-import/build-metro.xml 2008-01-08 11:52:38 UTC (rev
5412)
@@ -13,9 +13,6 @@
<project basedir="." name="Build-Metro">
-
- <property name="cvs.user" value="heiko_braun"/>
- <property name="cvs.tag" value="WSIT-1_0-BRANCH"/>
<property name="cvs.dir" value="cvs"/>
<property name="metro.dir" value="${cvs.dir}/wsit/wsit"/>
@@ -23,7 +20,7 @@
<attribute name="target" default="main"/>
<attribute name="file" default="build.xml"/>
<sequential>
- <exec dir="${metro.dir}" executable="ant">
+ <exec dir="${metro.dir}" executable="ant"
failonerror="true">
<arg value="@{target}"/>
<arg value="-f"/>
<arg value="@{file}"/>
@@ -31,11 +28,20 @@
</sequential>
</macrodef>
- <target name="checkout" depends="init"
description="Checkout/Update the local metro sources">
+ <target name="-cvs.init">
+ <available property="same.checkout"
file="checkout_id-${cvs.tag}" type="file"/>
+ </target>
+ <target name="checkout" depends="init, -cvs.init, -cvs.message"
unless="same.checkout"
+ description="Checkout/Update the local metro sources">
+
+ <touch file="checkout_id-${cvs.tag}"/>
+
<mkdir dir="${cvs.dir}"/>
+ <echo>**********************************</echo>
<echo>CVS out to: ${cvs.dir}</echo>
+ <echo>**********************************</echo>
<cvs cvsRoot=":pserver:${cvs.user}@cvs.dev.java.net:/cvs"
package="wsit/wsit"
@@ -45,15 +51,28 @@
</target>
+ <target name="-cvs.message" if="same.checkout">
+ <echo>**********************************</echo>
+ <echo>No checkout required.</echo>
+ <echo>Using same CVS tag: ${cvs.tag} </echo>
+ <echo>To force an update you need to remove the file
'./checkout_id-${cvs.tag}'</echo>
+ <echo>**********************************</echo>
+ </target>
+
<target name="install.adapter" depends="init">
<copy todir="${metro.dir}"
file="ant-import/metro-build-adapter.xml" overwrite="true"
verbose="true"/>
</target>
<target name="clean.metro">
<antbridge target="clean"/>
+ <delete dir="thirdparty-gen"/>
</target>
- <target name="build.metro" depends="clean.metro,
install.adapter">
+ <target name="clean.cvs">
+ <delete file="checkout_id-${cvs.tag}"/>
+ </target>
+
+ <target name="build.metro" depends="checkout, install.adapter,
clean.metro">
<antbridge target="copy-binaries"
file="metro-build-adapter.xml"/>
<echo>*********************************</echo>
<echo>The metro binaries have been copied to
'thirdparty-gen'</echo>
Modified: stack/metro/branches/hbraun/ant.properties.example
===================================================================
--- stack/metro/branches/hbraun/ant.properties.example 2008-01-08 10:19:30 UTC (rev 5411)
+++ stack/metro/branches/hbraun/ant.properties.example 2008-01-08 11:52:38 UTC (rev 5412)
@@ -38,3 +38,9 @@
javac.deprecation=no
javac.fail.onerror=yes
javac.verbose=no
+
+#
+# Metro CVS access
+#
+cvs.user=NONE
+cvs.tag=WSIT-1_0-BRANCH
\ No newline at end of file
Show replies by date