Author: thomas.diesler(a)jboss.com
Date: 2008-02-25 06:51:32 -0500 (Mon, 25 Feb 2008)
New Revision: 5793
Modified:
stack/metro/trunk/
stack/metro/trunk/ant-import/macros-deploy-metro.xml
stack/metro/trunk/build.xml
Log:
[JBWS-1982] Simplify deploy/undeploy cycles for different stacks
deploy/undeploy based on filelist
Property changes on: stack/metro/trunk
___________________________________________________________________
Name: svn:ignore
- output
version.properties.md5
thirdparty
ant.properties
glassfish-metro
+ output
version.properties.md5
thirdparty
ant.properties
glassfish-metro
cvs
thirdparty-gen
checkout_id-*
Modified: stack/metro/trunk/ant-import/macros-deploy-metro.xml
===================================================================
--- stack/metro/trunk/ant-import/macros-deploy-metro.xml 2008-02-25 11:49:44 UTC (rev
5792)
+++ stack/metro/trunk/ant-import/macros-deploy-metro.xml 2008-02-25 11:51:32 UTC (rev
5793)
@@ -13,6 +13,11 @@
<project>
+ <!--
+ TODO: This assumes that the same set of files is deployed to all containers,
+ in which case it would be suffient to have a single deploy/undeploy macro def.
+ -->
+
<patternset id="client.stack.patternset">
<include name="jbossws-metro-client.jar"/>
</patternset>
@@ -51,7 +56,11 @@
<attribute name="thirdpartylibs"/>
<sequential>
<fail message="Not available: ${jboss422.available.file}"
unless="jboss422.available"/>
- <copy todir="${jboss422.home}/client"
overwrite="true">
+
+ <delete dir="${metro.output.deploy.dir}"/>
+
+ <mkdir dir="${metro.output.deploy.dir}/client"/>
+ <copy todir="${metro.output.deploy.dir}/client"
overwrite="true">
<fileset dir="@{stacklibs}">
<patternset refid="client.stack.patternset"/>
</fileset>
@@ -59,36 +68,42 @@
<patternset refid="client.patternset"/>
</fileset>
</copy>
- <copy todir="${jboss422.home}/lib" overwrite="true">
+
+ <mkdir dir="${metro.output.deploy.dir}/lib"/>
+ <copy todir="${metro.output.deploy.dir}/lib"
overwrite="true">
<fileset dir="@{thirdpartylibs}">
<patternset refid="lib.patternset"/>
</fileset>
</copy>
- <mkdir
dir="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <unjar
dest="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro42.sar"/>
- <mkdir
dir="${jboss422.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <unzip
dest="${jboss422.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
+ <unjar
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro42.sar"/>
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+
+ <fileset id="jbossws.deploy.files"
dir="${metro.output.deploy.dir}"
excludes="jbossws.deploy.files.txt"/>
+ <copy todir="${jboss422.home}" overwrite="true">
+ <fileset refid="jbossws.deploy.files"/>
+ </copy>
+
+ <property name="jbossws.deploy.files"
refid="jbossws.deploy.files"/>
+ <echo file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
message="${jbossws.deploy.files}"/>
+ <replace file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
token=";" value=" "/>
+ <copy
todir="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws.sar"
file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
overwrite="true"/>
+
</sequential>
</macrodef>
<!-- Remove jbossws/metro from jboss422 -->
<macrodef name="macro-undeploy-metro422">
<sequential>
+
+ <loadfile property="jbossws.undeploy.files"
srcfile="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.deploy.files.txt"
failonerror="false"/>
+ <property name="jbossws.undeploy.files"
value="nothing.to.undeploy"/>
<delete>
- <!-- CLIENT JARS -->
- <fileset dir="${jboss422.home}/client">
- <patternset refid="client.stack.patternset"/>
- <patternset refid="client.patternset"/>
- </fileset>
-
- <!-- BOOTSTRAP JARS -->
- <fileset dir="${jboss422.home}/lib">
- <patternset refid="lib.patternset"/>
- </fileset>
+ <fileset dir="${jboss422.home}"
includes="${jbossws.undeploy.files}"/>
</delete>
-
- <delete
dir="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <delete
dir="${jboss422.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+
</sequential>
</macrodef>
@@ -101,7 +116,11 @@
<attribute name="thirdpartylibs"/>
<sequential>
<fail message="Not available: ${jboss423.available.file}"
unless="jboss423.available"/>
- <copy todir="${jboss423.home}/client"
overwrite="true">
+
+ <delete dir="${metro.output.deploy.dir}"/>
+
+ <mkdir dir="${metro.output.deploy.dir}/client"/>
+ <copy todir="${metro.output.deploy.dir}/client"
overwrite="true">
<fileset dir="@{stacklibs}">
<patternset refid="client.stack.patternset"/>
</fileset>
@@ -109,36 +128,42 @@
<patternset refid="client.patternset"/>
</fileset>
</copy>
- <copy todir="${jboss423.home}/lib" overwrite="true">
+
+ <mkdir dir="${metro.output.deploy.dir}/lib"/>
+ <copy todir="${metro.output.deploy.dir}/lib"
overwrite="true">
<fileset dir="@{thirdpartylibs}">
<patternset refid="lib.patternset"/>
</fileset>
</copy>
- <mkdir
dir="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <unjar
dest="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro42.sar"/>
- <mkdir
dir="${jboss423.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <unzip
dest="${jboss423.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
+ <unjar
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro42.sar"/>
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+
+ <fileset id="jbossws.deploy.files"
dir="${metro.output.deploy.dir}"
excludes="jbossws.deploy.files.txt"/>
+ <copy todir="${jboss423.home}" overwrite="true">
+ <fileset refid="jbossws.deploy.files"/>
+ </copy>
+
+ <property name="jbossws.deploy.files"
refid="jbossws.deploy.files"/>
+ <echo file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
message="${jbossws.deploy.files}"/>
+ <replace file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
token=";" value=" "/>
+ <copy
todir="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws.sar"
file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
overwrite="true"/>
+
</sequential>
</macrodef>
<!-- Remove jbossws/metro from jboss423 -->
<macrodef name="macro-undeploy-metro423">
<sequential>
+
+ <loadfile property="jbossws.undeploy.files"
srcfile="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.deploy.files.txt"
failonerror="false"/>
+ <property name="jbossws.undeploy.files"
value="nothing.to.undeploy"/>
<delete>
- <!-- CLIENT JARS -->
- <fileset dir="${jboss423.home}/client">
- <patternset refid="client.stack.patternset"/>
- <patternset refid="client.patternset"/>
- </fileset>
-
- <!-- BOOTSTRAP JARS -->
- <fileset dir="${jboss423.home}/lib">
- <patternset refid="lib.patternset"/>
- </fileset>
+ <fileset dir="${jboss423.home}"
includes="${jbossws.undeploy.files}"/>
</delete>
-
- <delete
dir="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <delete
dir="${jboss423.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+
</sequential>
</macrodef>
@@ -152,8 +177,11 @@
<sequential>
<fail message="Not available: ${jboss500.available.file}"
unless="jboss500.available"/>
+ <delete dir="${metro.output.deploy.dir}"/>
+
<!-- CLIENT JARS -->
- <copy todir="${jboss500.home}/client" overwrite="true">
+ <mkdir dir="${metro.output.deploy.dir}/client"/>
+ <copy todir="${metro.output.deploy.dir}/client"
overwrite="true">
<fileset dir="@{stacklibs}">
<patternset refid="client.stack.patternset"/>
</fileset>
@@ -163,49 +191,49 @@
</copy>
<!-- BOOTSTRAP JARS -->
- <copy todir="${jboss500.home}/lib" overwrite="true">
+ <mkdir dir="${metro.output.deploy.dir}/lib"/>
+ <copy todir="${metro.output.deploy.dir}/lib"
overwrite="true">
<fileset dir="@{thirdpartylibs}">
<patternset refid="lib.patternset"/>
</fileset>
</copy>
<!--SERVER JARS -->
- <copy todir="${jboss500.home}/server/${jboss.server.instance}/lib"
overwrite="true">
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/lib"/>
+ <copy
todir="${metro.output.deploy.dir}/server/${jboss.server.instance}/lib"
overwrite="true">
<fileset dir="@{thirdpartylibs}">
<patternset refid="serverlib.patternset"/>
</fileset>
</copy>
- <mkdir
dir="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <unjar
dest="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro50.sar"/>
- <mkdir
dir="${jboss500.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <unzip
dest="${jboss500.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
+ <unjar
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro50.sar"/>
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+
+ <fileset id="jbossws.deploy.files"
dir="${metro.output.deploy.dir}"
excludes="jbossws.deploy.files.txt"/>
+ <copy todir="${jboss500.home}" overwrite="true">
+ <fileset refid="jbossws.deploy.files"/>
+ </copy>
+
+ <property name="jbossws.deploy.files"
refid="jbossws.deploy.files"/>
+ <echo file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
message="${jbossws.deploy.files}"/>
+ <replace file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
token=";" value=" "/>
+ <copy
todir="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossws.sar"
file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
overwrite="true"/>
+
</sequential>
</macrodef>
<!-- Remove jbossws/metro from jboss500 -->
<macrodef name="macro-undeploy-metro500">
<sequential>
+
+ <loadfile property="jbossws.undeploy.files"
srcfile="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.deploy.files.txt"
failonerror="false"/>
+ <property name="jbossws.undeploy.files"
value="nothing.to.undeploy"/>
<delete>
- <!-- CLIENT JARS -->
- <fileset dir="${jboss500.home}/client">
- <patternset refid="client.stack.patternset"/>
- <patternset refid="client.patternset"/>
- </fileset>
-
- <!-- BOOTSTRAP JARS -->
- <fileset dir="${jboss500.home}/lib">
- <patternset refid="lib.patternset"/>
- </fileset>
-
- <!-- SERVER JARS -->
- <fileset
dir="${jboss500.home}/server/${jboss.server.instance}/lib">
- <patternset refid="serverlib.patternset"/>
- </fileset>
+ <fileset dir="${jboss500.home}"
includes="${jbossws.undeploy.files}"/>
</delete>
-
- <delete
dir="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <delete
dir="${jboss500.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+
</sequential>
</macrodef>
@@ -219,8 +247,11 @@
<sequential>
<fail message="Not available: ${jboss501.available.file}"
unless="jboss501.available"/>
+ <delete dir="${metro.output.deploy.dir}"/>
+
<!-- CLIENT JARS -->
- <copy todir="${jboss501.home}/client" overwrite="true">
+ <mkdir dir="${metro.output.deploy.dir}/client"/>
+ <copy todir="${metro.output.deploy.dir}/client"
overwrite="true">
<fileset dir="@{stacklibs}">
<patternset refid="client.stack.patternset"/>
</fileset>
@@ -230,49 +261,49 @@
</copy>
<!-- BOOTSTRAP JARS -->
- <copy todir="${jboss501.home}/lib" overwrite="true">
+ <mkdir dir="${metro.output.deploy.dir}/lib"/>
+ <copy todir="${metro.output.deploy.dir}/lib"
overwrite="true">
<fileset dir="@{thirdpartylibs}">
<patternset refid="lib.patternset"/>
</fileset>
</copy>
<!--SERVER JARS -->
- <copy todir="${jboss501.home}/server/${jboss.server.instance}/lib"
overwrite="true">
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/lib"/>
+ <copy
todir="${metro.output.deploy.dir}/server/${jboss.server.instance}/lib"
overwrite="true">
<fileset dir="@{thirdpartylibs}">
<patternset refid="serverlib.patternset"/>
</fileset>
</copy>
- <mkdir
dir="${jboss501.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <unjar
dest="${jboss501.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro50.sar"/>
- <mkdir
dir="${jboss501.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <unzip
dest="${jboss501.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
+ <unjar
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"
src="(a){stacklibs}/jbossws-metro50.sar"/>
+ <mkdir
dir="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip
dest="${metro.output.deploy.dir}/server/${jboss.server.instance}/deploy/juddi-service.sar"
src="(a){thirdpartylibs}/juddi-service.sar"/>
+
+ <fileset id="jbossws.deploy.files"
dir="${metro.output.deploy.dir}"
excludes="jbossws.deploy.files.txt"/>
+ <copy todir="${jboss501.home}" overwrite="true">
+ <fileset refid="jbossws.deploy.files"/>
+ </copy>
+
+ <property name="jbossws.deploy.files"
refid="jbossws.deploy.files"/>
+ <echo file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
message="${jbossws.deploy.files}"/>
+ <replace file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
token=";" value=" "/>
+ <copy
todir="${jboss501.home}/server/${jboss.server.instance}/deploy/jbossws.sar"
file="${metro.output.deploy.dir}/jbossws.deploy.files.txt"
overwrite="true"/>
+
</sequential>
</macrodef>
<!-- Remove jbossws/metro from jboss501 -->
<macrodef name="macro-undeploy-metro501">
<sequential>
+
+ <loadfile property="jbossws.undeploy.files"
srcfile="${jboss501.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.deploy.files.txt"
failonerror="false"/>
+ <property name="jbossws.undeploy.files"
value="nothing.to.undeploy"/>
<delete>
- <!-- CLIENT JARS -->
- <fileset dir="${jboss501.home}/client">
- <patternset refid="client.stack.patternset"/>
- <patternset refid="client.patternset"/>
- </fileset>
-
- <!-- BOOTSTRAP JARS -->
- <fileset dir="${jboss501.home}/lib">
- <patternset refid="lib.patternset"/>
- </fileset>
-
- <!-- SERVER JARS -->
- <fileset
dir="${jboss501.home}/server/${jboss.server.instance}/lib">
- <patternset refid="serverlib.patternset"/>
- </fileset>
+ <fileset dir="${jboss501.home}"
includes="${jbossws.undeploy.files}"/>
</delete>
-
- <delete
dir="${jboss501.home}/server/${jboss.server.instance}/deploy/jbossws-metro.sar"/>
- <delete
dir="${jboss501.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+
</sequential>
</macrodef>
Modified: stack/metro/trunk/build.xml
===================================================================
--- stack/metro/trunk/build.xml 2008-02-25 11:49:44 UTC (rev 5792)
+++ stack/metro/trunk/build.xml 2008-02-25 11:51:32 UTC (rev 5793)
@@ -34,6 +34,7 @@
<property name="metro.output.dir"
value="${metro.dir}/output"/>
<property name="metro.output.apidocs.dir"
value="${metro.output.dir}/apidocs"/>
<property name="metro.output.classes.dir"
value="${metro.output.dir}/classes"/>
+ <property name="metro.output.deploy.dir"
value="${metro.output.dir}/deploy"/>
<property name="metro.output.etc.dir"
value="${metro.output.dir}/etc"/>
<property name="metro.output.lib.dir"
value="${metro.output.dir}/lib"/>