[jboss-svn-commits] JBL Code SVN: r27296 - in labs/jbosstm/trunk: ArjunaCore and 18 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jun 29 11:43:48 EDT 2009


Author: jhalliday
Date: 2009-06-29 11:43:48 -0400 (Mon, 29 Jun 2009)
New Revision: 27296

Added:
   labs/jbosstm/trunk/ArjunaJTS/sharedbuild.xml
   labs/jbosstm/trunk/antbuildsystem/ant-contrib-1.0b3.jar
   labs/jbosstm/trunk/sharedbuild.xml
Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml
   labs/jbosstm/trunk/ArjunaCore/build.xml
   labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml
   labs/jbosstm/trunk/ArjunaCore/txoj/build.xml
   labs/jbosstm/trunk/ArjunaJTA/build.xml
   labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml
   labs/jbosstm/trunk/ArjunaJTA/jta/build.xml
   labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml
   labs/jbosstm/trunk/ArjunaJTS/build.xml
   labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml
   labs/jbosstm/trunk/ArjunaJTS/jts/build.xml
   labs/jbosstm/trunk/ArjunaJTS/orbportability/build.xml
   labs/jbosstm/trunk/ArjunaJTS/tsmx/build.xml
   labs/jbosstm/trunk/antbuildsystem/build.xml
   labs/jbosstm/trunk/atsintegration/build.xml
   labs/jbosstm/trunk/build.xml
   labs/jbosstm/trunk/common/build.xml
   labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml
   labs/jbosstm/trunk/qa/run-dtf-local.xml
   labs/jbosstm/trunk/qa/tests/build-jts.xml
Log:
Update ant build scipts. JBTM-574


Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,578 +15,43 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<project name="module-arjuna" default="com.hp.mw.ts.arjuna.build" basedir=".">
+<project name="module-arjuna" default="dist.leafnode" basedir=".">
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+    <property name="modulename" value="arjuna"/>
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="arjuna"/>
+    <property name="global.ext.test.libs" value="junit.jar,TestingFramework.jar"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-arjuna.properties"/>
+    <import file="../../sharedbuild.xml"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.arjuna.objectstore.oracle80.compile" value="no"/>
-	<property name="com.hp.mw.ts.arjuna.objectstore.oracle.compile" value="yes"/>
-	<property name="com.hp.mw.ts.arjuna.objectstore.sqlserver.compile" value="yes"/>
-    <!-- Added by Arnaud: Conditional compilation of the derby Object store implementation . Conditional compilation of the derby Object store implementation . -->
-    <property name="com.hp.mw.ts.arjuna.objectstore.derby.compile" value="no"/>
+        <import-module.macro module="common"/>
 
-	<property name="com.hp.mw.ts.arjuna.tests.compile" value="yes"/>
-	<property name="com.hp.mw.ts.arjuna.tests.install" value="no"/>
-    <property name="com.hp.mw.ts.arjuna.services.install" value="yes"/>
-
-	<!-- Set internal property defaults -->
-    <!-- Path names -->
-	<property name="com.hp.mwlabs.ts.arjuna.src" location="classes"/>
-	<property name="com.hp.mwlabs.ts.arjuna.etc" location="etc"/>
-	<property name="com.hp.mwlabs.ts.arjuna.destroot" location="build"/>
-    <property name="com.hp.mwlabs.ts.arjuna.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.arjuna.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.arjuna.tests.src" location="tests/classes"/>
-	<property name="com.hp.mwlabs.ts.arjuna.tests.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/tests"/>
-    <property name="com.hp.mwlabs.ts.arjuna.tests.destdir" location="${com.hp.mwlabs.ts.arjuna.jar.dest}/tests/"/>
-	<property name="com.hp.mwlabs.ts.arjuna.reports.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/reports"/>
-
-	<property name="com.hp.mwlabs.ts.arjuna.services.src" location="services/classes"/>
-    <property name="com.hp.mwlabs.ts.arjuna.services.config" location="services/config"/>
-    <property name="com.hp.mwlabs.ts.arjuna.services.scripts" location="services/scripts"/>
-    <property name="com.hp.mwlabs.ts.arjuna.services.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/services"/>
-    <property name="com.hp.mwlabs.ts.arjuna.services.destdir" location="${com.hp.mwlabs.ts.arjuna.jar.dest}/services/"/>
-
-		<!-- Relative path for files to exclude in main compile -->
-<!--
-	<property name="com.hp.mwlabs.ts.arjuna.compile.excludes" value="**/jdbc/**/*.java"/>
--->
-
-    <property name="com.hp.mwlabs.ts.arjuna.propertyfile.src" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-    <property name="com.hp.mwlabs.ts.arjuna.recoverypropertyfile.src" value="RecoveryManager-properties.xml"/>
-    <property name="com.hp.mwlabs.ts.arjuna.loggingpropertyfile.src" value="CommonLogging-properties.xml"/>
-
-    <property name="com.hp.mwlabs.ts.arjuna.resourcebundle" value="arjuna_msg_en_US.properties"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.arjuna.init"  depends="com.hp.mwlabs.ts.arjuna.setpropertyfiles">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<tstamp>
-		<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
-
-                <!-- Define classpath builder task -->
-                <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Initialising module arjuna"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Check which bits to compile and/or install -->
-		<condition property="com.hp.mwlabs.ts.arjuna.objectstore.oracle80.compile">
-			<equals arg1="${com.hp.mw.ts.arjuna.objectstore.oracle80.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.arjuna.objectstore.oracle.compile">
-			<equals arg1="${com.hp.mw.ts.arjuna.objectstore.oracle.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.arjuna.objectstore.sqlserver.compile">
-			<equals arg1="${com.hp.mw.ts.arjuna.objectstore.sqlserver.compile}" arg2="yes"/>
-		</condition>
-
-        <!-- Added by Arnaud: Conditional compilation of the derby Object store implementation .
-             Conditional compilation of the derby Object store implementation . -->
-        <condition property="com.hp.mwlabs.ts.arjuna.objectstore.derby.compile">
-			<equals arg1="${com.hp.mw.ts.arjuna.objectstore.derby.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.arjuna.tests.compile">
-			<equals arg1="${com.hp.mw.ts.arjuna.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.arjuna.tests.install">
-			<equals arg1="${com.hp.mw.ts.arjuna.tests.install}" arg2="yes"/>
-		</condition>
-
-        <condition property="com.hp.mwlabs.ts.arjuna.services.install">
-            <equals arg1="${com.hp.mw.ts.arjuna.services.install}" arg2="yes"/>
-        </condition>
-
-		<!-- Set the module property files details -->
-
-        <!-- Set the module property files details -->
-        <property name="com.hp.mwlabs.ts.arjuna.propertyfile" value="${com.hp.mwlabs.ts.arjuna.propertyfile.src}"/>
-        <property name="com.hp.mwlabs.ts.arjuna.mappingfile" value="${com.hp.mwlabs.ts.modulename}-properties.mappings"/>
-        <property name="com.hp.mwlabs.ts.arjuna.recoverypropertyfile" value="${com.hp.mwlabs.ts.arjuna.recoverypropertyfile.src}"/>
-        <property name="com.hp.mwlabs.ts.arjuna.loggingpropertyfile" value="${com.hp.mwlabs.ts.arjuna.loggingpropertyfile.src}"/>
-        <property name="com.hp.mwlabs.ts.arjuna.log4jpropertyfile" value="log4j.properties"/>
-
-        <property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property file name : ${com.hp.mwlabs.ts.arjuna.propertyfile}"/>
-		<echo message="Recovery property file name : ${com.hp.mwlabs.ts.arjuna.recoverypropertyfile}"/>
-		<echo message="Commong logging property file name : ${com.hp.mwlabs.ts.arjuna.loggingpropertyfile}"/>
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
-
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.ts.arjuna.dest}"/>
-
-	</target>
-
-    <!-- If this build is part of a product build set the property files to the product property file -->
-    <target name="com.hp.mwlabs.ts.arjuna.setpropertyfiles" if="com.hp.mw.ts.product.name">
-
-            <echo>Overriding propertyfile settings with product propertyfile settings</echo>
-            <property name="com.hp.mwlabs.ts.arjuna.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-            <property name="com.hp.mwlabs.ts.arjuna.recoverypropertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-            <property name="com.hp.mwlabs.ts.arjuna.loggingpropertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-
     </target>
 
-    <!-- Default build target -->
-    <target name="com.hp.mw.ts.arjuna.build" depends="com.hp.mw.ts.arjuna.jar, com.hp.mwlabs.ts.arjuna.tests.jar, com.hp.mwlabs.ts.arjuna.services.jar"/>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.ts.arjuna.compile" depends="com.hp.mwlabs.ts.arjuna.init,com.hp.mwlabs.ts.arjuna.objectstore.compile,com.hp.mwlabs.ts.arjuna.generateresourcebundle">
-
-		<echo message="Compiling module"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.dest}"
-			excludes="${com.hp.mwlabs.ts.arjuna.compile.excludes}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.src}"/>
-			</classpath>
-		</javac>
-
-        <!-- Process the properties -->
-    	<property name="property.file" value="arjuna.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.ts.arjuna.dest}/${property.file}">
-			<entry key="MODULE" value="${com.hp.mwlabs.ts.modulename}"/>
-			<entry key="SOURCEID" value="${com.hp.mw.sourceid}"/>
-			<entry key="BUILDINFO" value="${com.hp.mw.builder}"/>
-			<entry key="VERSION" value="${com.hp.mw.version}"/>
-			<entry key="DATE" value="${com.hp.mw.date}"/>
-			<entry key="NOTES" value="${com.hp.mw.notes}"/>
-			<entry key="ARJUNA_VERSION" value="${com.hp.mw.version}"/>
-			<entry key="PROPERTIES_FILE" value="${com.hp.mwlabs.ts.arjuna.propertyfile}"/>
-			<entry key="RECOVERY_PROPERTIES_FILE" value="${com.hp.mwlabs.ts.arjuna.recoverypropertyfile}"/>
-		</propertyfile>
-
-	</target>
-
-	<!-- Non-specific objectstore files -->
-	<target name="com.hp.mwlabs.ts.arjuna.objectstore.compile" depends="com.hp.mwlabs.ts.arjuna.objectstore.oracle80.compile, com.hp.mwlabs.ts.arjuna.objectstore.oracle.compile, com.hp.mwlabs.ts.arjuna.objectstore.sqlserver.compile, com.hp.mwlabs.ts.arjuna.objectstore.derby.compile">
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.dest}"
-			classpath="${com.hp.mwlabs.ts.arjuna.src}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/objectstore/jdbc/accessors/accessor.java"/>
-			<include name="**/objectstore/JDBAccess.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.src}"/>
-			</classpath>
-		</javac>
-
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.objectstore.oracle80.compile" depends="com.hp.mwlabs.ts.arjuna.init" if="com.hp.mwlabs.ts.arjuna.objectstore.oracle80.compile">
-
-		<echo message="Compiling oracle 8.0 object store support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/objectstore/jdbc/oracle_8_0_driver.java"/>
-			<include name="**/objectstore/jdbc/oracle_8_0_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.objectstore.oracle.compile" depends="com.hp.mwlabs.ts.arjuna.init" if="com.hp.mwlabs.ts.arjuna.objectstore.oracle.compile">
-
-		<echo message="Compiling oracle generic object store support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/objectstore/jdbc/oracle_driver.java"/>
-			<include name="**/objectstore/jdbc/oracle_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.objectstore.sqlserver.compile" depends="com.hp.mwlabs.ts.arjuna.init" if="com.hp.mwlabs.ts.arjuna.objectstore.sqlserver.compile">
-
-		<echo message="Compiling sql server object store support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/objectstore/jdbc/sqlserver_driver.java"/>
-			<include name="**/objectstore/jdbc/accessors/sqlserver_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-    <!-- Added by Arnaud: Conditional compilation of the derby Object store implementation .
-               Conditional compilation of the derby Object store implementation . -->
-    <target name="com.hp.mwlabs.ts.arjuna.objectstore.derby.compile" depends="com.hp.mwlabs.ts.arjuna.init" if="com.hp.mwlabs.ts.arjuna.objectstore.derby.compile">
-
-		<echo message="Compiling derby server object store support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/objectstore/jdbc/apache_driver.java"/>
-			<include name="**/objectstore/jdbc/accessors/apache_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-    <target name="com.hp.mwlabs.ts.arjuna.services.install" depends="com.hp.mwlabs.ts.arjuna.services.jar" if="com.hp.mwlabs.ts.arjuna.services.install">
-
-        <echo message="Installing services"/>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/config"/>
-
-        <copy todir="${com.hp.mw.installationdirectory}/services/config" filtering="on" overwrite="yes">
-            <fileset dir="${com.hp.mwlabs.ts.arjuna.services.config}">
-                <include name="*.conf"/>
-                <include name="*.properties"/>
-                <include name="*.xml"/>
-            </fileset>
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-            </filterset>
-        </copy>
-
-        <!-- Create copy of unix scripts for each *NIX platform -->
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/hpux"/>
-
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/hpux/">
-            <fileset dir="${com.hp.mwlabs.ts.arjuna.services.scripts}/unix">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/solaris"/>
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/solaris/">
-            <fileset dir="${com.hp.mwlabs.ts.arjuna.services.scripts}/unix">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/linux"/>
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/linux/">
-            <fileset dir="${com.hp.mwlabs.ts.arjuna.services.scripts}/unix">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/windows"/>
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/windows/">
-            <fileset dir="${com.hp.mwlabs.ts.arjuna.services.scripts}/windows">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+            <entry key="RECOVERY_PROPERTIES_FILE" value="jbossts-properties.xml"/>
+			<entry key="ARJUNA_VERSION" value="unknown"/>
+        </propertyfile>
     </target>
 
-    <target name="com.hp.mwlabs.ts.arjuna.services.jar" depends="com.hp.mwlabs.ts.arjuna.services.compile" if="com.hp.mwlabs.ts.arjuna.services.install">
-
-        <mkdir dir="${com.hp.mwlabs.ts.arjuna.services.destdir}"/>
-        <jar    basedir="${com.hp.mwlabs.ts.arjuna.services.dest}"
-                jarfile="${com.hp.mwlabs.ts.arjuna.services.destdir}/${com.hp.mwlabs.ts.modulename}_services.jar"/>
-
+    <target name="run.tests">
+        <run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/ReaperTestCase.java"/></tests>
+        </run.tests.macro>
+        <!--<run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/ReaperTestCase2.java"/></tests>
+        </run.tests.macro>-->
+        <run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/TxControlUnitTest.java"/></tests>
+        </run.tests.macro>
+        <run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/PersistenceUnitTest.java"/></tests>
+        </run.tests.macro>
     </target>
 
-    <target name="com.hp.mwlabs.ts.arjuna.services.compile" if="com.hp.mwlabs.ts.arjuna.services.install">
-
-        <echo message="Compiling services"/>
-
-        <mkdir dir="${com.hp.mwlabs.ts.arjuna.services.dest}"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-        <javac
-            srcdir="${com.hp.mwlabs.ts.arjuna.services.src}"
-            destdir="${com.hp.mwlabs.ts.arjuna.services.dest}"
-            debug="${com.hp.mwlabs.debug}"
-            deprecation="${com.hp.mwlabs.deprecation}"
-        >
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.hp.mwlabs.ts.arjuna.dest}"/>
-            </classpath>
-        </javac>
-
-    </target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.tests.jar" depends="com.hp.mw.ts.arjuna.tests.run" if="com.hp.mwlabs.ts.arjuna.tests.compile">
-
-            <mkdir dir="${com.hp.mwlabs.ts.arjuna.tests.destdir}"/>
-            <jar    basedir="${com.hp.mwlabs.ts.arjuna.tests.dest}"
-                    jarfile="${com.hp.mwlabs.ts.arjuna.tests.destdir}/${com.hp.mwlabs.ts.modulename}_tests.jar"/>
-
-        </target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.tests.compile" depends="com.hp.mw.ts.arjuna.jar" if="com.hp.mwlabs.ts.arjuna.tests.compile">
-
-		<echo message="Compiling tests"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.arjuna.tests.dest}"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.arjuna.tests.src}"
-			destdir="${com.hp.mwlabs.ts.arjuna.tests.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.arjuna.dest}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mw.ts.arjuna.tests.run" depends="com.hp.mwlabs.ts.arjuna.tests.compile" if="com.hp.mwlabs.ts.arjuna.tests.compile">
-        <mkdir dir="${com.hp.mwlabs.ts.arjuna.reports.dest}"/>
-        <junit printsummary="yes">
-            <formatter type="plain"/>
-            <classpath>
-                <pathelement location="${com.hp.mwlabs.ts.arjuna.tests.dest}"/>
-                <path location="${com.hp.mwlabs.ts.arjuna.dest}"/>
-                <pathelement path="${build.classpath}"/>
-                <pathelement location="etc"/>
-            </classpath>
-        	<batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-        	                todir="${com.hp.mwlabs.ts.arjuna.reports.dest}">
-        	                <fileset dir="${com.hp.mwlabs.ts.arjuna.tests.src}" includes="**/ReaperTestCase.java"/>
-        	            </batchtest>
-            <!-- decommission this until a better version of it can be provided which is not susceptible
-            to timing failures
-		<batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-		                todir="${com.hp.mwlabs.ts.arjuna.reports.dest}">
-		                <fileset dir="${com.hp.mwlabs.ts.arjuna.tests.src}" includes="**/ReaperTestCase2.java"/>
-		            </batchtest>
-		            -->
-            <batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-                todir="${com.hp.mwlabs.ts.arjuna.reports.dest}">
-                <fileset dir="${com.hp.mwlabs.ts.arjuna.tests.src}" includes="**/ReaperTestCase3.java"/>
-            </batchtest>
-        	<batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-        	        	                todir="${com.hp.mwlabs.ts.arjuna.reports.dest}">
-				<fileset dir="${com.hp.mwlabs.ts.arjuna.tests.src}" includes="**/TxControlUnitTest.java"/>
-        	</batchtest>
-        	<batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-        	        	        	                todir="${com.hp.mwlabs.ts.arjuna.reports.dest}">
-        					<fileset dir="${com.hp.mwlabs.ts.arjuna.tests.src}" includes="**/PersistenceUnitTest.java"/>
-        	</batchtest>
-        </junit>
-    </target>
-
-
-
-	<!-- Jar targets -->
-	<target name="com.hp.mw.ts.arjuna.jar" depends="com.hp.mw.ts.arjuna.compile">
-
-		<echo message="Building jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.arjuna.jar.dest}"/>
-
-        <copy
-            file="etc/${com.hp.mwlabs.ts.arjuna.mappingfile}"
-            tofile="${com.hp.mwlabs.ts.arjuna.dest}/${com.hp.mwlabs.ts.arjuna.mappingfile}"
-        />
-
-		<jar
-			jarfile="${com.hp.mwlabs.ts.arjuna.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"
-			basedir="${com.hp.mwlabs.ts.arjuna.dest}"
-		/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-			<classpath>
-				<pathelement location="${com.hp.mwlabs.ts.arjuna.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"/>
-			</classpath>
-		</classpath-builder>
-
-	</target>
-
-	<!-- Installation targets -->
-    <target name="com.hp.mw.ts.arjuna.install" depends="com.hp.mw.ts.arjuna.build, com.hp.mwlabs.ts.arjuna.tests.install, com.hp.mwlabs.ts.arjuna.services.install">
-            <echo message="Installing module arjuna"/>
-            <echo message="Installation directory : ${com.hp.mwlabs.installationdirectory}"/>
-            <mkdir dir="${com.hp.mw.propertydirectory}"/>
-
-            <taskdef name="merge-property-files"
-                         classname="com.hp.mw.buildsystem.ant.MergePropertyFiles" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-	    <!-- We need to erase the product property file to ensure we don't merge into a previous merged file -->
-	    <delete file="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.arjuna.propertyfile}"/>
-
-            <echo>Merging property files into main product property file</echo>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.arjuna.propertyfile}"
-                                      merge="${com.hp.mwlabs.ts.arjuna.etc}/default-${com.hp.mwlabs.ts.arjuna.propertyfile.src}"/>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.arjuna.recoverypropertyfile}"
-                                      merge="${com.hp.mwlabs.ts.arjuna.etc}/default-${com.hp.mwlabs.ts.arjuna.recoverypropertyfile.src}"/>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.arjuna.loggingpropertyfile}"
-                                      merge="${com.hp.mwlabs.ts.arjuna.etc}/default-${com.hp.mwlabs.ts.arjuna.loggingpropertyfile.src}"/>
-
-            <copy
-                    file="etc/${com.hp.mwlabs.ts.arjuna.log4jpropertyfile}"
-                    tofile="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.arjuna.log4jpropertyfile}"
-                    >
-            </copy>
-    </target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.tests.install" depends="com.hp.mwlabs.ts.arjuna.tests.compile" if="com.hp.mwlabs.ts.arjuna.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-        <target name="com.hp.mwlabs.ts.arjuna.generateresourcebundle">
-
-            <echo message="Generating Arjuna Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.ts.arjuna.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.ts.arjuna.dest}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.ts.arjuna.resourcebundle}"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.ts.arjuna.clean" depends="com.hp.mwlabs.ts.arjuna.tests.clean">
-
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.ts.arjuna.destroot}"/>
-		<delete dir="${com.hp.mwlabs.ts.arjuna.jar.dest}"/>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.arjuna.tests.clean">
-
-		<echo message="Cleaning tests"/>
-		<delete dir="${com.hp.mwlabs.ts.arjuna.tests.dest}"/>
-
-	</target>
-
-	<!-- Short target names -->
-	<target name="compile" depends="com.hp.mw.ts.arjuna.compile">
-
-	</target>
-
-	<target name="jar" depends="com.hp.mw.ts.arjuna.jar">
-
-	</target>
-
-	<target name="install" depends="com.hp.mw.ts.arjuna.install">
-
-	</target>
-
-	<target name="clean" depends="com.hp.mw.ts.arjuna.clean">
-
-	</target>
-
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaCore/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaCore/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,470 +15,139 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2353 2006-03-31 13:05:02Z  $ -->
-<project name="product" default="com.hp.mw.ts.product.build" basedir=".">
+<project name="module-arjunacore" default="dist" basedir=".">
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
+    <property name="modulename" value="arjunacore"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="product.properties"/>
+    <import file="../sharedbuild.xml"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    <property name="component-module-list" value="../common,arjuna,txoj,tsmx"/>
 
-	<!-- configure dependencies -->
-	<property name="com.arjuna.buildsystem.dir" location="${buildsystem.dir}"/>
-	<property name="com.arjuna.common.dir" location="${common.dir}"/>
-
-	<property name="com.arjuna.ext.dir" location="${ext.dir}"/>
-
-	<property name="com.arjuna.buildsystem.build.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
-
-	<property name="com.arjuna.common.build.lib" location="${com.arjuna.common.dir}/build/lib"/>
-    <property name="com.arjuna.common.build.classes" location="${com.arjuna.common.dir}/build/classes"/>
-
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.module.name" value="JBossCore"/>
-	<property name="com.hp.mw.ts.module.name.lowercase" value="jbosscore"/>
-
-	<property name="com.hp.mw.ts.product.htdocs.internal" value="no"/>
-	<property name="com.hp.mw.csf.compile" value="no"/>
-
-	<!-- Set internal property defaults -->
-	<property name="com.hp.mwlabs.ts.product.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.product.htdocs.dest" location="htdocs"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
-    <property name="com.hp.mwlabs.ts.product.services.jar.dest" location="services"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.product.init">
-		<!-- Define default build properties -->
-		<tstamp>
-			<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-		</tstamp>
-
-		<property name="com.hp.mw.installationdirectory" location="install"/>
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<echo message="Initialising module ${com.hp.mw.ts.module.name}"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<path id="com.arjuna.buildsystem.classpath">
-			<fileset dir="${com.arjuna.buildsystem.build.lib}"/>
-		</path>
-		<property name="com.arjuna.buildsystem.classpath" refid="com.arjuna.buildsystem.classpath"/>
-
-		<!-- Tests -->
-                <property name="com.hp.mw.ts.arjuna.tests.compile" value="${com.hp.mw.alltests.build}"/>
-                <property name="com.hp.mw.ts.txoj.tests.compile" value="${com.hp.mw.alltests.build}"/>
-                <property name="com.arjuna.mw.ts.tsmx.tests.compile" value="${com.hp.mw.alltests.build}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Build htdocs for just mw, or mw and mwlabs -->
-		<condition property="com.hp.mwlabs.ts.product.htdocs.list" value="com.arjuna.ats.*,com.arjuna.orbportability.*">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<condition property="com.hp.mwlabs.ts.product.htdocs.exclude" value="">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<condition property="com.hp.mwlabs.ts.product.htdocs.private" value="yes">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.ts.product.htdocs.list" value="com.arjuna.ats.arjuna.*,com.arjuna.ats.txoj.*,com.arjuna.orbportability.*,com.arjuna.ats.jts.*,com.arjuna.ats.jta.*,com.arjuna.ats.jtax.*,com.arjuna.ats.jdbc.*,com.arjuna.ats.tsmx.*,com.arjuna.ats.csfx.*"/>
-		<property name="com.hp.mwlabs.ts.product.htdocs.exclude" value="com.arjuna.orbportability.internal.*"/>
-		<property name="com.hp.mwlabs.ts.product.htdocs.private" value="no"/>
-
-		<!-- Define classpath builder task and add this JAR to the classpath -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder"
-			classpathref="com.arjuna.buildsystem.classpath"/>
-
-		<!-- Clear build classpath file and add all JARs within lib/ext/ -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" clear="true">
-            <classpath>
-                <fileset dir="${com.arjuna.ext.dir}">
-                    <include name="**.jar"/>
-                    <include name="**.zip"/>
-                </fileset>
-                <fileset dir="${com.arjuna.common.build.lib}" includes="jbossts-common.jar"/>
-            </classpath>
-        </classpath-builder>
-
-	</target>
-
-	<!-- Project targets - must add all module names to each target -->
-	<target name="com.hp.mw.ts.product.build" depends="com.hp.mw.ts.product.compile, com.hp.mw.ts.product.dojar, com.hp.mw.ts.product.htdocs"/>
-
-	<target name="com.hp.mw.ts.product.compile"
-		depends="com.hp.mwlabs.ts.product.init,
-		com.hp.mwlabs.ts.product.arjuna.compile,
-		com.hp.mwlabs.ts.product.txoj.compile,
-		com.hp.mwlabs.ts.product.tsmx.compile"/>
-
-	<target name="com.hp.mw.ts.product.jar"
-		depends="com.hp.mwlabs.ts.product.init,
-		com.hp.mwlabs.ts.product.arjuna.jar,
-		com.hp.mwlabs.ts.product.txoj.jar,
-		com.hp.mwlabs.ts.product.tsmx.jar,
-		com.hp.mw.ts.product.tests.dojar,
-		com.hp.mw.ts.product.dojar"/>
-
-	<target name="com.hp.mw.ts.product.dojar">
-		<taskdef name="module-to-product" classname="com.hp.mw.buildsystem.ant.ModuleToProduct"
-			classpathref="com.arjuna.buildsystem.classpath"/>
-
-		<module-to-product destdir="${com.hp.mwlabs.ts.product.jar.dest}" destfile="${com.hp.mw.ts.module.name.lowercase}">
-			<fileset dir=".">
-				<include name="arjuna/lib/*.jar"/>
-				<include name="txoj/lib/*.jar"/>
-				<include name="tsmx/lib/*.jar"/>
-			</fileset>
-		</module-to-product>
-
-		<touch file="built_using_java_${java.specification.version}"/>
-		<jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.module.name.lowercase}.jar" update="true">
-			<fileset dir=".">
-				<filename name="built_using_java_${java.specification.version}"/>
-			</fileset>
-		</jar>
-		<delete file="built_using_java_${java.specification.version}"/>
-
-        <!-- bundle jbossts-common into the product .jar -->
-        <jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.module.name.lowercase}.jar" update="true">
-			<fileset dir="${com.arjuna.common.build.classes}">
-				<exclude name="build_using*"/>
-			</fileset>
-		</jar>
-
-		<mkdir dir="${com.hp.mwlabs.ts.product.services.jar.dest}"/>
-        <module-to-product destdir="${com.hp.mwlabs.ts.product.services.jar.dest}" destfile="${com.hp.mw.ts.module.name.lowercase}-services">
-            <fileset dir=".">
-                <include name="arjuna/lib/services/*.jar"/>
-            </fileset>
-        </module-to-product>
-
-	</target>
-
-	<target name="com.hp.mw.ts.product.tests.dojar">
-		<taskdef name="module-to-product" classname="com.hp.mw.buildsystem.ant.ModuleToProduct"
-			classpathref="com.arjuna.buildsystem.classpath"/>
-
-		<module-to-product destdir="${com.hp.mwlabs.ts.product.jar.dest}" destfile="${com.hp.mw.ts.module.name.lowercase}-tests">
-			<fileset dir=".">
-				<include name="arjuna/lib/tests/*.jar"/>
-				<include name="txoj/lib/tests/*.jar"/>
-				<include name="tsmx/lib/tests/*.jar"/>
-			</fileset>
-		</module-to-product>
-
-	</target>
-
-	<target name="com.hp.mw.ts.product.htdocs"
-		depends="com.hp.mwlabs.ts.product.init"
-        	if="com.hp.mwlabs.ts.build.core">
-		<echo message="Building htdocs "/>
-		<mkdir dir="${com.hp.mwlabs.ts.product.htdocs.dest}"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javadoc
-			sourcepath="${com.hp.mwlabs.ts.product.htdocs.path}"
-			destdir="${com.hp.mwlabs.ts.product.htdocs.dest}"
-			packagenames="${com.hp.mwlabs.ts.product.htdocs.list}"
-			excludepackagenames="${com.hp.mwlabs.ts.product.htdocs.exclude}"
-			private="${com.hp.mwlabs.ts.product.htdocs.private}"
-            		classpath="${build.classpath}"
-		>
-		</javadoc>
-	</target>
-
-    <target name="com.hp.mw.ts.product.install-all"
-            depends="com.hp.mw.ts.product.install,
-            com.hp.mwlabs.ts.product.htdocs.install,
-            com.hp.mwlabs.ts.product.docs.install"/>
-
-    <target name="com.hp.mwlabs.ts.product.htdocs.install" depends="com.hp.mw.ts.product.htdocs" if="com.hp.mwlabs.ts.build.core">
-
-            <echo message="Installing htdocs"/>
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/htdocs"/>
-            <copy
-                    todir="${com.hp.mwlabs.installationdirectory}/htdocs"
-            >
-                    <fileset dir="htdocs"/>
-            </copy>
-
+    <target name="dist" depends="dist.compositenode, install.docs, install.scripts, install.services, install.etc, install.tools">
     </target>
 
-    <target name="com.hp.mw.ts.product.install"
-        depends="com.hp.mwlabs.ts.product.init,
-            com.hp.mwlabs.ts.product.arjuna.install,
-            com.hp.mwlabs.ts.product.txoj.install,
-            com.hp.mwlabs.ts.product.tsmx.install,
-            com.hp.mw.ts.product.dojar,
-            com.hp.mwlabs.ts.product.scripts.install,
-            com.hp.mwlabs.ts.product.services.install,
-            com.hp.mwlabs.ts.product.libs.install"
-        if="com.hp.mwlabs.ts.build.core">
-
-            <echo message="Installation directory : ${com.hp.mwlabs.installationdirectory}"/>
-
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/lib"/>
-
-			<touch file="${com.hp.mwlabs.installationdirectory}/lib/built_using_java_${java.specification.version}"/>
-
-            <copy todir="${com.hp.mwlabs.installationdirectory}/lib">
-                <fileset dir="${com.hp.mwlabs.ts.product.jar.dest}" includes="${com.hp.mw.ts.module.name.lowercase}.jar"/>
-            </copy>
-            <copy todir="${com.hp.mwlabs.installationdirectory}" file="copyright.txt"/>
+    <target name="htdocs">
+        <htdocs.composite.macro>
+            <packagesets>
+                <packageset dir="../common/classes" excludes="**/internal/**"/>
+                <packageset dir="arjuna/classes" excludes="**/internal/**"/>
+                <packageset dir="txoj/classes" excludes="**/internal/**"/>
+                <packageset dir="tsmx/classes" excludes="**/internal/**"/>
+            </packagesets>
+        </htdocs.composite.macro>
     </target>
 
-    <target name="com.hp.mwlabs.ts.product.libs.install">
-            <echo message="Installing jar files"/>
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/lib/ext"/>
-            <copy todir="${com.hp.mwlabs.installationdirectory}/lib/ext">
-                    <fileset dir="${com.arjuna.ext.dir}">
-                            <exclude name="Readme"/>
-                            <exclude name="TestingFramework.jar"/>
-                            <exclude name="classes12.jar"/>
-                    </fileset>
-            </copy>
-    </target>
+    <target name="install.scripts">
 
-	<target name="com.hp.mwlabs.ts.product.docs.install" depends="com.hp.mwlabs.ts.product.docs.coreinstall, com.hp.mwlabs.ts.product.docs.noncoreinstall"/>
+        <property name="scripts.dest.dir" value="${build.dir}/install/bin"/>
+        <property name="product_name" value="${modulename}"/>
+        <property name="home_directory" value="JBOSSCORE_HOME"/>
+        <property name="orbprefix" value="without"/>
+        <property name="extra_scripts" value="the_jts_overrides_this_property"/>
 
-	<target name="com.hp.mwlabs.ts.product.docs.coreinstall" if="com.hp.mwlabs.ts.build.core">
-		<echo message="Installing ${com.hp.mw.ts.module.name} docs"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/docs/"/>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/docs">
-			<fileset dir="docs" includes="**/*.pdf"/>
-			<flattenmapper/>
-		</copy>
-	</target>
+        <mkdir dir="${scripts.dest.dir}"/>
 
-	<target name="com.hp.mwlabs.ts.product.docs.noncoreinstall" unless="com.hp.mwlabs.ts.build.core">
-		<echo message="Installing ${com.hp.mw.ts.module.name} docs"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/docs/user_guide/transaction_core"/>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/docs/user_guide/transaction_core">
-			<fileset dir="docs/user_guide" includes="*.pdf" excludes="Administration*"/>
-		</copy>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.scripts.install"
-            depends="com.hp.mwlabs.ts.product.scripts.install.withoutorb, com.hp.mwlabs.ts.product.scripts.install.withorb">
-		<echo message="Installing scripts"/>
-
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/bin"/>
-
-		<copy todir="${com.hp.mwlabs.installationdirectory}/bin" filtering="true" overwrite="true" >
+		<copy todir="${scripts.dest.dir}" filtering="true" overwrite="true" >
 			<fileset dir="scripts">
 				<include name="start-recovery-manager.bat"/>
 				<include name="start-recovery-manager.sh"/>
 				<include name="run-tools.bat"/>
 				<include name="run-tools.sh"/>
+                <include name="${extra_scripts}"/>
 			</fileset>
             <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
+                <filter token="PRODUCT_NAME" value="${product_name}"/>
+                <filter token="HOME_DIRECTORY" value="${home_directory}"/>
             </filterset>
 		</copy>
 
-	</target>
-
-    <target name="com.hp.mwlabs.ts.product.scripts.install.withoutorb"
-            unless="com.hp.mwlabs.ts.build.jts">
-        <echo message="Installing without-orb scripts"/>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/bin"/>
-
-        <copy tofile="${com.hp.mwlabs.installationdirectory}/bin/setup-env.bat" filtering="on" overwrite="true">
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
-            </filterset>
+        <copy todir="${scripts.dest.dir}" filtering="true" overwrite="true" >
             <fileset dir="scripts">
-                <include name="withoutorb-setup-env.bat"/>
-            </fileset>
-        </copy>
+				<include name="${orbprefix}orb-setup-env.*"/>
+			</fileset>
 
-        <copy tofile="${com.hp.mwlabs.installationdirectory}/bin/setup-env.sh" filtering="on" overwrite="true">
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
-            </filterset>
-            <fileset dir="scripts">
-                <include name="withoutorb-setup-env.sh"/>
-            </fileset>
-        </copy>
+            <globmapper from="${orbprefix}orb-*" to="*"/>
 
-    </target>
-
-    <target name="com.hp.mwlabs.ts.product.scripts.install.withorb"
-            if="com.hp.mwlabs.ts.build.jts">
-        <echo message="Installing with-orb scripts"/>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/bin"/>
-
-        <copy tofile="${com.hp.mwlabs.installationdirectory}/bin/setup-env.bat" filtering="on" overwrite="true">
             <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
+                <filter token="PRODUCT_NAME" value="${product_name}"/>
+                <filter token="HOME_DIRECTORY" value="${home_directory}"/>
             </filterset>
-            <fileset dir="scripts">
-                <include name="withorb-setup-env.bat"/>
-            </fileset>
         </copy>
 
-        <copy tofile="${com.hp.mwlabs.installationdirectory}/bin/setup-env.sh" filtering="on" overwrite="true">
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
-            </filterset>
-            <fileset dir="scripts">
-                <include name="withorb-setup-env.sh"/>
-            </fileset>
-        </copy>
-
-        <copy todir="${com.hp.mwlabs.installationdirectory}/bin/" filtering="on" overwrite="true">
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
-            </filterset>
-            <fileset dir="scripts">
-                <include name="start-transaction-service.bat"/>
-                <include name="start-transaction-service.sh"/>
-            </fileset>
-        </copy>
     </target>
 
-    <target name="com.hp.mwlabs.ts.product.services.install"
-            unless="com.hp.mwlabs.ts.build.jts">
+    <target name="install.docs">
 
-        <echo>Installing services</echo>
+        <property name="dest.dir" value="docs"/>
 
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/services/lib"/>
-
-        <copy
-                todir="${com.hp.mwlabs.installationdirectory}/services/lib"
-        >
-                <fileset dir="${com.hp.mwlabs.ts.product.services.jar.dest}"
-                    includes="*.jar"/>
-                <globmapper from="${com.hp.mw.ts.module.name.lowercase}*"
-                            to="${com.hp.mw.ts.product.name.lowercase}*"/>
+        <copy todir="${build.dir}/install/${dest.dir}" overwrite="true" flatten="true">
+            <fileset dir="docs" includes="**/*.pdf"/>
         </copy>
-
-	<mkdir dir="${com.hp.mwlabs.installationdirectory}/services/logs/"/>
     </target>
 
-	<target name="com.hp.mw.ts.product.clean"
-		depends="com.hp.mwlabs.ts.product.arjuna.clean,
-		com.hp.mwlabs.ts.product.txoj.clean,
-		com.hp.mwlabs.ts.product.tsmx.clean">
+    <target name="install.services" depends="dist.compositenode">
 
-		<delete dir="${com.hp.mwlabs.ts.product.jar.dest}" quiet="true"/>
-		<delete dir="${com.hp.mwlabs.ts.product.htdocs.dest}" quiet="true"/>
-		<delete dir="${com.hp.mwlabs.ts.product.services.jar.dest}" quiet="true"/>
+        <property name="services.dest.dir" value="${build.dir}/install/services"/>
+        <property name="product_name" value="${modulename}"/>
 
-	</target>
+        <mkdir dir="${services.dest.dir}"/>
+        <mkdir dir="${services.dest.dir}/logs"/>
+        <mkdir dir="${services.dest.dir}/lib"/>
+        <mkdir dir="${services.dest.dir}/config"/>
 
+        <mkdir dir="${build.dir}/services"/>
+        <javac srcdir="arjuna/services/classes" destdir="${build.dir}/services" debug="${debug}"
+               deprecation="${deprecation}">
+            <classpath>
+                <fileset dir="${build.dir}/lib/ext/" includes="*"/>
+                <fileset dir="${build.dir}/lib/" includes="*"/>
+                <fileset dir="." includes="${lib.dir}/ext/*"/>
+                <fileset dir="${global.ext.lib.dir}" includes="wrapper.jar"/>
+            </classpath>
+        </javac>
+        <jar basedir="${build.dir}/services" destfile="${services.dest.dir}/lib/${product_name}-services.jar"/>
 
-	<!-- Module targets -->
-	<target name="com.hp.mwlabs.ts.product.arjuna.compile">
-		<ant dir="arjuna" />
-	</target>
+        <copy file="${global.ext.lib.dir}/wrapper.jar" todir="${services.dest.dir}/../lib/ext"/>
 
-	<target name="com.hp.mwlabs.ts.product.txoj.compile">
-		<ant dir="txoj" />
-	</target>
+        <install.services.files.macro services.dest.dir="${services.dest.dir}" productname="${product_name}" modulename="arjuna"/>
 
-	<target name="com.hp.mwlabs.ts.product.tsmx.compile">
-		<ant dir="tsmx" />
-	</target>
+    </target>
 
-	<target name="com.hp.mwlabs.ts.product.arjuna.jar">
-		<ant dir="arjuna" target="com.hp.mw.ts.arjuna.jar" />
-	</target>
+    <target name="install.etc">
 
-	<target name="com.hp.mwlabs.ts.product.txoj.jar">
-		<ant dir="txoj" target="com.hp.mw.ts.txoj.jar" />
-	</target>
+        <property name="etc.dest.dir" value="${basedir}/${build.dir}/install/etc"/>
 
-	<target name="com.hp.mwlabs.ts.product.tsmx.jar">
-		<ant dir="tsmx" target="com.arjuna.mw.ts.tsmx.jar" />
-	</target>
+        <delete dir="${etc.dest.dir}"/>
+        <mkdir dir="${etc.dest.dir}"/>
 
-	<target name="com.hp.mwlabs.ts.product.arjuna.install">
-		<ant dir="arjuna" target="com.hp.mw.ts.arjuna.install" />
-	</target>
+        <taskdef name="merge-property-files"
+            classname="com.hp.mw.buildsystem.ant.MergePropertyFiles"
+            classpath="../antbuildsystem/build/lib/buildsystem.jar"/>
 
-	<target name="com.hp.mwlabs.ts.product.txoj.install">
-		<ant dir="txoj" target="com.hp.mw.ts.txoj.install"/>
-	</target>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/arjuna/etc/default-arjuna-properties.xml"/>
 
-	<target name="com.hp.mwlabs.ts.product.tsmx.install">
-		<ant dir="tsmx" target="com.arjuna.mw.ts.tsmx.install"/>
-	</target>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/arjuna/etc/default-RecoveryManager-properties.xml"/>
 
-	<target name="com.hp.mwlabs.ts.product.arjuna.clean">
-		<ant dir="arjuna" target="com.hp.mw.ts.arjuna.clean" />
-	</target>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/arjuna/etc/default-CommonLogging-properties.xml"/>
 
-	<target name="com.hp.mwlabs.ts.product.txoj.clean">
-		<ant dir="txoj" target="com.hp.mw.ts.txoj.clean" />
-	</target>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/txoj/etc/default-txoj-properties.xml"/>
 
-	<target name="com.hp.mwlabs.ts.product.tsmx.clean">
-		<ant dir="tsmx" target="com.arjuna.mw.ts.tsmx.clean" />
-	</target>
+        <copy file="arjuna/etc/log4j.properties" todir="${etc.dest.dir}"/>
 
-	<!-- Short target names -->
-	<target name="build" depends="com.hp.mw.ts.product.build">
+    </target>
 
-	</target>
-
-	<target name="clean" depends="com.hp.mw.ts.product.clean">
-
-	</target>
-
-	<target name="jar" depends="com.hp.mw.ts.product.jar">
-
-	</target>
-
-	<target name="htdocs" depends="com.hp.mw.ts.product.htdocs">
-
-	</target>
-
-	<target name="install" depends="com.hp.mw.ts.product.install">
-
-	</target>
-
-    <target name="install-all" depends="com.hp.mw.ts.product.install-all">
-
+    <target name="install.tools">
+        <ant dir="tsmx" target="tools" inheritall="false">
+            <property name="install.dir" value="${basedir}/${build.dir}/install/bin/tools"/>
+        </ant>
+        <move file="${build.dir}/install/bin/tools/tsmx-tools.jar" todir="${build.dir}/install/bin"/>
     </target>
 
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,231 +15,80 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<project name="module-tsmx" default="com.arjuna.mw.ts.tsmx.build" basedir=".">
-    <!-- class path behaviour -->
-    <property name="build.sysclasspath" value="last"/>
-    <property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+<project name="module-tsmx" default="dist.leafnode" basedir=".">
 
-    <!-- Set module name -->
-    <property name="com.arjuna.mwlabs.ts.modulename" value="tsmx"/>
+    <property name="modulename" value="tsmx"/>
 
-    <!-- Load Build Properties File -->
-    <property file="${com.arjuna.mw.ts.properties}"/>
+    <import file="../../sharedbuild.xml"/>
 
-    <!-- Set internal property defaults -->
-    <!-- Path names -->
-    <property name="com.arjuna.mwlabs.ts.tsmx.src" location="classes"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.tests.src" location="tests/"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.destroot" location="build"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.dest" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/classes"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.jar.dest" location="lib"/>
-	<property name="com.arjuna.mwlabs.ts.tsmx.jar.ext" value="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/ext"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.tests.dest" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/tests"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.tests.destdir" location="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/tests/"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.utilities.src" location="bin"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.utilities.dest" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/bin"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.etc" location="etc"/>
+    <target name="init" depends="sharedbuild.init">
 
-    <property name="com.arjuna.mw.ts.tsmx.tests.compile" value="no"/>
-    <property name="com.arjuna.mw.ts.tsmx.tests.install" value="no"/>
-    <property name="com.arjuna.mw.ts.tsmx.utilities.compile" value="yes"/>
-    <property name="com.arjuna.mw.ts.tsmx.utilities.jar" value="yes"/>
-    <property name="com.arjuna.mw.ts.tsmx.utilities.install" value="yes"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
 
-    <property name="com.arjuna.mwlabs.ts.tsmx.resourcebundle" value="tsmx_msg_en_US.properties"/>
-
-    <!-- Initialisation -->
-    <target name="com.arjuna.mwlabs.ts.tsmx.init">
-        <!-- Define default build properties -->
-        <tstamp>
-            <format property="com.arjuna.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-        </tstamp>
-
-        <!-- Define classpath builder task -->
-        <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.tests.compile">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.tests.compile}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.tests.install">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.tests.install}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.compile">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.compile}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.install">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.install}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.jar">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.jar}" arg2="yes"/>
-        </condition>
-
-        <property name="com.arjuna.mw.installationdirectory" value="install"/>
-        <property name="com.arjuna.mw.sourceid" value="unknown"/>
-        <property name="com.arjuna.mw.version" value="unknown"/>
-        <property name="com.arjuna.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-        <property name="com.arjuna.mw.notes" value=""/>
-        <echo message="Initialising module tsmx"/>
-        <echo message="Source ID = ${com.arjuna.mw.sourceid}"/>
-        <echo message="Version   = ${com.arjuna.mw.version}"/>
-        <echo message="Builder   = ${com.arjuna.mw.builder}"/>
-        <echo message="Date      = ${com.arjuna.mw.date}"/>
-        <echo message="Notes     = ${com.arjuna.mw.notes}"/>
-
-        <!-- Installation directory -->
-        <property name="com.arjuna.mwlabs.installationdirectory" location="${com.arjuna.mw.installationdirectory}"/>
-
-        <!-- Compile with debugging? -->
-        <condition property="com.arjuna.mwlabs.debug" value="no">
-            <equals arg1="${com.arjuna.mw.debug}" arg2="no"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.debug" value="yes"/>
-
-        <!-- Compile with deprecation? -->
-        <condition property="com.arjuna.mwlabs.deprecation" value="yes">
-            <equals arg1="${com.arjuna.mw.deprecation}" arg2="yes"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.deprecation" value="no"/>
-
-        <!-- Set the module property file details -->
-        <taskdef name="version-to-property" classname="com.hp.mw.buildsystem.ant.VersToProp" classpath="${com.arjuna.buildsystem.classpath}"/>
-        <version-to-property version="${com.arjuna.mw.version}" property="com.arjuna.mwlabs.ts.tsmx.propertyversion"/>
-
-        <property name="com.arjuna.mwlabs.ts.tsmx.propertyfile" value="${com.arjuna.mwlabs.ts.modulename}${com.arjuna.mwlabs.ts.tsmx.propertyversion}.properties"/>
-        <property name="com.arjuna.mw.propertydirectory" location="${com.arjuna.mwlabs.installationdirectory}/etc"/>
-
-        <echo message="Property file name : ${com.arjuna.mwlabs.ts.tsmx.propertyfile}"/>
-        <echo message="Property directory : ${com.arjuna.mw.propertydirectory}"/>
-
-        <!-- Make the destination directory -->
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.dest}"/>
     </target>
 
-    <target name="com.arjuna.mw.ts.tsmx.build" depends="com.arjuna.mw.ts.tsmx.jar, com.arjuna.mwlabs.ts.tsmx.utilities.jar, com.arjuna.mwlabs.ts.tsmx.tests.jar"/>
-
-    <!-- Compilation targets -->
-    <target name="com.arjuna.mw.ts.tsmx.compile" depends="com.arjuna.mwlabs.ts.tsmx.init, com.arjuna.mwlabs.ts.tsmx.compile">
-        <ant dir="sar" target="compile"/>
-    </target>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.compile" depends="com.arjuna.mwlabs.ts.tsmx.init,com.arjuna.mwlabs.ts.tsmx.generateresourcebundle">
-
-        <echo message="Compiling module"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-        <javac srcdir="${com.arjuna.mwlabs.ts.tsmx.src}"
-            destdir="${com.arjuna.mwlabs.ts.tsmx.dest}"
-            classpath="${com.arjuna.mwlabs.ts.tsmx.src}"
-            excludes="${com.arjuna.mwlabs.ts.tsmx.compile.excludes}"
-            debug="${com.arjuna.mwlabs.debug}">
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.arjuna.mwlabs.ts.tsmx.src}"/>
-            </classpath>
-        </javac>
-
-        <!-- Process the properties -->
-    	<property name="property.file" value="tsmx.properties"/>
-    	<propertyfile file="${com.arjuna.mwlabs.ts.tsmx.dest}/${property.file}">
-            <entry key="TSMX_VERSION" value="${com.arjuna.mw.version}"/>
-            <entry key="PROPERTIES_FILE" value="${com.arjuna.mwlabs.ts.tsmx.propertyfile}"/>
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+			<entry key="TSMX_VERSION" value="unknown"/>
         </propertyfile>
     </target>
 
-    <!-- Jar targets -->
-    <target name="com.arjuna.mw.ts.tsmx.jar" depends="com.arjuna.mw.ts.tsmx.compile">
-
-        <echo message="Building jar file"/>
-
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}"/>
-
-        <jar jarfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/${com.arjuna.mwlabs.ts.modulename}.jar">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.dest}"/>
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.etc}" includes="tsmx.properties"/>
-        </jar>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-            <classpath>
-                <pathelement location="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/${com.arjuna.mwlabs.ts.modulename}.jar"/>
-            </classpath>
-        </classpath-builder>
-
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
     </target>
 
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.compile" depends="com.arjuna.mw.ts.tsmx.jar" if="com.arjuna.mwlabs.ts.tsmx.utilities.compile">
+    <target name="tools" depends="compile">
 
-        <echo message="Compiling utilities"/>
+        <property name="install.dir" value="${build.dir}/tools"/>
 
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"/>
+        <compile.macro>
+            <additional.classpath>
+                <fileset dir="${global.ext.lib.dir}" includes="jta-1_1-classes.zip"/>
+            </additional.classpath>
+            <additional.src.dirs>
+                <src location="bin"/>
+            </additional.src.dirs>
+        </compile.macro>
 
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
+        <mkdir dir="${install.dir}"/>
+        <mkdir dir="${install.dir}/plugins"/>
 
-        <javac
-            srcdir="${com.arjuna.mwlabs.ts.tsmx.utilities.src}"
-            destdir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
-            debug="${com.arjuna.mwlabs.debug}"
-            deprecation="${com.arjuna.mwlabs.deprecation}"
-            >
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.arjuna.mwlabs.ts.tsmx.dest}"/>
-                <fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.ext}">
-                   <include name="**/*.jar"/>
-                </fileset>
-				<path location="${com.arjuna.mwlabs.ts.tsmx.jar.ext}/jfreechart-1.0.2.jar"/>
-				<path location="${com.arjuna.mwlabs.ts.tsmx.jar.ext}/jcommon-1.0.5.jar"/>
-            </classpath>
-        </javac>
-
-    </target>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.jar" depends="com.arjuna.mwlabs.ts.tsmx.utilities.compile" if="com.arjuna.mwlabs.ts.tsmx.utilities.jar">
-
-        <echo message="Building utilities jar file"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/plugins"/>
-
-        <copy todir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}/com/arjuna/ats/tools/toolsframework/images">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.etc}" includes="*.gif"/>
+        <copy todir="${build.dir}/classes/com/arjuna/ats/tools/toolsframework/images">
+            <fileset dir="${etc.dir}" includes="*.gif"/>
         </copy>
-
-        <jar jarfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/${com.arjuna.mwlabs.ts.modulename}-tools.jar">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}">
+        <jar jarfile="${install.dir}/${modulename}-tools.jar">
+            <fileset dir="${build.dir}/classes">
                 <include name="com/arjuna/ats/tools/toolsframework/**/*.class"/>
                 <include name="com/arjuna/ats/tools/toolsframework/**/*.gif"/>
             </fileset>
         </jar>
 
-        <jar jarfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/${com.arjuna.mwlabs.ts.modulename}-jmxbrowser.jar">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar jarfile="${install.dir}/${modulename}-jmxbrowser.jar">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/jmxbrowser/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**/*.class"/>
-			<fileset dir="${com.arjuna.mwlabs.ts.tsmx.etc}/jmxbrowser/"
-			    includes="*.gif"/>
-            <metainf dir="${com.arjuna.mwlabs.ts.tsmx.etc}/jmxbrowser/" includes="tools.properties"/>
+			<fileset dir="${etc.dir}/jmxbrowser/" includes="*.gif"/>
+            <metainf dir="${etc.dir}/jmxbrowser/" includes="tools.properties"/>
         </jar>
 
-        <jar jarfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/${com.arjuna.mwlabs.ts.modulename}-objectstorebrowser.jar">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar jarfile="${install.dir}/${modulename}-objectstorebrowser.jar">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/objectstorebrowser/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**/*.class,com/arjuna/ats/tools/objecstorebrowser/stateviewers/viewers/**/*.class"/>
-			<fileset dir="${com.arjuna.mwlabs.ts.tsmx.etc}/objectstorebrowser/"
-			    includes="*.gif"/>
-            <metainf dir="${com.arjuna.mwlabs.ts.tsmx.etc}/objectstorebrowser/" includes="tools.properties"/>
+			<fileset dir="${etc.dir}/objectstorebrowser/" includes="*.gif"/>
+            <metainf dir="${etc.dir}/objectstorebrowser/" includes="tools.properties"/>
         </jar>
 
-        <jar jarfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/plugins/osbv-defaults.jar">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar jarfile="${install.dir}/plugins/osbv-defaults.jar">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**"/>
             <manifest>
@@ -250,149 +99,22 @@
                     <attribute name="plugin-classname-4" value="com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.abstractrecord.XAResourceRecordViewer"/>
                     <attribute name="plugin-classname-5" value="com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.abstractrecord.AbstractRecordViewer"/>
                     <attribute name="plugin-classname-6" value="com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.abstractrecord.ExtendedResourceRecordViewer"/>
-                    <attribute name="plugin-classname-7" value="com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.InFlightTransactionViewer"/>                    
+                    <attribute name="plugin-classname-7" value="com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.InFlightTransactionViewer"/>
                 </section>
             </manifest>
         </jar>
 
-        <jar jarfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/${com.arjuna.mwlabs.ts.modulename}-perfgraph.jar">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar jarfile="${install.dir}/${modulename}-perfgraph.jar">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/perfgraph/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**/*.class"/>
-			<fileset dir="${com.arjuna.mwlabs.ts.tsmx.etc}/perfgraph/"
+			<fileset dir="${etc.dir}/perfgraph/"
 			    includes="*.gif"/>
-            <metainf dir="${com.arjuna.mwlabs.ts.tsmx.etc}/perfgraph/" includes="tools.properties"/>
+            <metainf dir="${etc.dir}/perfgraph/" includes="tools.properties"/>
         </jar>
 
-    </target>
+        <copy file="${etc.dir}/toolsframework.xml" todir="${install.dir}"/>
 
-    <target name="com.arjuna.mw.ts.tsmx.tests.compile" depends="com.arjuna.mw.ts.tsmx.jar" if="com.arjuna.mwlabs.ts.tsmx.tests.compile">
-
-        <echo message="Building tests"/>
-
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.tests.dest}"/>
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-        <javac srcdir="${com.arjuna.mwlabs.ts.tsmx.tests.src}"
-            destdir="${com.arjuna.mwlabs.ts.tsmx.tests.dest}"
-            classpath="${com.arjuna.mwlabs.ts.tsmx.tests.src}"
-            debug="${com.arjuna.mwlabs.debug}"
-            deprecation="${com.arjuna.mwlabs.deprecation}">
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.arjuna.mwlabs.ts.tsmx.src}"/>
-                <path path="${com.arjuna.mwlabs.ts.tsmx.dest}"/>
-            </classpath>
-        </javac>
-
     </target>
 
-    <target name="com.arjuna.mwlabs.ts.tsmx.tests.jar" depends="com.arjuna.mw.ts.tsmx.tests.compile" if="com.arjuna.mwlabs.ts.tsmx.tests.compile">
-
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.tests.destdir}"/>
-
-        <jar basedir="${com.arjuna.mwlabs.ts.tsmx.tests.dest}"
-            jarfile="${com.arjuna.mwlabs.ts.tsmx.tests.destdir}/${com.arjuna.mwlabs.ts.modulename}_tests.jar"/>
-
-    </target>
-
-
-    <!-- Installation targets -->
-    <target name="com.arjuna.mw.ts.tsmx.install" depends="com.arjuna.mw.ts.tsmx.build, com.arjuna.mwlabs.ts.tsmx.utilities.install, com.arjuna.mwlabs.ts.tsmx.tests.install">
-
-        <echo message="Installing module tsmx"/>
-
-    </target>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.tests.install" depends="com.arjuna.mwlabs.ts.tsmx.tests.jar" if="com.arjuna.mwlabs.ts.tsmx.tests.install">
-
-        <echo message="Installing tests"/>
-
-    </target>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.install" depends="com.arjuna.mwlabs.ts.tsmx.utilities.jar" if="com.arjuna.mwlabs.ts.tsmx.utilities.install">
-
-        <echo message="Installing utilities"/>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/bin/"/>
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/bin/tools"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/bin/tools/ext/"/>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/bin/tools">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/" includes="tsmx-jmxbrowser.jar,tsmx-objectstorebrowser.jar,tsmx-perfgraph.jar"/>
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.etc}" includes="*.xml"/>
-        </copy>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/bin/tools/plugins/">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin/tools/plugins/" includes="*.jar"/>
-        </copy>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/bin/tools/ext">
-			<fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.ext}" includes="*.jar"/>
-		</copy>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/bin/">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin" includes="tsmx-tools.jar,jbossts-tools.sar"/>
-        </copy>
-
-    </target>
-
-    <target name="install_jboss_tools">
-        <ant dir="sar" target="build-sar"/>
-    </target>
-
-    <!-- Clean targets -->
-    <target name="com.arjuna.mw.ts.tsmx.clean">
-
-        <echo message="Cleaning module"/>
-        <ant dir="sar" target="clean"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.destroot}"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tests.dest}"/>
-
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/bin"/>
-		<delete dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/tests"/>
-		<delete file="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/tsmx.jar"/>
-
-    </target>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.generateresourcebundle">
-
-        <echo message="Generating tsmx Resource Bundle"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-        <javadoc sourcepath="${com.arjuna.mwlabs.ts.tsmx.src}"
-            packagenames="com.arjuna.*"
-            failonerror="yes"
-            private="yes"
-            defaultexcludes="yes"
-            classpath="${build.classpath}">
-
-            <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                <path>
-                    <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                </path>
-                <param name="-basedir" value="${com.arjuna.mwlabs.ts.tsmx.dest}"/>
-                <param name="-resourcebundle" value="${com.arjuna.mwlabs.ts.tsmx.resourcebundle}"/>
-                <param name="-appendkey" value="[]"/>
-            </doclet>
-        </javadoc>
-
-    </target>
-
-    <target name="jmx.run" depends="com.arjuna.mw.ts.tsmx.build">
-
-        <java classname="com.arjuna.ats.tools.toolsframework.ArjunaToolsFramework" fork="true">
-            <jvmarg value="-Dcom.hp.mw.common.propertyManagerImplementation=com.arjuna.mwlabs.ts.tsmx.mbeans.PropertyFileMBeanImpl"/>
-            <jvmarg value="-Dcom.arjuna.mw.ArjunaToolsFramework.lib=${com.arjuna.mwlabs.ts.tsmx.jar.dest}/tools/"/>
-            <classpath>
-                <fileset dir="lib/">
-                    <include name="**.jar"/>
-                    <include name="**.zip"/>
-                </fileset>
-                <fileset dir="etc"/>
-            </classpath>
-        </java>
-
-    </target>
-
-    <!-- Short target names -->
-    <target name="compile" depends="com.arjuna.mw.ts.tsmx.compile"/>
-    <target name="jar" depends="com.arjuna.mw.ts.tsmx.jar"/>
-    <target name="clean" depends="com.arjuna.mw.ts.tsmx.clean"/>
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,355 +1,42 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors 
-  as indicated by the @author tags. 
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
   See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
   You should have received a copy of the GNU Lesser General Public License,
   v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
+
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<project name="module-txoj" default="com.hp.mw.ts.txoj.build" basedir=".">
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" value="buildsystem.classpath"/>
+<project name="module-txoj" default="dist.leafnode" basedir=".">
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="txoj"/>
+    <property name="modulename" value="txoj"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-txoj.properties"/>
+    <property name="global.ext.test.libs" value="junit.jar,TestingFramework.jar"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    <import file="../../sharedbuild.xml"/>
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.txoj.tests.compile" value="yes"/>
-	<property name="com.hp.mw.ts.txoj.tests.install" value="no"/>
-	<property name="com.hp.mw.ts.txoj.utilities.compile" value="no"/>
-	<property name="com.hp.mw.ts.txoj.utilities.install" value="no"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Set internal property defaults -->
-		<!-- Path names -->
-	<property name="com.hp.mwlabs.ts.txoj.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.txoj.src" location="classes"/>
-    <property name="com.hp.mwlabs.ts.txoj.etc" location="etc"/>
-	<property name="com.hp.mwlabs.ts.txoj.destroot" location="build"/>
-	<property name="com.hp.mwlabs.ts.txoj.dest" location="${com.hp.mwlabs.ts.txoj.destroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.txoj.tests.src" location="tests"/>
-	<property name="com.hp.mwlabs.ts.txoj.tests.dest" location="${com.hp.mwlabs.ts.txoj.destroot}/tests"/>
-        <property name="com.hp.mwlabs.ts.txoj.tests.destdir" location="${com.hp.mwlabs.ts.txoj.jar.dest}/tests/"/>
-	<property name="com.hp.mwlabs.ts.txoj.utilities.src" location="bin"/>
-	<property name="com.hp.mwlabs.ts.txoj.utilities.dest" location="${com.hp.mwlabs.ts.txoj.destroot}/bin"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
 
-    <property name="com.hp.mwlabs.ts.txoj.resourcebundle" value="txoj_msg_en_US.properties"/>
-
-    <property name="com.hp.mwlabs.ts.txoj.propertyfile.src" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-
-	<property name="com.hp.mwlabs.ts.txoj.mappingfile" value="${com.hp.mwlabs.ts.modulename}-properties.mappings"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.txoj.init" depends="com.hp.mwlabs.ts.txoj.setpropertyfiles">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<tstamp>
-		<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
-
-                <!-- Define classpath builder task -->
-                <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Initialising module txoj"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Check which bits to compile and/or install -->
-		<condition property="com.hp.mwlabs.ts.txoj.tests.compile">
-			<equals arg1="${com.hp.mw.ts.txoj.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.txoj.tests.install">
-			<equals arg1="${com.hp.mw.ts.txoj.tests.install}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.txoj.utilities.compile">
-			<equals arg1="${com.hp.mw.ts.txoj.utilities.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.txoj.utilities.install">
-			<equals arg1="${com.hp.mw.ts.txoj.utilities.install}" arg2="yes"/>
-		</condition>
-
-		<!-- Set the module property file details -->
-		<property name="com.hp.mwlabs.ts.txoj.propertyfile" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-
-		<property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property file name : ${com.hp.mwlabs.ts.txoj.propertyfile}"/>
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
-
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.ts.txoj.dest}"/>
-
-	</target>
-
-    <!-- If this build is part of a product build set the property files to the product property file -->
-    <target name="com.hp.mwlabs.ts.txoj.setpropertyfiles" if="com.hp.mw.ts.product.name">
-
-            <echo>Overriding propertyfile settings with product propertyfile settings</echo>
-            <property name="com.hp.mwlabs.ts.txoj.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-
     </target>
 
-    <target name="com.hp.mw.ts.txoj.build" depends="com.hp.mw.ts.txoj.jar, com.hp.mwlabs.ts.txoj.tests.jar, com.hp.mwlabs.ts.txoj.utilities.jar"/>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.ts.txoj.compile" depends="com.hp.mwlabs.ts.txoj.compile,com.hp.mwlabs.ts.txoj.generateresourcebundle">
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.compile" depends="com.hp.mwlabs.ts.txoj.init">
-
-		<echo message="Compiling module"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.txoj.src}"
-			destdir="${com.hp.mwlabs.ts.txoj.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.txoj.src}"/>
-			</classpath>
-		</javac>
-
-        <!-- Process the properties -->
-    	<property name="property.file" value="txoj.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.ts.txoj.dest}/${property.file}">
-			<entry key="MODULE" value="${com.hp.mwlabs.ts.modulename}"/>
-			<entry key="SOURCEID" value="${com.hp.mw.sourceid}"/>
-			<entry key="BUILDINFO" value="${com.hp.mw.builder}"/>
-			<entry key="VERSION" value="${com.hp.mw.version}"/>
-			<entry key="DATE" value="${com.hp.mw.date}"/>
-			<entry key="NOTES" value="${com.hp.mw.notes}"/>
-			<entry key="TXOJ_VERSION" value="${com.hp.mw.version}"/>
-			<entry key="PROPERTIES_FILE" value="${com.hp.mwlabs.ts.txoj.propertyfile}"/>
-		</propertyfile>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.tests.jar" depends="com.hp.mwlabs.ts.txoj.tests.compile" if="com.hp.mwlabs.ts.txoj.tests.compile">
-
-            <mkdir dir="${com.hp.mwlabs.ts.txoj.tests.destdir}"/>
-            <jar    basedir="${com.hp.mwlabs.ts.txoj.tests.dest}"
-                    jarfile="${com.hp.mwlabs.ts.txoj.tests.destdir}/${com.hp.mwlabs.ts.modulename}_tests.jar"/>
-
-        </target>
-
-	<target name="com.hp.mwlabs.ts.txoj.tests.compile" depends="com.hp.mw.ts.txoj.jar" if="com.hp.mwlabs.ts.txoj.tests.compile">
-
-		<echo message="Compiling tests"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.txoj.tests.dest}"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.txoj.tests.src}"
-			destdir="${com.hp.mwlabs.ts.txoj.tests.dest}"
-			debug="${com.hp.mwlabs.debug}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.txoj.dest}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.utilities.compile" depends="com.hp.mw.ts.txoj.jar" if="com.hp.mwlabs.ts.txoj.utilities.compile">
-
-		<echo message="Compiling utilities"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.txoj.utilities.dest}"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.txoj.utilities.src}"
-			destdir="${com.hp.mwlabs.ts.txoj.utilities.dest}"
-			debug="${com.hp.mwlabs.debug}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.txoj.dest}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-
-	<!-- Jar targets -->
-	<target name="com.hp.mw.ts.txoj.jar" depends="com.hp.mw.ts.txoj.compile">
-
-		<echo message="Building jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.txoj.jar.dest}"/>
-
-        <copy
-                file="etc/${com.hp.mwlabs.ts.txoj.mappingfile}"
-                tofile="${com.hp.mwlabs.ts.txoj.dest}/${com.hp.mwlabs.ts.txoj.mappingfile}"/>
-
-		<jar
-			jarfile="${com.hp.mwlabs.ts.txoj.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"
-			basedir="${com.hp.mwlabs.ts.txoj.dest}"
-		/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-			<classpath>
-				<pathelement location="${com.hp.mwlabs.ts.txoj.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"/>
-			</classpath>
-		</classpath-builder>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.utilities.jar" depends="com.hp.mwlabs.ts.txoj.utilities.compile" if="com.hp.mwlabs.ts.txoj.utilities.compile">
-
-		<echo message="Building utliities jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.txoj.jar.dest}"/>
-		<jar
-			jarfile="${com.hp.mwlabs.ts.txoj.jar.dest}/${com.hp.mwlabs.ts.modulename}_bin.jar"
-			basedir="${com.hp.mwlabs.ts.txoj.utilities.dest}"
-		/>
-
-	</target>
-
-
-	<!-- Installation targets -->
-    <target name="com.hp.mw.ts.txoj.install" depends="com.hp.mw.ts.txoj.build">
-
-            <echo message="Installing module txoj"/>
-            <echo message="Installation directory : ${com.hp.mwlabs.installationdirectory}"/>
-            <mkdir dir="${com.hp.mw.propertydirectory}"/>
-
-            <taskdef name="merge-property-files"
-                         classname="com.hp.mw.buildsystem.ant.MergePropertyFiles" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-            <echo>Merging propertyfiles into main product property file</echo>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.txoj.propertyfile}"
-                                      merge="${com.hp.mwlabs.ts.txoj.etc}/default-${com.hp.mwlabs.ts.txoj.propertyfile.src}"/>
-
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+			<entry key="TXOJ_VERSION" value="unknown"/>
+        </propertyfile>
     </target>
 
-	<target name="com.hp.mwlabs.ts.txoj.tests.install" depends="com.hp.mwlabs.ts.txoj.tests.jar" if="com.hp.mwlabs.ts.txoj.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.utilities.install" depends="com.hp.mwlabs.ts.txoj.utilities.compile" if="com.hp.mwlabs.ts.txoj.utilities.install">
-
-		<echo message="Installing utilities"/>
-
-	</target>
-
-        <target name="com.hp.mwlabs.ts.txoj.generateresourcebundle">
-
-            <echo message="Generating txoj Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.ts.txoj.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.ts.txoj.dest}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.ts.txoj.resourcebundle}"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.ts.txoj.clean" depends="com.hp.mwlabs.ts.txoj.tests.clean, com.hp.mwlabs.ts.txoj.utilities.clean">
-
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.ts.txoj.destroot}"/>
-		<delete dir="${com.hp.mwlabs.ts.txoj.jar.dest}"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.tests.clean">
-
-		<echo message="Cleaning tests"/>
-		<delete dir="${com.hp.mwlabs.ts.txoj.tests.dest}"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.txoj.utilities.clean">
-
-		<echo message="Cleaning utilities"/>
-		<delete dir="${com.hp.mwlabs.ts.txoj.utilities.dest}"/>
-
-	</target>
-
-	<!-- Short target names -->
-	<target name="compile" depends="com.hp.mw.ts.txoj.compile">
-
-	</target>
-
-	<target name="jar" depends="com.hp.mw.ts.txoj.jar">
-
-	</target>
-
-	<target name="install" depends="com.hp.mw.ts.txoj.install">
-
-	</target>
-
-	<target name="clean" depends="com.hp.mw.ts.txoj.clean">
-
-	</target>
-
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTA/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTA/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,332 +15,107 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2317 2005-07-12 13:32:04Z nmcl $ -->
-<project name="product" default="com.hp.mw.ts.product.build" basedir=".">
+<project name="module-jbossjta" default="dist" basedir=".">
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
+    <property name="modulename" value="jbossjta"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="product.properties"/>
+    <import file="../sharedbuild.xml"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    <property name="component-module-list" value="../common,../ArjunaCore/arjuna,../ArjunaCore/txoj,../ArjunaCore/tsmx,jta,jdbc"/>
 
-	<!-- configure dependencies -->
-	<property name="com.arjuna.buildsystem.dir" location="${buildsystem.dir}"/>
-	<property name="com.arjuna.ext.dir" location="${ext.dir}"/>
-	<property name="com.arjuna.common.dir" location="${common.dir}"/>
-	<property name="com.arjuna.arjunacore.dir" location="${core.dir}"/>
+    <target name="dist" depends="dist.compositenode, install.docs, install.scripts, install.services, install.etc, install.tools">
+        <copy file="INSTALL" todir="${build.dir}/install"/>
+    </target>
 
-	<property name="com.arjuna.buildsystem.build.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
+    <target name="clean" depends="sharedbuild.clean">
+        <ant dir="tsmx" antfile="build.xml" inheritall="false" target="clean"/>
+    </target>
 
-	<property name="com.arjuna.common.build.lib" location="${com.arjuna.common.dir}/build/lib"/>
-    <property name="com.arjuna.common.build.classes" location="${com.arjuna.common.dir}/build/classes"/>
-	<property name="com.arjuna.arjunacore.build.lib" location="${com.arjuna.arjunacore.dir}/lib"/>
+    <target name="htdocs">
+        <htdocs.composite.macro>
+            <packagesets>
+                <packageset dir="../common/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaCore/arjuna/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaCore/txoj/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaCore/tsmx/classes" excludes="**/internal/**"/>
+                <packageset dir="jta/classes" excludes="**/internal/**"/>
+                <packageset dir="jdbc/classes" excludes="**/internal/**"/>
+            </packagesets>
+        </htdocs.composite.macro>
+    </target>
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.module.name" value="JBossJTA"/>
-	<property name="com.hp.mw.ts.module.name.lowercase" value="jbossjta"/>
+    <target name="install.docs">
 
-	<property name="com.hp.mw.ts.product.htdocs.internal" value="no"/>
-	<property name="com.hp.mw.csf.compile" value="no"/>
+        <property name="dest.dir" value="docs"/>
 
-	<!-- Set internal property defaults -->
-	<property name="com.hp.mwlabs.ts.product.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.product.htdocs.dest" location="htdocs"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
-    <property name="com.hp.mwlabs.ts.product.services.jar.dest" location="services/"/>
+        <copy todir="${build.dir}/install/${dest.dir}" overwrite="true">
+            <fileset dir="docs" includes="**/*.pdf"/>
+        </copy>
 
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.product.init">
-		<!-- Define default build properties -->
-		<tstamp>
-		<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
+        <copy todir="${build.dir}/install/${dest.dir}/user_guide/transaction_core" overwrite="true">
+            <fileset dir="../ArjunaCore/docs/user_guide" includes="*.pdf" excludes="Admin*"/>
+        </copy>
+    </target>
 
-		<property name="com.hp.mw.installationdirectory" location="install"/>
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
+    <target name="install.scripts">
+        <ant dir="../ArjunaCore" target="install.scripts" inheritall="false">
+            <property name="scripts.dest.dir" value="${basedir}/${build.dir}/install/bin"/>
+            <property name="product_name" value="${modulename}"/>
+            <property name="home_directory" value="JBOSSTA_HOME"/>
+        </ant>
+    </target>
 
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
+    <target name="install.services">
+        <ant dir="../ArjunaCore" target="install.services" inheritall="false">
+            <property name="services.dest.dir" value="${basedir}/${build.dir}/install/services"/>
+            <property name="product_name" value="${modulename}"/>
+        </ant>
+    </target>
 
-		<echo message="Initialising product ${com.hp.mw.ts.module.name}"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
+    <target name="install.etc">
 
-                <path id="com.arjuna.buildsystem.classpath">
-                    <fileset dir="${com.arjuna.buildsystem.build.lib}"/>
-                </path>
-                <property name="com.arjuna.buildsystem.classpath" refid="com.arjuna.buildsystem.classpath"/>
+        <property name="etc.dest.dir" value="${basedir}/${build.dir}/install/etc"/>
+        <property name="jta_depends" value="arjuna"/>
+        <property name="module1" value="arjunacore"/>
+        <property name="module2" value="jts"/>
 
-		<!-- Tests -->
-                <property name="com.hp.mw.ts.jta.tests.compile" value="${com.hp.mw.alltests.build}"/>
-                <property name="com.hp.mw.ts.jdbc.tests.compile" value="${com.hp.mw.alltests.build}"/>
+        <ant dir="../ArjunaCore" target="install.etc" inheritall="false">
+            <property name="etc.dest.dir" value="${etc.dest.dir}"/>
+        </ant>
 
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
+        <taskdef name="merge-property-files"
+            classname="com.hp.mw.buildsystem.ant.MergePropertyFiles"
+            classpath="../antbuildsystem/build/lib/buildsystem.jar"/>
 
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
+        <copy tofile="${basedir}/${build.dir}/processed-jta-properties.xml"
+              file="${basedir}/jta/etc/default-jta-properties.xmltmpl"
+              filtering="true" overwrite="true">
+            <filterset>
+                <filter token="JTA_DEPENDS" value="${jta_depends}"/>
+				<filter token="MODULE1" value="${module1}"/>
+				<filter token="MODULE2" value="${module2}"/>
+            </filterset>
+        </copy>
 
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/${build.dir}/processed-jta-properties.xml"/>
 
-		<!-- Build htdocs for just mw, or mw and mwlabs -->
-		<condition property="com.hp.mwlabs.ts.product.htdocs.list" value="com.arjuna.ats.*,com.arjuna.orbportability.*">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<condition property="com.hp.mwlabs.ts.product.htdocs.exclude" value="">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<condition property="com.hp.mwlabs.ts.product.htdocs.private" value="yes">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.ts.product.htdocs.list" value="com.arjuna.ats.arjuna.*,com.arjuna.ats.txoj.*,com.arjuna.orbportability.*,com.arjuna.ats.jts.*,com.arjuna.ats.jta.*,com.arjuna.ats.jtax.*,com.arjuna.ats.jdbc.*,com.arjuna.ats.tsmx.*,com.arjuna.ats.csfx.*"/>
-		<property name="com.hp.mwlabs.ts.product.htdocs.exclude" value="com.arjuna.orbportability.internal.*"/>
-		<property name="com.hp.mwlabs.ts.product.htdocs.private" value="no"/>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/jta/etc/default-RecoveryManager-properties.xml" override="true"/>
 
-		<!-- Define classpath builder task and add this JAR to the classpath -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpathref="com.arjuna.buildsystem.classpath"/>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/jdbc/etc/default-jdbc-properties.xml"/>
 
-		<!-- Clear build classpath file and add all JARs within lib/ext/ -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" clear="true">
-            <classpath>
-                <fileset dir="${com.arjuna.ext.dir}">
-                    <include name="**.jar"/>
-                    <include name="**.zip"/>
-                </fileset>
-                <fileset dir="${com.arjuna.common.build.lib}" includes="jbossts-common.jar"/>
-                <fileset dir="${com.arjuna.arjunacore.build.lib}" excludes="*-tests.jar"/>
-            </classpath>
-        </classpath-builder>
-
-	</target>
-
-	<!-- Project targets - must add all module names to each target -->
-	<target name="com.hp.mw.ts.product.build" depends="com.hp.mw.ts.product.compile, com.hp.mw.ts.product.dojar, com.hp.mw.ts.product.htdocs">
-
-	</target>
-
-	<target name="com.hp.mw.ts.product.compile"
-		depends="com.hp.mwlabs.ts.product.init,
-		com.hp.mwlabs.ts.product.jta.compile,
-		com.hp.mwlabs.ts.product.jdbc.compile,
-                com.hp.mwlabs.ts.product.tsmx.compile"/>
-
-	<target name="com.hp.mw.ts.product.jar"
-		depends="com.hp.mwlabs.ts.product.init,
-		com.hp.mwlabs.ts.product.jta.jar,
-		com.hp.mwlabs.ts.product.jdbc.jar,
-                com.hp.mwlabs.ts.product.tsmx.jar,
-		com.hp.mw.ts.product.tests.dojar,
-		com.hp.mw.ts.product.dojar"/>
-
-	<target name="com.hp.mw.ts.product.dojar">
-		<taskdef name="module-to-product" classname="com.hp.mw.buildsystem.ant.ModuleToProduct" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<module-to-product destdir="${com.hp.mwlabs.ts.product.jar.dest}" destfile="${com.hp.mw.ts.module.name}">
-			<fileset dir="${com.arjuna.arjunacore.build.lib}" excludes="*-tests.jar"/>
-			<fileset dir=".">
-				<include name="jta/lib/*.jar"/>
-				<include name="jdbc/lib/*.jar"/>
-			</fileset>
-		</module-to-product>
-
-		<touch file="built_using_java_${java.specification.version}"/>
-		<jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.module.name.lowercase}.jar" update="true">
-			<fileset dir=".">
-				<filename name="built_using_java_${java.specification.version}"/>
-			</fileset>
-		</jar>
-		<delete file="built_using_java_${java.specification.version}"/>
-
-        <!-- bundle jbossts-common into the product .jar -->
-        <jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.module.name.lowercase}.jar" update="true">
-			<fileset dir="${com.arjuna.common.build.classes}">
-				<exclude name="build_using*"/>
-			</fileset>
-		</jar>
-
-	</target>
-
-	<target name="com.hp.mw.ts.product.tests.dojar">
-		<taskdef name="module-to-product" classname="com.hp.mw.buildsystem.ant.ModuleToProduct" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<module-to-product destdir="${com.hp.mwlabs.ts.product.jar.dest}" destfile="${com.hp.mw.ts.module.name}-tests">
-			<fileset dir="${com.arjuna.arjunacore.build.lib}" includes="*-tests.jar"/>
-			<fileset dir=".">
-				<include name="jta/lib/tests/*.jar"/>
-				<include name="jdbc/lib/tests/*.jar"/>
-			</fileset>
-		</module-to-product>
-
-	</target>
-
-	<target name="com.hp.mw.ts.product.htdocs"
-				depends="com.hp.mwlabs.ts.product.init"
-        if="com.hp.mwlabs.ts.build.jta">
-		<echo message="Building htdocs "/>
-		<mkdir dir="${com.hp.mwlabs.ts.product.htdocs.dest}"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javadoc
-			sourcepath="${com.hp.mwlabs.ts.product.htdocs.path}"
-			destdir="${com.hp.mwlabs.ts.product.htdocs.dest}"
-			packagenames="${com.hp.mwlabs.ts.product.htdocs.list}"
-			excludepackagenames="${com.hp.mwlabs.ts.product.htdocs.exclude}"
-			private="${com.hp.mwlabs.ts.product.htdocs.private}"
-            		classpath="${build.classpath}"
-		>
-		</javadoc>
-	</target>
-
-    <target name="com.hp.mw.ts.product.install-all"
-            depends="com.hp.mw.ts.product.install,
-            com.hp.mwlabs.ts.product.htdocs.install,
-            com.hp.mwlabs.ts.product.docs.install"/>
-
-    <target name="com.hp.mwlabs.ts.product.htdocs.install" depends="com.hp.mw.ts.product.htdocs" if="com.hp.mwlabs.ts.build.jta">
-
-            <echo message="Installing htdocs"/>
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/htdocs"/>
-            <copy
-                    todir="${com.hp.mwlabs.installationdirectory}/htdocs"
-            >
-                    <fileset dir="htdocs"/>
-            </copy>
-
     </target>
 
-    <target name="com.hp.mw.ts.product.install"
-        depends="com.hp.mwlabs.ts.product.init,
-            com.hp.mwlabs.ts.product.jta.install,
-            com.hp.mwlabs.ts.product.jdbc.install,
-            com.hp.mwlabs.ts.product.tsmx.install,
-            com.hp.mw.ts.product.dojar"
-        if="com.hp.mwlabs.ts.build.jta">
-
-            <echo message="Installation directory : ${com.hp.mwlabs.installationdirectory}"/>
-
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/lib"/>
-
-			<touch file="${com.hp.mwlabs.installationdirectory}/lib/built_using_java_${java.specification.version}"/>
-
-            <copy todir="${com.hp.mwlabs.installationdirectory}/lib">
-                <fileset dir="${com.hp.mwlabs.ts.product.jar.dest}" includes="${com.hp.mw.ts.module.name.lowercase}.jar"/>
-            </copy>
-            <copy todir="${com.hp.mwlabs.installationdirectory}" file="copyright.txt"/>
-            <copy todir="${com.hp.mwlabs.installationdirectory}" file="INSTALL"/>
+    <target name="install.tools">
+        <ant dir="tsmx" target="tools" inheritall="false">
+            <property name="install.dir" value="${basedir}/${build.dir}/install/bin/tools"/>
+        </ant>
+        <move file="${build.dir}/install/bin/tools/tsmx-tools.jar" todir="${build.dir}/install/bin"/>
     </target>
 
-	<target name="com.hp.mwlabs.ts.product.docs.install" depends="com.hp.mwlabs.ts.product.docs.jtainstall, com.hp.mwlabs.ts.product.docs.jtsinstall" />
-
-	<target name="com.hp.mwlabs.ts.product.docs.jtainstall" if="com.hp.mwlabs.ts.build.jta">
-		<echo message="Installing ${com.hp.mw.ts.module.name} docs"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/docs/"/>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/docs/">
-			<fileset dir="docs/">
-				<include name="**/*.pdf"/>
-			</fileset>
-		</copy>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.docs.jtsinstall" if="com.hp.mwlabs.ts.build.jts">
-		<echo message="Installing ${com.hp.mw.ts.module.name} docs"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/docs/user_guide/jta"/>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/docs/user_guide/jta">
-			<fileset dir="docs/user_guide">
-				<include name="Programmer*.pdf"/>
-			</fileset>
-		</copy>
-	</target>
-
-	<target name="com.hp.mw.ts.product.clean"
-		depends="com.hp.mwlabs.ts.product.jta.clean,
-		com.hp.mwlabs.ts.product.jdbc.clean,
-                com.hp.mwlabs.ts.product.tsmx.clean">
-
-		<delete dir="${com.hp.mwlabs.ts.product.jar.dest}" quiet="true"/>
-		<delete dir="${com.hp.mwlabs.ts.product.htdocs.dest}" quiet="true"/>
-	</target>
-
-
-	<!-- Module targets -->
-	<target name="com.hp.mwlabs.ts.product.jta.compile">
-		<ant dir="jta" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jdbc.compile">
-		<ant dir="jdbc" />
-	</target>
-
-        <target name="com.hp.mwlabs.ts.product.tsmx.compile">
-                <ant dir="tsmx" target="compile"/>
-        </target>
-
-	<target name="com.hp.mwlabs.ts.product.jta.jar">
-		<ant dir="jta" target="com.hp.mw.ts.jta.build" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jdbc.jar">
-		<ant dir="jdbc" target="com.hp.mw.ts.jdbc.jar" />
-	</target>
-
-        <target name="com.hp.mwlabs.ts.product.tsmx.jar">
-                <ant dir="tsmx" target="jar" />
-        </target>
-
-	<target name="com.hp.mwlabs.ts.product.jta.install">
-		<ant dir="jta" target="com.hp.mw.ts.jta.install"/>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jdbc.install">
-		<ant dir="jdbc" target="com.hp.mw.ts.jdbc.install"/>
-	</target>
-
-        <target name="com.hp.mwlabs.ts.product.tsmx.install">
-                <ant dir="tsmx" target="install"/>
-        </target>
-
-	<target name="com.hp.mwlabs.ts.product.jta.clean">
-		<ant dir="jta" target="com.hp.mw.ts.jta.clean" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jdbc.clean">
-		<ant dir="jdbc" target="com.hp.mw.ts.jdbc.clean" />
-	</target>
-
-        <target name="com.hp.mwlabs.ts.product.tsmx.clean">
-                <ant dir="tsmx" target="clean" />
-        </target>
-
-	<!-- Short target names -->
-	<target name="build" depends="com.hp.mw.ts.product.build"/>
-
-	<target name="clean" depends="com.hp.mw.ts.product.clean"/>
-
-	<target name="jar" depends="com.hp.mw.ts.product.jar"/>
-
-	<target name="htdocs" depends="com.hp.mw.ts.product.htdocs"/>
-
-	<target name="install" depends="com.hp.mw.ts.product.install"/>
-
-	<target name="install-all" depends="com.hp.mw.ts.product.install-all"/>
-
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,455 +15,43 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2342 2006-03-30 13:06:17Z  $-->
+<project name="module-jdbc" default="dist.leafnode" basedir=".">
 
-<project name="module-jdbc" default="com.hp.mw.ts.jdbc.build" basedir=".">
+    <property name="modulename" value="jdbc"/>
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+    <property name="excluded.classes" value="**/oracle*.java **/Oracle*.java **/*JDBC3.java"/>
+    <property name="excluded.test.classes" value="**/Oracle*.java"/>
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="jdbc"/>
+    <property name="global.ext.libs" value="jta-1_1-classes.zip"/>
+    <property name="global.ext.test.libs" value="TestingFramework.jar"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-jdbc.properties"/>
+    <import file="../../sharedbuild.xml"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.jdbc.cloudscape36.compile" value="no"/>
-	<property name="com.hp.mw.ts.jdbc.sequelink51.compile" value="no"/>
-	<property name="com.hp.mw.ts.jdbc.oracle81.compile" value="no"/>
-	<property name="com.hp.mw.ts.jdbc.oracle90.compile" value="yes"/>
-	<property name="com.hp.mw.ts.jdbc.tests.compile" value="yes"/>
-	<property name="com.hp.mw.ts.jdbc.tests.install" value="no"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
+        <import-module.macro module="jta"/>
 
-	<!-- Set internal property defaults -->
-		<!-- Path names -->
-	<property name="com.hp.mwlabs.ts.jdbc.src" location="classes"/>
-	<property name="com.hp.mwlabs.ts.jdbc.etc" location="etc"/>
-	<property name="com.hp.mwlabs.ts.jdbc.buildroot"
-		location="build"/>
-	<property name="com.hp.mwlabs.ts.jdbc.builddir" location="${com.hp.mwlabs.ts.jdbc.buildroot}/classes/"/>
-	<property name="com.hp.mwlabs.ts.jdbc.dest" location="${com.hp.mwlabs.ts.jdbc.buildroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.jdbc.tests.src" location="tests"/>
-	<property name="com.hp.mwlabs.ts.jdbc.tests.dest" location="${com.hp.mwlabs.ts.jdbc.buildroot}/tests"/>
-	<property name="com.hp.mwlabs.ts.jdbc.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.jdbc.tests.destdir" location="${com.hp.mwlabs.ts.jdbc.jar.dest}/tests/"/>
+    </target>
 
-	<!-- TODO don't try and build JDBC4 support if we are on jdk 1.5, it won't work -->
-	<condition property="com.hp.mwlabs.ts.jdbc.compile.excludes.jdbc"
-               value="**/ConnectionImpleJDBC4.java" else="**/ConnectionImpleJDBC3.java">
-		<equals arg1="${java.specification.version}" arg2="1.5"/>
-	</condition>
-
-		<!-- Relative path for files to exclude in main compile -->
-	<property name="com.hp.mwlabs.ts.jdbc.compile.excludes" value="**/oracle_8*.java, **/oracle_9*.java, **/sequelink*.java, **/cloudscape*.java, ${com.hp.mwlabs.ts.jdbc.compile.excludes.jdbc}"/>
-        <property name="com.hp.mwlabs.ts.jdbc.resourcebundle"
-	value="jdbc_msg_en_US.properties"/>
-
-    <property name="com.hp.mwlabs.ts.jdbc.propertyfile.src" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-
-	<property name="com.hp.mwlabs.ts.jdbc.mappingfile" value="${com.hp.mwlabs.ts.modulename}-properties.mappings"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.jdbc.init" depends="com.hp.mwlabs.ts.jdbc.setpropertyfiles">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<tstamp>
-	    	<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
-
-		<!-- Define classpath builder task -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Initialising module jdbc"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Check which bits to compile and/or install -->
-		<condition property="com.hp.mwlabs.ts.jdbc.cloudscape36.compile">
-			<equals arg1="${com.hp.mw.ts.jdbc.cloudscape36.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jdbc.sequelink51.compile">
-			<equals arg1="${com.hp.mw.ts.jdbc.sequelink51.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jdbc.oracle81.compile">
-			<equals arg1="${com.hp.mw.ts.jdbc.oracle81.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jdbc.oracle90.compile">
-			<equals arg1="${com.hp.mw.ts.jdbc.oracle90.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jdbc.tests.compile">
-			<equals arg1="${com.hp.mw.ts.jdbc.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jdbc.tests.install">
-			<equals arg1="${com.hp.mw.ts.jdbc.tests.install}" arg2="yes"/>
-		</condition>
-
-		<!--Set the properties we need to preprocess files.-->
-
-		<condition property="sequelink51" value=", Sequelink_5_1">
-			<equals arg1="${com.hp.mw.ts.jdbc.sequelink51.compile}" arg2="yes"/>
-		</condition>
-		<property name="sequelink51" value=""/>
-
-		<condition property="oracle81" value=", Oracle_8_1_6">
-			<equals arg1="${com.hp.mw.ts.jdbc.oracle81.compile}" arg2="yes"/>
-		</condition>
-		<property name="oracle81" value=""/>
-
-		<condition property="oracle90" value=", Oracle_9_0">
-			<equals arg1="${com.hp.mw.ts.jdbc.oracle90.compile}" arg2="yes"/>
-		</condition>
-		<property name="oracle90" value=""/>
-
-		<condition property="cloudscape36" value=", Cloudscape_3_6">
-			<equals arg1="${com.hp.mw.ts.jdbc.cloudscape36.compile}" arg2="yes"/>
-		</condition>
-		<property name="cloudscape36" value=""/>
-
-		<!-- Set the module property file details -->
-
-		<property name="com.hp.mwlabs.ts.jdbc.propertyfile" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-
-		<property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property file name : ${com.hp.mwlabs.ts.jdbc.propertyfile}"/>
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
-
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.ts.jdbc.dest}"/>
-
-	</target>
-
-    <!-- If this build is part of a product build set the property files to the product property file -->
-    <target name="com.hp.mwlabs.ts.jdbc.setpropertyfiles" if="com.hp.mw.ts.product.name">
-
-        <echo>Overriding propertyfile settings with product propertyfile settings</echo>
-        <property name="com.hp.mwlabs.ts.jdbc.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+            <!-- TODO supported versions -->
+            <entry key="SUPPORTED_VERSIONS" value="unknown"/>
+			<entry key="JDBC_VERSION" value="unknown"/>
+        </propertyfile>
     </target>
 
-    <!-- Default build target -->
-    <target name="com.hp.mw.ts.jdbc.build" depends="com.hp.mwlabs.jdbc.generateresourcebundle,com.hp.mw.ts.jdbc.jar, com.hp.mwlabs.ts.jdbc.tests.jar"/>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.ts.jdbc.compile" depends="com.hp.mwlabs.ts.jdbc.drivers.compile,com.hp.mwlabs.ts.jdbc.compile,com.hp.mwlabs.jdbc.generateresourcebundle">
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.compile" depends="com.hp.mwlabs.ts.jdbc.init">
-
-		<echo message="Compiling module"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.dest}"
-			excludes="${com.hp.mwlabs.ts.jdbc.compile.excludes}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jdbc.src}"/>
-			</classpath>
-		</javac>
-
-        <!-- Process the properties -->
-    	<property name="property.file" value="jdbc.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.ts.jdbc.dest}/${property.file}">
-			<entry key="MODULE" value="${com.hp.mwlabs.ts.modulename}"/>
-			<entry key="SOURCEID" value="${com.hp.mw.sourceid}"/>
-			<entry key="BUILDINFO" value="${com.hp.mw.builder}"/>
-			<entry key="VERSION" value="${com.hp.mw.version}"/>
-			<entry key="DATE" value="${com.hp.mw.date}"/>
-			<entry key="NOTES" value="${com.hp.mw.notes}"/>
-		    <entry key="SUPPORTED_VERSIONS" value="JNDI${cloudscape36}${oracle81}${oracle90}${sequelink51}"/>
-			<entry key="JDBC_VERSION" value="${com.hp.mw.version}"/>
-			<entry key="PROPERTIES_FILE" value="${com.hp.mwlabs.ts.jdbc.propertyfile}"/>
-		</propertyfile>
-	</target>
-
-	<!-- Non-specific objectstore files -->
-	<target name="com.hp.mwlabs.ts.jdbc.drivers.compile" depends="com.hp.mwlabs.ts.jdbc.cloudscape36.compile, com.hp.mwlabs.ts.jdbc.sequelink51.compile, com.hp.mwlabs.ts.jdbc.oracle81.compile, com.hp.mwlabs.ts.jdbc.oracle90.compile">
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.dest}"
-			classpath="${com.hp.mwlabs.ts.jdbc.src}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<exclude name="**"/>
-			<include name="**/drivers/modifiers/jndi.java"/>
-			<include name="**/drivers/modifiers/modifiers.java"/>
-			<include name="**/drivers/jndi.java"/>
-			<include name="**/drivers/modifiers/list.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jdbc.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.cloudscape36.compile" depends="com.hp.mwlabs.ts.jdbc.init" if="com.hp.mwlabs.ts.jdbc.cloudscape36.compile">
-
-		<echo message="Compiling cloudscape 3.6 driver support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/drivers/cloudscape_3_6.java"/>
-			<include name="**/drivers/modifiers/cloudscape_3_6_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jdbc.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.sequelink51.compile" depends="com.hp.mwlabs.ts.jdbc.init" if="com.hp.mwlabs.ts.jdbc.sequelink51.compile">
-
-		<echo message="Compiling sequelink 5.1 driver support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/drivers/sequelink_5_1.java"/>
-			<include name="**/drivers/modifiers/sequelink_5_1_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jdbc.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.oracle81.compile" depends="com.hp.mwlabs.ts.jdbc.init" if="com.hp.mwlabs.ts.jdbc.oracle81.compile">
-
-		<echo message="Compiling oracle 8.1 driver support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/drivers/oracle_8_1_6.java"/>
-			<include name="**/drivers/modifiers/oracle_8_1_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jdbc.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.oracle90.compile" depends="com.hp.mwlabs.ts.jdbc.init" if="com.hp.mwlabs.ts.jdbc.oracle90.compile">
-
-		<echo message="Compiling oracle 9.0 driver support"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.dest}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<include name="**/drivers/oracle_9_0.java"/>
-			<include name="**/drivers/modifiers/oracle_9_0_accessor.java"/>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jdbc.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.tests.jar" depends="com.hp.mwlabs.ts.jdbc.tests.compile" if="com.hp.mwlabs.ts.jdbc.tests.compile">
-
-		<mkdir dir="${com.hp.mwlabs.ts.jdbc.tests.destdir}"/>
-		<jar	basedir="${com.hp.mwlabs.ts.jdbc.tests.dest}"
-			jarfile="${com.hp.mwlabs.ts.jdbc.tests.destdir}/${com.hp.mwlabs.ts.modulename}_tests.jar"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.tests.compile" depends="com.hp.mw.ts.jdbc.jar" if="com.hp.mwlabs.ts.jdbc.tests.compile">
-
-		<echo message="Compiling tests"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.jdbc.tests.dest}"/>
-
-                <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jdbc.tests.src}"
-			destdir="${com.hp.mwlabs.ts.jdbc.tests.dest}"
-			excludes="${com.hp.mwlabs.ts.jdbc.compile.excludes}"
-			debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-                    <classpath>
-                        <path path="${build.classpath}"/>
-                        <path path="${com.hp.mwlabs.ts.jdbc.dest}"/>
-                    </classpath>
-		</javac>
-
-	</target>
-
-	<!-- Jar targets -->
-	<target name="com.hp.mw.ts.jdbc.jar" depends="com.hp.mw.ts.jdbc.compile">
-
-		<echo message="Building jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.jdbc.jar.dest}"/>
-
-        <copy file="etc/${com.hp.mwlabs.ts.jdbc.mappingfile}"
-                tofile="${com.hp.mwlabs.ts.jdbc.dest}/${com.hp.mwlabs.ts.jdbc.mappingfile}"/>
-
-		<jar
-			jarfile="${com.hp.mwlabs.ts.jdbc.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"
-			basedir="${com.hp.mwlabs.ts.jdbc.dest}"
-		/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-            <classpath>
-                <pathelement location="${com.hp.mwlabs.ts.jdbc.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"/>
-            </classpath>
-        </classpath-builder>
-
-	</target>
-
-	<!-- Installation targets -->
-    <target name="com.hp.mw.ts.jdbc.install" depends="com.hp.mw.ts.jdbc.build, com.hp.mwlabs.ts.jdbc.tests.install">
-
-            <echo message="Installing module jdbc"/>
-            <echo message="Installation directory ${com.hp.mwlabs.installationdirectory}"/>
-            <mkdir dir="${com.hp.mw.propertydirectory}"/>
-
-            <taskdef name="merge-property-files"
-                     classname="com.hp.mw.buildsystem.ant.MergePropertyFiles"
-                     classpath="${com.arjuna.buildsystem.classpath}"/>
-
-            <echo>Merging propertyfiles into main product property file</echo>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.jdbc.propertyfile}"
-                                      merge="${com.hp.mwlabs.ts.jdbc.etc}/default-${com.hp.mwlabs.ts.jdbc.propertyfile.src}"/>
-
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
     </target>
 
-	<target name="com.hp.mwlabs.ts.jdbc.tests.install" depends="com.hp.mwlabs.ts.jdbc.tests.compile" if="com.hp.mwlabs.ts.jdbc.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.ts.jdbc.clean" depends="com.hp.mwlabs.ts.jdbc.tests.clean">
-
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.ts.jdbc.dest}"/>
-		<delete dir="${com.hp.mwlabs.ts.jdbc.jar.dest}"/>
-		<delete dir="${com.hp.mwlabs.ts.jdbc.tests.dest}"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jdbc.tests.clean">
-
-		<echo message="Cleaning tests"/>
-
-	</target>
-
-	<!-- Short target names -->
-
-	<target name="jar" depends="com.hp.mw.ts.jdbc.jar">
-
-	</target>
-
-	<target name="install" depends="com.hp.mw.ts.jdbc.install">
-
-	</target>
-
-	<target name="clean" depends="com.hp.mw.ts.jdbc.clean">
-
-	</target>
-
-        <target name="com.hp.mwlabs.jdbc.generateresourcebundle">
-
-            <echo message="Generating JDBC Resource Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.ts.jdbc.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.ts.jdbc.builddir}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.ts.jdbc.resourcebundle}"/>
-                    <param name="-appendkey" value="[]"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTA/jta/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,352 +1,63 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors 
-  as indicated by the @author tags. 
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
   See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
   You should have received a copy of the GNU Lesser General Public License,
   v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
+
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2342 2006-03-30 13:06:17Z  $-->
+<project name="module-jta" default="dist.leafnode" basedir=".">
 
-<project name="module-jta" default="com.hp.mw.ts.jta.build" basedir=".">
+    <property name="modulename" value="jta"/>
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+    <property name="global.ext.libs" value="jta-1_1-classes.zip,connector-api.jar"/>
+    <property name="global.ext.test.libs" value="junit.jar,TestingFramework.jar"/>
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="jta"/>
+    <import file="../../sharedbuild.xml"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-jta.properties"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.jta.tests.compile" value="yes"/>
-	<property name="com.hp.mw.ts.jta.tests.install" value="no"/>
+    </target>
 
-	<!-- Set internal property defaults -->
-		<!-- Path names -->
-	<property name="com.hp.mwlabs.ts.jta.src" location="classes"/>
-	<property name="com.hp.mwlabs.ts.jta.etc" location="etc"/>
-	<property name="com.hp.mwlabs.ts.jta.buildroot"
-		location="build"/>
-	<property name="com.hp.mwlabs.ts.jta.builddir" location="${com.hp.mwlabs.ts.jta.buildroot}/classes/"/>
-	<property name="com.hp.mwlabs.ts.jta.dest" location="${com.hp.mwlabs.ts.jta.buildroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.jta.tests.src" location="tests/classes"/>
-	<property name="com.hp.mwlabs.ts.jta.tests.dest" location="${com.hp.mwlabs.ts.jta.buildroot}/tests"/>
-	<property name="com.hp.mwlabs.ts.jta.reports.dest" location="${com.hp.mwlabs.ts.jta.buildroot}/reports"/>
-	<property name="com.hp.mwlabs.ts.jta.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.jta.tests.destdir" location="${com.hp.mwlabs.ts.jta.jar.dest}/tests/"/>
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+			<entry key="JTA_VERSION" value="unknown"/>
+        </propertyfile>
+    </target>
 
-		<!-- Files that need word substitutions -->
-
-        <property name="com.hp.mwlabs.ts.jta.resourcebundle"
-	value="jta_msg_en_US.properties"/>
-
-    <property name="com.hp.mwlabs.ts.jta.propertyfile.tmpl" value="${com.hp.mwlabs.ts.modulename}-properties.xmltmpl"/>
-    <property name="com.hp.mwlabs.ts.jta.propertyfile.src" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-    <property name="com.hp.mwlabs.ts.jta.recoverymanagerpropertyfile.src" value="RecoveryManager-properties.xml"/>
-
-	<property name="com.hp.mwlabs.ts.jta.mappingfile" value="${com.hp.mwlabs.ts.modulename}-properties.mappings"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.jta.init" depends="com.hp.mwlabs.ts.jta.setpropertyfiles">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<tstamp>
-	    	<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
-
-		<!-- Define classpath builder task -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Initialising module jta"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Check which bits to compile and/or install -->
-		<condition property="com.hp.mwlabs.ts.jta.tests.compile">
-			<equals arg1="${com.hp.mw.ts.jta.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jta.tests.install">
-			<equals arg1="${com.hp.mw.ts.jta.tests.install}" arg2="yes"/>
-		</condition>
-
-		<!-- Which module to use for TransactionImple -->
-		<condition property="com.hp.mwlabs.ts.jta.module1" value="jts">
-			<isset property="com.hp.mwlabs.ts.build.jts"/>
-		</condition>
-		<property name="com.hp.mwlabs.ts.jta.module1" value="arjunacore"/>
-
-		<condition property="com.hp.mwlabs.ts.jta.module2" value="arjunacore">
-			<isset property="com.hp.mwlabs.ts.build.jts"/>
-		</condition>
-		<property name="com.hp.mwlabs.ts.jta.module2" value="jts"/>
-
-		<!-- Set the module property file details -->
-
-		<property name="com.hp.mwlabs.ts.jta.propertyfile" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-
-		<property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property file name : ${com.hp.mwlabs.ts.jta.propertyfile}"/>
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
-
-		<!-- Process the property file -->
-		<copy
-			file="${com.hp.mwlabs.ts.jta.etc}/default-${com.hp.mwlabs.ts.jta.propertyfile.tmpl}"
-			tofile="${com.hp.mwlabs.ts.jta.etc}/default-${com.hp.mwlabs.ts.jta.propertyfile.src}"
-			overwrite="yes"
-		>
-			<filterset>
-				<filter token="MODULE1" value="${com.hp.mwlabs.ts.jta.module1}"/>
-				<filter token="MODULE2" value="${com.hp.mwlabs.ts.jta.module2}"/>
-			</filterset>
-		</copy>
-
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.ts.jta.dest}"/>
-
-	</target>
-
-    <!-- If this build is part of a product build set the property files to the product property file -->
-    <target name="com.hp.mwlabs.ts.jta.setpropertyfiles" if="com.hp.mw.ts.product.name">
-
-            <echo>Overriding propertyfile settings with product propertyfile settings</echo>
-            <property name="com.hp.mwlabs.ts.jta.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
     </target>
 
-    <!-- Default build target -->
-    <target name="com.hp.mw.ts.jta.build" depends="com.hp.mwlabs.jta.generateresourcebundle,com.hp.mw.ts.jta.jar, com.hp.mwlabs.ts.jta.tests.jar"/>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.ts.jta.compile" depends="com.hp.mwlabs.ts.jta.compile,com.hp.mwlabs.jta.generateresourcebundle">
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jta.compile" depends="com.hp.mwlabs.ts.jta.init">
-
-		<echo message="Compiling module"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jta.src}"
-			destdir="${com.hp.mwlabs.ts.jta.dest}"
-			excludes="${com.hp.mwlabs.ts.jta.compile.excludes}"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${com.hp.mwlabs.ts.jta.src}"/>
-				<path path="${build.classpath}"/>
-			</classpath>
-		</javac>
-
-        <!-- Process the properties -->
-    	<property name="property.file" value="jta.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.ts.jta.dest}/${property.file}">
-			<entry key="JTA_VERSION" value="${com.hp.mw.version}"/>
-			<entry key="PROPERTIES_FILE" value="${com.hp.mwlabs.ts.jta.propertyfile}"/>
-		</propertyfile>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jta.tests.run" depends="com.hp.mwlabs.ts.jta.tests.compile" if="com.hp.mwlabs.ts.jta.tests.compile">
-            <mkdir dir="${com.hp.mwlabs.ts.jta.reports.dest}"/>
-            <junit printsummary="yes">
-                <formatter type="plain"/>
-                <classpath>
-                    <pathelement location="${com.hp.mwlabs.ts.jta.tests.dest}"/>
-                    <path location="${com.hp.mwlabs.ts.jta.dest}"/>
-                    <pathelement path="${build.classpath}"/>
-                    <pathelement location="etc"/>
-                </classpath>
-                <batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-                    todir="${com.hp.mwlabs.ts.jta.reports.dest}">
-                    <fileset dir="${com.hp.mwlabs.ts.jta.tests.src}" includes="**/LastResource*TestCase.java"/>
-                    <fileset dir="${com.hp.mwlabs.ts.jta.tests.src}" includes="**/SubordinateTestCase.java"/>
-                </batchtest>
-            </junit>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jta.tests.jar" depends="com.hp.mwlabs.ts.jta.tests.run" if="com.hp.mwlabs.ts.jta.tests.compile">
-
-		<mkdir dir="${com.hp.mwlabs.ts.jta.tests.destdir}"/>
-		<jar	basedir="${com.hp.mwlabs.ts.jta.tests.dest}"
-			jarfile="${com.hp.mwlabs.ts.jta.tests.destdir}/${com.hp.mwlabs.ts.modulename}_tests.jar"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jta.tests.compile" depends="com.hp.mw.ts.jta.jar" if="com.hp.mwlabs.ts.jta.tests.compile">
-
-		<echo message="Compiling tests"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.jta.tests.dest}"/>
-
-                <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jta.tests.src}"
-			destdir="${com.hp.mwlabs.ts.jta.tests.dest}"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-                    <classpath>
-                        <path path="${build.classpath}"/>
-                        <path path="${com.hp.mwlabs.ts.jta.dest}"/>
-                    </classpath>
-		</javac>
-
-	</target>
-
-	<!-- Jar targets -->
-	<target name="com.hp.mw.ts.jta.jar" depends="com.hp.mw.ts.jta.compile">
-
-		<echo message="Building jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.jta.jar.dest}"/>
-
-        <copy file="etc/${com.hp.mwlabs.ts.jta.mappingfile}"
-                tofile="${com.hp.mwlabs.ts.jta.dest}/${com.hp.mwlabs.ts.jta.mappingfile}"/>
-
-		<jar
-			jarfile="${com.hp.mwlabs.ts.jta.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"
-			basedir="${com.hp.mwlabs.ts.jta.dest}"
-		/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-            <classpath>
-                <pathelement location="${com.hp.mwlabs.ts.jta.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"/>
-            </classpath>
-        </classpath-builder>
-
-	</target>
-
-	<!-- Installation targets -->
-    <target name="com.hp.mw.ts.jta.install" depends="com.hp.mw.ts.jta.build, com.hp.mwlabs.ts.jta.tests.install">
-
-            <echo message="Installing module jta"/>
-            <echo message="Installation directory ${com.hp.mwlabs.installationdirectory}"/>
-            <mkdir dir="${com.hp.mw.propertydirectory}"/>
-
-            <taskdef name="merge-property-files"
-                     classname="com.hp.mw.buildsystem.ant.MergePropertyFiles"
-                     classpath="${com.arjuna.buildsystem.classpath}"/>
-
-            <echo>Merging propertyfiles into main product property file</echo>
-
-            <condition property="com.hp.mwlabs.ts.jta.depends" value="jts">
-                <isset property="com.hp.mwlabs.ts.build.jts"/>
-            </condition>
-            <property name="com.hp.mwlabs.ts.jta.depends" value="arjuna"/>
-
-            <copy tofile="${com.hp.mwlabs.ts.jta.etc}/processed-${com.hp.mwlabs.ts.jta.propertyfile.src}"
-                  file="${com.hp.mwlabs.ts.jta.etc}/default-${com.hp.mwlabs.ts.jta.propertyfile.src}"
-                  filtering="true" overwrite="true">
-                <filterset>
-                    <filter token="JTA_DEPENDS" value="${com.hp.mwlabs.ts.jta.depends}"/>
-                </filterset>
-            </copy>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.jta.propertyfile}"
-                                  merge="${com.hp.mwlabs.ts.jta.etc}/processed-${com.hp.mwlabs.ts.jta.propertyfile.src}"/>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.jta.propertyfile}"
-                                  merge="${com.hp.mwlabs.ts.jta.etc}/default-${com.hp.mwlabs.ts.jta.recoverymanagerpropertyfile.src}" override="true"/>
+    <target name="run.tests">
+        <run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/SubordinateTestCase.java"/></tests>
+        </run.tests.macro>
+        <run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/LastResourceDisallowTestCase.java"/></tests>
+        </run.tests.macro>
+        <run.tests.macro>
+            <tests><fileset dir="tests/classes" includes="**/LastResourceAllowedTestCase.java"/></tests>
+        </run.tests.macro>
     </target>
 
-
-	<target name="com.hp.mwlabs.ts.jta.tests.install" depends="com.hp.mwlabs.ts.jta.tests.compile" if="com.hp.mwlabs.ts.jta.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.ts.jta.clean" depends="com.hp.mwlabs.ts.jta.tests.clean">
-
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.ts.jta.dest}"/>
-		<delete dir="${com.hp.mwlabs.ts.jta.jar.dest}"/>
-		<delete dir="${com.hp.mwlabs.ts.jta.tests.dest}"/>
-		<delete file="${com.hp.mwlabs.ts.jta.propertyfile.src}"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jta.tests.clean">
-
-		<echo message="Cleaning tests"/>
-
-	</target>
-
-	<!-- Short target names -->
-	<target name="jar" depends="com.hp.mw.ts.jta.jar"/>
-	<target name="tests" depends="com.hp.mw.ts.jta.build"/>
-	<target name="install" depends="com.hp.mw.ts.jta.install"/>
-	<target name="clean" depends="com.hp.mw.ts.jta.clean"/>
-
-        <target name="com.hp.mwlabs.jta.generateresourcebundle">
-
-            <echo message="Generating JTA Resource Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.ts.jta.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.ts.jta.builddir}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.ts.jta.resourcebundle}"/>
-                    <param name="-appendkey" value="[]"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-</project>
-
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,192 +1,64 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
-  as indicated by the @author tags. 
-  See the copyright.txt in the distribution for a full listing 
-  of individual contributors.
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
-  of the GNU General Public License, v. 2.0.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
-  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-  You should have received a copy of the GNU General Public License,
-  v. 2.0 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
+
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<project name="module-tsmx" default="com.arjuna.mw.ts.tsmx.compile" basedir=".">
-    <!-- class path behaviour -->
-    <property name="build.sysclasspath" value="last"/>
-    <property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+<project name="module-jtatsmx" default="dist.leafnode" basedir=".">
 
-    <!-- Set module name -->
-    <property name="com.arjuna.mwlabs.ts.modulename" value="tsmx"/>
-    <property name="com.arjuna.arjunacore.tsmx.lib"
-        location="${com.arjuna.arjunacore.dir}/tsmx/lib"/>
-    <property name="com.arjuna.arjunacore.tsmx.tools"
-        location="${com.arjuna.arjunacore.tsmx.lib}/bin/tools"/>
+    <property name="modulename" value="tsmx"/>
 
-    <!-- Load Build Properties File -->
-    <property file="${com.arjuna.mw.ts.properties}"/>
+    <import file="../../sharedbuild.xml"/>
 
-    <!-- Set internal property defaults -->
-    <!-- Path names -->
-    <property name="com.arjuna.mwlabs.ts.tsmx.destroot" location="build"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.jar.dest" location="lib"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.utilities.src" location="bin"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.utilities.dest" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/bin"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.tmp" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/tmp"/>
+    <target name="init" depends="sharedbuild.init">
 
-    <!-- Initialisation -->
-    <target name="com.arjuna.mwlabs.ts.tsmx.init">
-        <!-- Define default build properties -->
-        <tstamp>
-            <format property="com.arjuna.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-        </tstamp>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
+        <import-module.macro module="jta"/>
 
-        <!-- Define classpath builder task -->
-        <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.compile">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.compile}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.install">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.install}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.jar">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.jar}" arg2="yes"/>
-        </condition>
-
-        <property name="com.arjuna.mw.installationdirectory" value="install"/>
-        <property name="com.arjuna.mw.sourceid" value="unknown"/>
-        <property name="com.arjuna.mw.version" value="unknown"/>
-        <property name="com.arjuna.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-        <property name="com.arjuna.mw.notes" value=""/>
-        <echo message="Initialising module tsmx"/>
-        <echo message="Source ID = ${com.arjuna.mw.sourceid}"/>
-        <echo message="Version   = ${com.arjuna.mw.version}"/>
-        <echo message="Builder   = ${com.arjuna.mw.builder}"/>
-        <echo message="Date      = ${com.arjuna.mw.date}"/>
-        <echo message="Notes     = ${com.arjuna.mw.notes}"/>
-
-        <!-- Installation directory -->
-        <property name="com.arjuna.mwlabs.installationdirectory" location="${com.arjuna.mw.installationdirectory}"/>
-
-        <!-- Compile with debugging? -->
-        <condition property="com.arjuna.mwlabs.debug" value="no">
-            <equals arg1="${com.arjuna.mw.debug}" arg2="no"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.debug" value="yes"/>
-
-        <!-- Compile with deprecation? -->
-        <condition property="com.arjuna.mwlabs.deprecation" value="yes">
-            <equals arg1="${com.arjuna.mw.deprecation}" arg2="yes"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.deprecation" value="no"/>
-
-        <!-- setup classpath -->
-        <property name="com.arjuna.arjunacore.tsmx.dir" location="${com.arjuna.arjunacore.dir}/tsmx"/>
-        <property name="com.arjuna.arjunacore.tsmx.lib.dir" location="${com.arjuna.arjunacore.tsmx.dir}/lib"/>
-        <property name="com.arjuna.arjunacore.tsmx.bin.dir" location="${com.arjuna.arjunacore.tsmx.lib.dir}/bin.tools"/>
-
-        <path id="tsmx.classpath">
-            <fileset dir="${com.arjuna.arjunacore.tsmx.lib.dir}" includes="**/*.jar"/>
-        </path>
-        <property name="tsmx.classpath" refid="tsmx.classpath"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
     </target>
 
-    <target name="com.arjuna.mw.ts.tsmx.compile" depends="com.arjuna.mwlabs.ts.tsmx.utilities.compile"/>
+    <target name="tools" depends="init">
 
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.compile" depends="com.arjuna.mwlabs.ts.tsmx.init">
+        <property name="install.dir" value="${basedir}/${build.dir}/tools"/>
 
-        <echo message="Compiling utilities"/>
+        <ant dir="../../ArjunaCore/tsmx" target="tools" inheritall="false">
+            <property name="install.dir" value="${install.dir}"/>
+        </ant>
 
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"/>
+        <mkdir dir="${basedir}/${src.dir}"/>
+        <compile.macro>
+            <additional.classpath>
+                <fileset dir="${global.ext.lib.dir}" includes="jta-1_1-classes.zip"/>
+                <fileset dir="${install.dir}" includes="${modulename}-tools.jar"/>
+                <fileset dir="${install.dir}" includes="${modulename}-objectstorebrowser.jar"/>
+            </additional.classpath>
+            <additional.src.dirs>
+                <src location="bin"/>
+            </additional.src.dirs>
+        </compile.macro>
+        <delete dir="${basedir}/${src.dir}"/>
 
-        <javac
-            srcdir="${com.arjuna.mwlabs.ts.tsmx.utilities.src}"
-            destdir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
-            debug="${com.arjuna.mwlabs.debug}"
-            deprecation="${com.arjuna.mwlabs.deprecation}">
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${tsmx.classpath}"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <target name="com.arjuna.mw.ts.tsmx.jar" depends="com.arjuna.mwlabs.ts.tsmx.utilities.jar"/>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.jar" depends="com.arjuna.mwlabs.ts.tsmx.utilities.compile">
-
-        <echo message="Building utilities jar file"/>
-
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/plugins"/>
-
-        <property name="objectstorebrowser" value="${com.arjuna.mwlabs.ts.modulename}-objectstorebrowser.jar"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <unzip src="${com.arjuna.arjunacore.tsmx.tools}/${objectstorebrowser}" dest="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-
-        <copy todir="${com.arjuna.mwlabs.ts.tsmx.tmp}" overwrite="true">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar file="${install.dir}/${modulename}-objectstorebrowser.jar" update="true">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/objectstorebrowser/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**/*.class,com/arjuna/ats/tools/objecstorebrowser/stateviewers/viewers/**/*.class"/>
-        </copy>
-        <zip zipfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/${objectstorebrowser}" basedir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
+        </jar>
 
-        <property name="osbv-default" value="plugins/osbv-defaults.jar"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <unzip src="${com.arjuna.arjunacore.tsmx.tools}/${osbv-default}" dest="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-
-        <copy todir="${com.arjuna.mwlabs.ts.tsmx.tmp}" overwrite="true">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
-                includes="com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/**/*.class"
-                excludes="com/arjuna/ats/tools/toolsframework/**"/>
-        </copy>
-        <zip zipfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/${osbv-default}" basedir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
     </target>
 
-    <!-- Installation targets -->
-    <target name="com.arjuna.mw.ts.tsmx.install" depends="com.arjuna.mw.ts.tsmx.compile, com.arjuna.mwlabs.ts.tsmx.utilities.install">
-
-        <echo message="Installing module tsmx"/>
-
-    </target>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.install" depends="com.arjuna.mwlabs.ts.tsmx.utilities.jar">
-
-        <echo message="Installing utilities"/>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/bin/tools"/>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/bin/tools">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}" includes="**/*.jar"/>
-        </copy>
-    </target>
-
-    <!-- Clean targets -->
-    <target name="com.arjuna.mw.ts.tsmx.clean">
-
-        <echo message="Cleaning module"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.destroot}"/>
-
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}"/>
-    </target>
-
-    <!-- Short target names -->
-    <target name="compile" depends="com.arjuna.mw.ts.tsmx.compile"/>
-    <target name="jar" depends="com.arjuna.mw.ts.tsmx.jar"/>
-    <target name="install" depends="com.arjuna.mw.ts.tsmx.install"/>
-    <target name="clean" depends="com.arjuna.mw.ts.tsmx.clean"/>
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTS/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTS/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,9 +1,9 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
-  See the copyright.txt in the distribution for a full listing
-  of individual contributors.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
@@ -15,447 +15,184 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2317 2005-07-12 13:32:04Z nmcl $ -->
-<project name="product" default="com.hp.mw.ts.product.build" basedir=".">
+<project name="module-jbossjts" default="dist" basedir=".">
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
+    <!--
+    old system: from clean, j6, 'ant jts': 69 s
+    new system: from clean, j6: 'ant':  45 s
+    TODO: for each module, add test execution
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="product.properties"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+./ArjunaJTS/jtax/build/reports/TEST-com.hp.mwtests.ts.jta.jts.lastresource.LastResourceAllowedTestCase.txt
+./ArjunaJTS/jtax/build/reports/TEST-com.hp.mwtests.ts.jta.jts.lastresource.LastResourceDisallowTestCase.txt
+./ArjunaJTS/jtax/build/reports/TEST-com.hp.mwtests.ts.jta.jts.subordinate.SubordinateTestCase.txt
 
-        <!-- configure dependencies -->
-        <property name="com.arjuna.buildsystem.dir" location="${buildsystem.dir}"/>
-        <property name="com.arjuna.ext.dir" location="${ext.dir}"/>
-        <property name="com.arjuna.common.dir" location="${common.dir}"/>
-        <property name="com.arjuna.arjunacore.dir" location="${core.dir}"/>
-        <property name="com.arjuna.arjunajta.dir" location="${jta.dir}"/>
+    -->
+    <property name="modulename" value="jbossjts"/>
 
-        <property name="com.arjuna.buildsystem.build.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
+    <import file="../sharedbuild.xml"/>
 
-        <property name="com.arjuna.common.build.lib" location="${com.arjuna.common.dir}/build/lib"/>
-        <property name="com.arjuna.common.build.classes" location="${com.arjuna.common.dir}/build/classes"/>
-        <property name="com.arjuna.arjunacore.build.lib" location="${com.arjuna.arjunacore.dir}/lib"/>
-        <property name="com.arjuna.arjunajta.build.lib" location="${com.arjuna.arjunajta.dir}/lib"/>
+    <property name="component-module-list" value="../common,../ArjunaCore/arjuna,../ArjunaCore/txoj,../ArjunaCore/tsmx,../ArjunaJTA/jta,../ArjunaJTA/jdbc,orbportability,jts,jtax"/>
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.module.name" value="JBossJTS"/>
-	<property name="com.hp.mw.ts.module.name.lowercase" value="jbossjts"/>
+    <target name="dist" depends="dist.compositenode, install.docs, install.scripts, install.services, install.etc, install.jacorb, install.trailmap, install.tools, install.idl">
+        <copy file="INSTALL" todir="${build.dir}/install"/>
+    </target>
 
-	<property name="com.hp.mw.ts.product.htdocs.internal" value="no"/>
-	<property name="com.hp.mw.csf.compile" value="no"/>
+    <target name="clean" depends="sharedbuild.clean">
+        <ant dir="tsmx" inheritall="false" target="clean"/>
+        <ant dir="trailmap" antfile="build_docs.xml" inheritall="false" target="clean"/>
+        <delete>
+            <fileset dir="." includes="**/idl-compiler.*"/>
+        </delete>
+    </target>
 
-	<!-- Set internal property defaults -->
-	<property name="com.hp.mwlabs.ts.product.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.product.htdocs.dest" location="htdocs"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
-    <property name="com.hp.mwlabs.ts.product.services.jar.dest" location="services/lib/"/>
+    <target name="htdocs">
+        <htdocs.composite.macro>
+            <packagesets>
+                <packageset dir="../common/classes" excludes="**/internal/**"/>
 
-	<property name="com.hp.mw.orbportability.orbspecific.jacorb-home" location="jacorb"/>
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.product.init">
-		<!-- Define default build properties -->
-		<tstamp>
-		<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
+                <packageset dir="../ArjunaCore/arjuna/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaCore/txoj/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaCore/tsmx/classes" excludes="**/internal/**"/>
 
-		<property name="com.hp.mw.installationdirectory" location="install"/>
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
+                <packageset dir="../ArjunaJTA/jta/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaJTA/jdbc/classes" excludes="**/internal/**"/>
 
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
+                <packageset dir="../ArjunaJTS/orbportability/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaJTS/jts/classes" excludes="**/internal/**"/>
+                <packageset dir="../ArjunaJTS/jtax/classes" excludes="**/internal/**"/>
+            </packagesets>
+        </htdocs.composite.macro>
+    </target>
 
-		<echo message="Initialising product ${com.hp.mw.ts.product.name}"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
+    <target name="install.docs">
 
-                <path id="com.arjuna.buildsystem.classpath">
-                    <fileset dir="${com.arjuna.buildsystem.build.lib}"/>
-                </path>
-                <property name="com.arjuna.buildsystem.classpath" refid="com.arjuna.buildsystem.classpath"/>
+        <property name="dest.dir" value="docs"/>
 
-		<!-- Tests -->
-                <property name="com.hp.mw.orbportability.tests.compile" value="${com.hp.mw.alltests.build}"/>
-                <property name="com.hp.mw.ts.jts.tests.compile" value="${com.hp.mw.alltests.build}"/>
-                <property name="com.hp.mw.ts.jtax.tests.compile" value="${com.hp.mw.alltests.build}"/>
+        <copy todir="${build.dir}/install/${dest.dir}" overwrite="true">
+            <fileset dir="docs" includes="**/*.pdf"/>
+            <fileset dir="docs" includes="images/*"/>
+            <fileset dir="docs" includes="index.html"/>
+        </copy>
 
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
+        <copy todir="${build.dir}/install/${dest.dir}/user_guide" overwrite="true">
+            <fileset dir="orbportability/docs/programmers_guide" includes="*.pdf"/>
+        </copy>
 
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
+        <copy todir="${build.dir}/install/${dest.dir}/user_guide/transaction_core" overwrite="true">
+            <fileset dir="../ArjunaCore/docs/user_guide" includes="*.pdf" excludes="Admin*"/>
+        </copy>
 
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
+        <copy todir="${build.dir}/install/${dest.dir}/user_guide/jta" overwrite="true">
+            <fileset dir="../ArjunaJTA/docs/user_guide/" includes="*.pdf" excludes="Admin*"/>
+        </copy>
 
-		<!-- Build htdocs for just mw, or mw and mwlabs -->
-		<condition property="com.hp.mwlabs.ts.product.htdocs.list" value="com.arjuna.ats.*,com.arjuna.orbportability.*">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<condition property="com.hp.mwlabs.ts.product.htdocs.exclude" value="">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<condition property="com.hp.mwlabs.ts.product.htdocs.private" value="yes">
-			<equals arg1="${com.hp.mw.ts.product.htdocs.internal}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.ts.product.htdocs.list" value="com.arjuna.ats.arjuna.*,com.arjuna.ats.txoj.*,com.arjuna.orbportability.*,com.arjuna.ats.jts.*,com.arjuna.ats.jta.*,com.arjuna.ats.jtax.*,com.arjuna.ats.jdbc.*,com.arjuna.ats.tsmx.*,com.arjuna.ats.csfx.*"/>
-		<property name="com.hp.mwlabs.ts.product.htdocs.exclude" value="com.arjuna.orbportability.internal.*"/>
-		<property name="com.hp.mwlabs.ts.product.htdocs.private" value="no"/>
+    </target>
 
-		<!-- Define classpath builder task and add this JAR to the classpath -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpathref="com.arjuna.buildsystem.classpath"/>
+    <target name="install.scripts">
+        <ant dir="../ArjunaCore" target="install.scripts" inheritall="false">
+            <property name="scripts.dest.dir" value="${basedir}/${build.dir}/install/bin"/>
+            <property name="product_name" value="${modulename}"/>
+            <property name="home_directory" value="JBOSSTS_HOME"/>
+            <property name="orbprefix" value="with"/>
+            <property name="extra_scripts" value="start-transaction-service.*"/>
+        </ant>
+    </target>
 
-		<!-- Clear build classpath file and add all JARs within lib/ext/ -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" clear="true">
-            <classpath>
-                <fileset dir="${com.arjuna.ext.dir}">
-                    <include name="**.jar"/>
-                    <include name="**.zip"/>
-                </fileset>
-                <fileset dir="${com.arjuna.common.build.lib}" includes="jbossts-common.jar"/>
-                <fileset dir="${com.arjuna.arjunacore.build.lib}" excludes="*-tests.jar"/>
-                <fileset dir="${com.arjuna.arjunajta.build.lib}" excludes="*-tests.jar"/>
-            </classpath>
-        </classpath-builder>
+    <target name="install.services">
 
-	</target>
+        <property name="services.dest.dir" value="${basedir}/${build.dir}/install/services"/>
 
-	<!-- Project targets - must add all module names to each target -->
-	<target name="com.hp.mw.ts.product.build" depends="com.hp.mw.ts.product.compile, com.hp.mw.ts.product.dojar, com.hp.mw.ts.product.htdocs">
+        <ant dir="../ArjunaCore" target="install.services" inheritall="false">
+            <property name="services.dest.dir" value="${services.dest.dir}"/>
+            <property name="product_name" value="${modulename}"/>
+        </ant>
 
-	</target>
+        <copy todir="${services.dest.dir}/bin">
+            <fileset dir="services/bin" includes="**"/>
+        </copy>
 
-	<target name="com.hp.mw.ts.product.compile"
-	depends="com.hp.mwlabs.ts.product.init,
-	com.hp.mwlabs.ts.product.orbportability.compile,
-	com.hp.mwlabs.ts.product.jts.compile,
-	com.hp.mwlabs.ts.product.jtax.compile,
-	com.hp.mwlabs.ts.product.tsmx.compile"/>
+        <copy todir="${services.dest.dir}" filtering="on" overwrite="true">
+            <fileset dir="services" includes="installer/**"/>
+            <filterset>
+                <filter token="HOME_DIRECTORY" value="JBOSSTS_HOME"/>
+            </filterset>
+        </copy>
 
-	<target name="com.hp.mw.ts.product.jar"
-	depends="com.hp.mwlabs.ts.product.init,
-	com.hp.mwlabs.ts.product.orbportability.jar,
-	com.hp.mwlabs.ts.product.jts.jar,
-	com.hp.mwlabs.ts.product.jtax.jar,
-	com.hp.mwlabs.ts.product.tsmx.jar,
-	com.hp.mw.ts.product.tests.dojar,
-	com.hp.mw.ts.product.dojar">
+        <!-- TODO jbossjts-serices.jar -->
 
-	</target>
+        <install.services.files.macro services.dest.dir="${services.dest.dir}" productname="${product_name}" modulename="jts"/>
 
-	<target name="com.hp.mw.ts.product.dojar">
-		<taskdef name="module-to-product" classname="com.hp.mw.buildsystem.ant.ModuleToProduct" classpath="${com.arjuna.buildsystem.classpath}"/>
+    </target>
 
-		<module-to-product destdir="${com.hp.mwlabs.ts.product.jar.dest}" destfile="${com.hp.mw.ts.product.name}">
-			<fileset dir="${com.arjuna.arjunacore.build.lib}" excludes="*-tests.jar"/>
-			<fileset dir="${com.arjuna.arjunajta.build.lib}" excludes="*-tests.jar"/>
-			<fileset dir=".">
-				<include name="orbportability/lib/*.jar"/>
-				<include name="jts/lib/*.jar"/>
-				<include name="jtax/lib/*.jar"/>
-			</fileset>
-		</module-to-product>
+    <target name="install.etc">
 
-		<touch file="built_using_java_${java.specification.version}"/>
-		<jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.product.name.lowercase}.jar" update="true">
-			<fileset dir=".">
-				<filename name="built_using_java_${java.specification.version}"/>
-			</fileset>
-		</jar>
+        <property name="etc.dest.dir" value="${basedir}/${build.dir}/install/etc"/>
 
-        <!-- bundle jbossts-common into the product .jar -->
-        <jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.module.name.lowercase}.jar" update="true">
-			<fileset dir="${com.arjuna.common.build.classes}">
-				<exclude name="build_using*"/>
-			</fileset>
-		</jar>
+        <ant dir="../ArjunaJTA" target="install.etc" inheritall="false">
+            <property name="etc.dest.dir" value="${etc.dest.dir}"/>
+            <property name="jta_depends" value="jts"/>
+            <property name="module1" value="jts"/>
+            <property name="module2" value="arjunacore"/>
+        </ant>
 
-		<!-- TODO: clean ugly hardcoding of orb name -->
-		<jar destfile="${com.hp.mwlabs.ts.product.jar.dest}/${com.hp.mw.ts.product.name.lowercase}-jacorb.jar" update="true">
-			<fileset dir=".">
-				<filename name="built_using_java_${java.specification.version}"/>
-			</fileset>
-		</jar>
-		<delete file="built_using_java_${java.specification.version}"/>
+        <taskdef name="merge-property-files"
+            classname="com.hp.mw.buildsystem.ant.MergePropertyFiles"
+            classpath="../antbuildsystem/build/lib/buildsystem.jar"/>
 
-		<mkdir dir="${com.hp.mwlabs.ts.product.services.jar.dest}"/>
-        <module-to-product destdir="${com.hp.mwlabs.ts.product.services.jar.dest}" destfile="${com.hp.mw.ts.product.name}-services" ignoreorb="true">
-            <fileset dir="${com.arjuna.arjunacore.dir}/services"/>
-            <fileset dir=".">
-                <include name="jts/lib/services/*.jar"/>
-            </fileset>
-        </module-to-product>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/orbportability/etc/default-orbportability-properties.xml"/>
 
-	</target>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/jts/etc/default-jts-properties.xml"/>
 
-	<target name="com.hp.mw.ts.product.tests.dojar">
-		<taskdef name="module-to-product" classname="com.hp.mw.buildsystem.ant.ModuleToProduct"/>
+        <merge-property-files master="${etc.dest.dir}/jbossts-properties.xml"
+            merge="${basedir}/jts/etc/default-RecoveryManager-properties.xml" override="true"/>
 
-		<module-to-product destdir="${com.hp.mwlabs.ts.product.jar.dest}" destfile="${com.hp.mw.ts.product.name}-tests">
-			<fileset dir="${com.arjuna.arjunacore.build.lib" includes="*-tests.jar"/>
-			<fileset dir="${com.arjuna.arjunajta.build.lib" includes="*-tests.jar"/>
-			<fileset dir=".">
-				<include name="orbportability/lib/tests/*.jar"/>
-				<include name="jts/lib/tests/*.jar"/>
-				<include name="jtax/lib/tests/*.jar"/>
-			</fileset>
-		</module-to-product>
-
-	</target>
-
-	<target name="com.hp.mw.ts.product.htdocs"
-				depends="com.hp.mwlabs.ts.product.init"
-        if="com.hp.mwlabs.ts.build.jts">
-		<echo message="Building htdocs "/>
-		<mkdir dir="${com.hp.mwlabs.ts.product.htdocs.dest}"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javadoc
-			sourcepath="${com.hp.mwlabs.ts.product.htdocs.path}"
-			destdir="${com.hp.mwlabs.ts.product.htdocs.dest}"
-			packagenames="${com.hp.mwlabs.ts.product.htdocs.list}"
-			excludepackagenames="${com.hp.mwlabs.ts.product.htdocs.exclude}"
-			private="${com.hp.mwlabs.ts.product.htdocs.private}"
-            		classpath="${build.classpath}"
-		>
-		</javadoc>
-	</target>
-
-    <target name="com.hp.mw.ts.product.install-all"
-            depends="com.hp.mw.ts.product.install,
-            com.hp.mwlabs.ts.product.htdocs.install,
-            com.hp.mwlabs.ts.product.docs.install,
-            com.hp.mwlabs.ts.product.jacorb.install,
-            com.hp.mwlabs.ts.product.trailmap.install"/>
-
-    <target name="com.hp.mwlabs.ts.product.htdocs.install" depends="com.hp.mw.ts.product.htdocs" if="com.hp.mwlabs.ts.build.jts">
-
-            <echo message="Installing htdocs"/>
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/htdocs"/>
-            <copy
-                    todir="${com.hp.mwlabs.installationdirectory}/htdocs"
-            >
-                    <fileset dir="htdocs"/>
-            </copy>
-
     </target>
 
-    <target name="com.hp.mw.ts.product.install"
-        depends="com.hp.mwlabs.ts.product.init,
-            com.hp.mwlabs.ts.product.orbportability.install,
-            com.hp.mwlabs.ts.product.jts.install,
-            com.hp.mwlabs.ts.product.jtax.install,
-            com.hp.mwlabs.ts.product.tsmx.install,
-            com.hp.mw.ts.product.dojar,
-            com.hp.mwlabs.ts.product.services.install,
-            com.hp.mwlabs.ts.product.docs.html.install"
-        if="com.hp.mwlabs.ts.build.jts">
-
-            <echo message="Installation directory : ${com.hp.mwlabs.installationdirectory}"/>
-
-            <mkdir dir="${com.hp.mwlabs.installationdirectory}/lib"/>
-
-			<touch file="${com.hp.mwlabs.installationdirectory}/lib/built_using_java_${java.specification.version}"/>
-
-            <copy todir="${com.hp.mwlabs.installationdirectory}/lib">
-                <fileset dir="${com.hp.mwlabs.ts.product.jar.dest}" excludes="*-tests.jar"/>
-            </copy>
-            <copy todir="${com.hp.mwlabs.installationdirectory}" file="copyright.txt"/>
-            <copy todir="${com.hp.mwlabs.installationdirectory}" file="INSTALL"/>
-    </target>
-
-	<target name="com.hp.mwlabs.ts.product.docs.install">
-		<echo message="Installing ${com.hp.mwlabs.ts.module.name} docs"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/docs/"/>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/docs/">
-            <fileset dir="docs" includes="**/*.pdf"/>
+    <target name="install.jacorb">
+        <copy todir="${build.dir}/install/">
+            <fileset dir="${basedir}" includes="jacorb/**"/>
         </copy>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/docs/user_guide/">
-            <fileset dir="orbportability/docs/programmers_guide" includes="*.pdf"/>
-        </copy>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.docs.html.install">
-		<echo message="Installing html docs"/>
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/docs/images"/>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/docs">
-                    <fileset dir="docs" includes="index.html"/>
-                </copy>
-		<copy todir="${com.hp.mwlabs.installationdirectory}/docs/images"
-			file="docs/images/JBoss_DivOfRH_RGB.gif"/>
-	</target>
-
-    <target name="com.hp.mwlabs.ts.product.services.install">
-
-        <echo>Installing services</echo>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/services"/>
-
-        <copy todir="${com.hp.mwlabs.installationdirectory}/services">
-            <fileset dir="services">
-                <include name="**/**"/>
-                <exclude name="bin/**" />
-                <exclude name="lib/**" />
-            </fileset>
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
-            </filterset>
-        </copy>
-
-        <copy todir="${com.hp.mwlabs.installationdirectory}/services">
-            <fileset dir="services">
-                <include name="bin/**"/>
-                <include name="lib/**"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/services/lib"/>
-
-		<copy overwrite="true"
-                todir="${com.hp.mwlabs.installationdirectory}/services/lib">
-                <fileset dir="${com.hp.mwlabs.ts.product.services.jar.dest}">
-                    <include name="*.jar"/>
-                </fileset>
-        </copy>
-
-	<mkdir dir="${com.hp.mwlabs.installationdirectory}/services/logs/"/>
     </target>
 
-	<target name="com.hp.mwlabs.ts.product.trailmap.install">
-		<echo message="Installing trail map"/>
+    <target name="install.trailmap">
 
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/trail_map"/>
-
 		<!-- build the trail map html pages from xml src -->
-		<ant antfile="build_docs.xml" dir="trailmap"/>
+		<ant dir="trailmap" antfile="build_docs.xml" />
 
-		<copy todir="${com.hp.mwlabs.installationdirectory}/trail_map">
-			<fileset dir="trailmap">
+        <copy todir="${build.dir}/install/trail_map">
+            <fileset dir="trailmap">
 				<include name="build.xml"/>
 				<include name="README.txt"/>
 				<include name="html/**"/>
 				<include name="src/**"/>
-			</fileset>
-		</copy>
-	</target>
+            </fileset>
+        </copy>
+    </target>
 
-	<target name="com.hp.mwlabs.ts.product.jacorb.install">
-		<echo message="Installing JacORB"/>
+    <target name="install.tools">
+        <ant dir="tsmx" target="tools" inheritall="false">
+            <property name="install.dir" value="${basedir}/${build.dir}/install/bin/tools"/>
+        </ant>
+        <move file="${build.dir}/install/bin/tools/tsmx-tools.jar" todir="${build.dir}/install/bin"/>
+    </target>
 
-		<mkdir dir="${com.hp.mwlabs.installationdirectory}/jacorb"/>
+    <target name="install.idl">
+        <mkdir dir="${build.dir}/install/idl"/>
+        <copy todir="${build.dir}/install/idl">
+            <fileset dir="jts/idl/arjuna">
+                <include name="ArjunaOTS.idl"/>
+            </fileset>
+            <fileset dir="jts/idl/omg">
+                <include name="CosTransactions.idl"/>
+                <include name="XA.idl"/>
+            </fileset>
+        </copy>
+    </target>
 
-		<copy todir="${com.hp.mwlabs.installationdirectory}/jacorb">
-			<fileset dir="jacorb"/>
-		</copy>
-	</target>
-
-	<target name="com.hp.mw.ts.product.clean"
-		depends="com.hp.mwlabs.ts.product.orbportability.clean,
-		com.hp.mwlabs.ts.product.jts.clean,
-		com.hp.mwlabs.ts.product.jtax.clean,
-		com.hp.mwlabs.ts.product.tsmx.clean">
-		<delete dir="${com.hp.mwlabs.ts.product.jar.dest}" quiet="true"/>
-		<delete dir="${com.hp.mwlabs.ts.product.htdocs.dest}" quiet="true"/>
-		<delete dir="${com.hp.mwlabs.ts.product.services.jar.dest}" quiet="true"/>
-	</target>
-
-
-	<!-- Module targets -->
-	<target name="com.hp.mwlabs.ts.product.orbportability.compile">
-		<ant dir="orbportability" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jts.compile">
-		<ant dir="jts" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jtax.compile">
-		<ant dir="jtax" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.tsmx.compile">
-		<ant dir="tsmx" target="compile"/>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.orbportability.jar">
-		<ant dir="orbportability" target="com.hp.mw.orbportability.jar" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jts.jar">
-		<ant dir="jts" target="com.hp.mw.ts.jts.jar" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jtax.jar">
-		<ant dir="jtax" target="com.hp.mw.ts.jtax.build" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.tsmx.jar">
-		<ant dir="tsmx" target="jar" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.orbportability.install">
-		<ant dir="orbportability" target="com.hp.mw.orbportability.install" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jts.install">
-		<ant dir="jts" target="com.hp.mw.ts.jts.install" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jtax.install">
-		<ant dir="jtax" target="com.hp.mw.ts.jtax.install"/>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.tsmx.install">
-		<ant dir="tsmx" target="install"/>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.orbportability.clean">
-		<ant dir="orbportability" target="com.hp.mw.orbportability.clean" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jts.clean">
-		<ant dir="jts" target="com.hp.mw.ts.jts.clean" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.jtax.clean">
-		<ant dir="jtax" target="com.hp.mw.ts.jtax.clean" />
-	</target>
-
-	<target name="com.hp.mwlabs.ts.product.tsmx.clean">
-		<ant dir="tsmx" target="clean" />
-	</target>
-
-	<!-- Short target names -->
-	<target name="build" depends="com.hp.mw.ts.product.build"/>
-
-	<target name="clean" depends="com.hp.mw.ts.product.clean"/>
-
-	<target name="jar" depends="com.hp.mw.ts.product.jar"/>
-
-	<target name="htdocs" depends="com.hp.mw.ts.product.htdocs"/>
-
-	<target name="install" depends="com.hp.mw.ts.product.install"/>
-
-	<target name="install-all" depends="com.hp.mw.ts.product.install-all"/>
-
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,9 +1,9 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
-  See the copyright.txt in the distribution for a full listing
-  of individual contributors.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
@@ -15,331 +15,75 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2342 2006-03-30 13:06:17Z  $-->
+<project name="module-jtax" default="dist.leafnode" basedir=".">
 
-<project name="module-jtax" default="com.hp.mw.ts.jtax.build" basedir=".">
+    <property name="modulename" value="jtax"/>
 
-    <property name="orbport.classpath"
-    value="../../orbportability/lib/ext/orbportability-ant.jar"/>
+    <property name="global.ext.libs" value="jta-1_1-classes.zip,connector-api.jar"/>
+    <property name="global.ext.test.libs" value="junit.jar,TestingFramework.jar"/>
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+    <import file="../sharedbuild.xml"/>
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="jtax"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-jtax.properties"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
+        <import-module.macro module="jta"/>
+        <import-module.macro module="jta_tests"/>
+        <import-module.macro module="orbportability"/>
+        <import-module.macro module="jts"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    </target>
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.jtax.tests.compile" value="yes"/>
-	<property name="com.hp.mw.ts.jtax.tests.install" value="no"/>
+    <target name="compile-tests-idl" depends="taskdefs">
 
-	<!-- Set internal property defaults -->
-		<!-- Path names -->
-	<property name="com.hp.mwlabs.ts.jtax.src" value="classes"/>
-	<property name="com.hp.mwlabs.ts.jtax.buildroot"
-		value="build"/>
-	<property name="com.hp.mwlabs.ts.jtax.builddir" location="${com.hp.mwlabs.ts.jtax.buildroot}/classes/"/>
-	<property name="com.hp.mwlabs.ts.jtax.dest" value="${com.hp.mwlabs.ts.jtax.buildroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.jtax.tests.dir" location="tests"/>
-	<property name="com.hp.mwlabs.ts.jtax.tests.src" location="${com.hp.mwlabs.ts.jtax.tests.dir}/classes"/>
-    <property name="com.hp.mwlabs.ts.jtax.tests.idl" location="${com.hp.mwlabs.ts.jtax.tests.dir}/idl"/>
-	<property name="com.hp.mwlabs.ts.jtax.tests.dest" value="${com.hp.mwlabs.ts.jtax.buildroot}/tests"/>
-	<property name="com.hp.mwlabs.ts.jtax.reports.dest" value="${com.hp.mwlabs.ts.jtax.buildroot}/reports"/>
-	<property name="com.hp.mwlabs.ts.jtax.jar.dest" value="lib"/>
-	<property name="com.hp.mwlabs.ts.jtax.tests.destdir" value="${com.hp.mwlabs.ts.jtax.jar.dest}/tests/"/>
-
-		<!-- Files that need word substitutions -->
-
-    <property name="com.hp.mwlabs.ts.jacorb.lib" location="../jacorb/lib"/>
-    <path id="com.hp.mwlabs.ts.jacorb.classpath">
-        <fileset dir="${com.hp.mwlabs.ts.jacorb.lib}" includes="*.jar"/>
-    </path>
-
-        <property name="com.hp.mwlabs.ts.jtax.resourcebundle"
-	value="jtax_msg_en_US.properties"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.jtax.init">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<tstamp>
-	    	<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
-
-		<!-- Define classpath builder task -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Initialising module jtax"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Check which bits to compile and/or install -->
-		<condition property="com.hp.mwlabs.ts.jtax.tests.compile">
-			<equals arg1="${com.hp.mw.ts.jtax.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jtax.tests.install">
-			<equals arg1="${com.hp.mw.ts.jtax.tests.install}" arg2="yes"/>
-		</condition>
-
-		<!-- Set the module property file details -->
-<!-- XXX: No property file in jtax
-		<property name="com.hp.mwlabs.ts.jtax.propertyfile" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-
-		<property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property file name : ${com.hp.mwlabs.ts.jtax.propertyfile}"/>
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
--->
-
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.ts.jtax.dest}"/>
-
-	</target>
-
-        <!-- Default build target -->
-        <target name="com.hp.mw.ts.jtax.build" depends="com.hp.mwlabs.jtax.generateresourcebundle,com.hp.mw.ts.jtax.jar, com.hp.mwlabs.ts.jtax.tests.jar"/>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.ts.jtax.compile"
-	depends="com.hp.mwlabs.ts.jtax.compile,com.hp.mwlabs.jtax.generateresourcebundle">
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jtax.compile" depends="com.hp.mwlabs.ts.jtax.init">
-
-	   	<!-- Make ANT aware of user-defined task -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="orbport.classpath"/>
-		<taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="${orbport.classpath}"/>
-		<taskdef name="idl-build-list-element" classname="com.arjuna.orbportability.common.ant.IDLBuildListElement" classpath="${orbport.classpath}"/>
-
-		<property name="com.hp.mw.ts.jtax.build-dir" location="."/>
-
-		<idl-build-list inproperty="com.hp.mw.orbportability.orbspecific.buildlist">
-        		</idl-build-list>
-
-		<ant antfile="../orbportability/orbspecific.xml">
-			<property name="com.hp.mw.orbportability.orbspecific.modulename" value="jta"/>
-			<property name="com.hp.mw.orbportability.orbspecific.srcdir" location="classes"/>
-		</ant>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<echo message="Compiling module"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<property name="com.hp.mwlabs.ts.jtax.compile.excludes"
-		    value="**/orbspecific/**/*.java"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jtax.src}"
-			destdir="${com.hp.mwlabs.ts.jtax.dest}"
-			excludes="${com.hp.mwlabs.ts.jtax.compile.excludes}"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jtax.src}"/>
-			</classpath>
-		</javac>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jtax.tests.run" depends="com.hp.mwlabs.ts.jtax.tests.compile" if="com.hp.mwlabs.ts.jtax.tests.compile">
-	    <mkdir dir="${com.hp.mwlabs.ts.jtax.reports.dest}"/>
-
-	    <junit printsummary="yes">
-	        <formatter type="plain"/>
-	        <classpath>
-	            <pathelement location="${com.hp.mwlabs.ts.jtax.tests.dest}"/>
-	            <path location="${com.hp.mwlabs.ts.jtax.dest}"/>
-	            <path refid="com.hp.mwlabs.ts.jacorb.classpath"/>
-	            <pathelement path="${build.classpath}"/>
-                <pathelement location="../../ArjunaJTA/jta/build/tests"/>
-	        </classpath>
-	        <batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-                    todir="${com.hp.mwlabs.ts.jtax.reports.dest}">
-                    <fileset dir="${com.hp.mwlabs.ts.jtax.tests.src}">
-                        <include  name="**/LastResource*TestCase.java"/>
-                        <include  name="**/SubordinateTestCase.java"/>
-                    </fileset>
-	        </batchtest>
-	    </junit>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jtax.tests.jar" depends="com.hp.mwlabs.ts.jtax.tests.run" if="com.hp.mwlabs.ts.jtax.tests.compile">
-
-		<mkdir dir="${com.hp.mwlabs.ts.jtax.tests.destdir}"/>
-		<jar	basedir="${com.hp.mwlabs.ts.jtax.tests.dest}"
-			jarfile="${com.hp.mwlabs.ts.jtax.tests.destdir}/${com.hp.mwlabs.ts.modulename}_tests.jar"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jtax.tests.compile" depends="com.hp.mw.ts.jtax.jar" if="com.hp.mwlabs.ts.jtax.tests.compile">
-
-		<echo message="Compiling tests"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.jtax.tests.dest}"/>
-
-        <idl-build-list inproperty="com.hp.mw.orbportability.orbspecific.buildlist">
-
-            <element 	src="${com.hp.mwlabs.ts.jtax.tests.idl}/test.idl"
-                        package="Example" mappings="CosTransactions=org.omg;TestModule=com.hp.mwtests.ts.jts;CORBA=org.omg"/>
-
+        <idl-build-list inproperty="idl.buildlist">
+            <element src="${basedir}/${tests.dir}/idl/test.idl" package="Example"
+                     mappings="CosTransactions=org.omg;TestModule=com.hp.mwtests.ts.jts;CORBA=org.omg"/>
         </idl-build-list>
 
-        <ant antfile="../orbportability/orbspecific.xml">
-            <property name="com.hp.mw.orbportability.orbspecific.modulename" value="jtax_tests"/>
-            <property name="com.hp.mw.orbportability.orbspecific.lib" value="${com.hp.mwlabs.ts.jtax.tests.destdir}"/>
-            <property name="com.hp.mw.orbportability.orbspecific.srcdir" value="${com.hp.mwlabs.ts.jtax.tests.src}"/>
-        </ant>
+        <idl-compiler orb="JacORB"
+                      buildlist="${idl.buildlist}"
+                      destdir="${basedir}/${build.dir}/tests/generatedclasses"
+                      parameters="include='idl/omg/;idl/arjuna;${jacorb.home}/idl/omg',classpath='${jacorb.classpath}'"/>
+    </target>
 
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
+    </target>
 
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jtax.tests.src}"
-			destdir="${com.hp.mwlabs.ts.jtax.tests.dest}"
-            debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}">
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.hp.mwlabs.ts.jtax.dest}"/>
-                <pathelement location="../../ArjunaJTA/jta/build/tests"/>
-            </classpath>
-		</javac>
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+			<entry key="JTAX_VERSION" value="unknown"/>
+        </propertyfile>
+    </target>
 
-	</target>
+    <target name="run.tests">
+        <run.tests.macro>
+            <additional.classpath>
+                <path refid="jacorb.classpath"/>
+            </additional.classpath>
+            <tests><fileset dir="tests/classes" includes="**/SubordinateTestCase.java"/></tests>
+        </run.tests.macro>
+        <run.tests.macro>
+            <additional.classpath>
+                <path refid="jacorb.classpath"/>
+            </additional.classpath>
+            <tests><fileset dir="tests/classes" includes="**/LastResourceDisallowTestCase.java"/></tests>
+        </run.tests.macro>
+        <run.tests.macro>
+            <additional.classpath>
+                <path refid="jacorb.classpath"/>
+            </additional.classpath>
+            <tests><fileset dir="tests/classes" includes="**/LastResourceAllowedTestCase.java"/></tests>
+        </run.tests.macro>
+    </target>
 
-	<!-- Jar targets -->
-	<target name="com.hp.mw.ts.jtax.jar" depends="com.hp.mw.ts.jtax.compile">
-
-		<echo message="Building jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.jtax.jar.dest}"/>
-		<jar
-			jarfile="${com.hp.mwlabs.ts.jtax.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"
-			basedir="${com.hp.mwlabs.ts.jtax.dest}"
-		/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-            <classpath>
-                <pathelement location="${com.hp.mwlabs.ts.jtax.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"/>
-            </classpath>
-        </classpath-builder>
-
-	</target>
-
-	<!-- Installation targets -->
-	<target name="com.hp.mw.ts.jtax.install" depends="com.hp.mw.ts.jtax.build, com.hp.mwlabs.ts.jtax.tests.install">
-
-		<echo message="Installing module jtax"/>
-		<echo message="Installation directory ${com.hp.mwlabs.installationdirectory}"/>
-<!-- XXX: No property file in jtax
-		<mkdir dir="${com.hp.mw.propertydirectory}"/>
-		<copy
-			file="etc/default-${com.hp.mwlabs.ts.jtax.propertyfile}"
-			tofile="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.jtax.propertyfile}"
-		>
-		</copy>
--->
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jtax.tests.install" depends="com.hp.mwlabs.ts.jtax.tests.compile" if="com.hp.mwlabs.ts.jtax.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.ts.jtax.clean" depends="com.hp.mwlabs.ts.jtax.tests.clean">
-
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.ts.jtax.buildroot}"/>
-		<delete dir="${com.hp.mwlabs.ts.jtax.destroot}"/>
-		<delete dir="${com.hp.mwlabs.ts.jtax.jar.dest}"/>
-		<delete dir="${com.hp.mwlabs.ts.jtax.tests.dest}"/>
-		<delete file="${com.hp.mwlabs.ts.jtax.info.dest}"/>
-		<delete file="${com.hp.mwlabs.ts.jtax.properties.dest}"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jtax.tests.clean">
-
-		<echo message="Cleaning tests"/>
-
-	</target>
-
-	<!-- Short target names -->
-
-	<target name="jar" depends="com.hp.mw.ts.jtax.jar">
-
-	</target>
-
-	<target name="install" depends="com.hp.mw.ts.jtax.install">
-
-	</target>
-
-	<target name="clean" depends="com.hp.mw.ts.jtax.clean">
-
-	</target>
-
-        <target name="com.hp.mwlabs.jtax.generateresourcebundle">
-
-            <echo message="Generating JTAX Resource Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.ts.jtax.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.ts.jtax.builddir}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.ts.jtax.resourcebundle}"/>
-                    <param name="-appendkey" value="[]"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-</project>
-
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,9 +1,9 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
-  See the copyright.txt in the distribution for a full listing
-  of individual contributors.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
@@ -15,462 +15,85 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2342 2006-03-30 13:06:17Z  $-->
+<project name="module-jts" default="dist.leafnode" basedir=".">
 
-<project name="module-jts" default="com.hp.mw.ts.jts.build" basedir=".">
+    <property name="modulename" value="jts"/>
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
-	<property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+    <property name="global.ext.test.libs" value="junit.jar,TestingFramework.jar"/>
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="jts"/>
+    <import file="../sharedbuild.xml"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-jts.properties"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
+        <import-module.macro module="txoj"/>
+        <import-module.macro module="orbportability"/>
 
-	<!-- Set external property defaults -->
-	<property name="com.hp.mw.ts.jts.tests.compile" value="yes"/>
-	<property name="com.hp.mw.ts.jts.tests.install" value="no"/>
-    <property name="com.hp.mw.ts.jts.services.install" value="yes"/>
-
-	<!-- Set internal property defaults -->
-		<!-- Path names -->
-	<property name="com.hp.mwlabs.ts.jts.src" location="classes"/>
-	<property name="com.hp.mwlabs.ts.jts.etc" location="etc"/>
-	<property name="com.hp.mwlabs.ts.jts.buildroot"
-		location="build"/>
-	<property name="com.hp.mwlabs.ts.jts.builddir" location="${com.hp.mwlabs.ts.jts.buildroot}/classes/"/>
-	<property name="com.hp.mwlabs.ts.jts.dest" location="${com.hp.mwlabs.ts.jts.buildroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.jts.tests.src" location="tests"/>
-	<property name="com.hp.mwlabs.ts.jts.tests.dest" location="${com.hp.mwlabs.ts.jts.buildroot}/tests"/>
-	<property name="com.hp.mwlabs.ts.jts.jar.dest" location="lib"/>
-	<property name="com.hp.mwlabs.ts.jts.tests.destdir" location="${com.hp.mwlabs.ts.jts.jar.dest}/tests/"/>
-    <property name="com.hp.mwlabs.ts.jts.services.src" location="services/classes"/>
-    <property name="com.hp.mwlabs.ts.jts.services.config" location="services/config"/>
-    <property name="com.hp.mwlabs.ts.jts.services.scripts" location="services/scripts"/>
-    <property name="com.hp.mwlabs.ts.jts.services.dest" value="${com.hp.mwlabs.ts.jts.buildroot}/services/"/>
-    <property name="com.hp.mwlabs.ts.jts.services.destdir" value="${com.hp.mwlabs.ts.jts.jar.dest}/services/"/>
-
-        <property name="com.hp.mwlabs.ts.jts.resourcebundle"
-	value="jts_msg_en_US.properties"/>
-
-    <property name="com.hp.mwlabs.ts.jts.propertyfile.src" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-    <property name="com.hp.mwlabs.ts.jts.recoverymanagerpropertyfile.src" value="RecoveryManager-properties.xml"/>
-
-	<property name="com.hp.mwlabs.ts.jts.mappingfile" value="${com.hp.mwlabs.ts.modulename}-properties.mappings"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.ts.jts.init" depends="com.hp.mwlabs.ts.jts.setpropertyfiles">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
-
-		<tstamp>
-	    	<format property="com.hp.mw.ts.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
-
-		<!-- Define classpath builder task -->
-		<taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Initialising module jts"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<!-- Check which bits to compile and/or install -->
-		<condition property="com.hp.mwlabs.ts.jts.tests.compile">
-			<equals arg1="${com.hp.mw.ts.jts.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.ts.jts.tests.install">
-			<equals arg1="${com.hp.mw.ts.jts.tests.install}" arg2="yes"/>
-		</condition>
-
-        <condition property="com.hp.mwlabs.ts.jts.services.install">
-            <equals arg1="${com.hp.mw.ts.jts.services.install}" arg2="yes"/>
-        </condition>
-
-		<!-- Set the module property file details -->
-		<property name="com.hp.mwlabs.ts.jts.propertyfile" value="${com.hp.mwlabs.ts.modulename}-properties.xml"/>
-                <property name="com.hp.mwlabs.ts.jts.recoverymanager.propertyfile" value="RecoveryManager-properties.xml"/>
-
-		<property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property file name : ${com.hp.mwlabs.ts.jts.propertyfile}"/>
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
-
-		<property name="com.hp.mw.idldirectory" location="${com.hp.mwlabs.installationdirectory}/idl"/>
-		<echo message="IDL directory : ${com.hp.mw.idldirectory}"/>
-
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.ts.jts.dest}"/>
-
-	</target>
-
-    <!-- If this build is part of a product build set the property files to the product property file -->
-    <target name="com.hp.mwlabs.ts.jts.setpropertyfiles" if="com.hp.mw.ts.product.name">
-
-            <echo>Overriding propertyfile settings with product propertyfile settings</echo>
-            <property name="com.hp.mwlabs.ts.jts.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-            <property name="com.hp.mwlabs.ts.jts.recoverymanager.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-
     </target>
 
-    <!-- Default build target -->
-    <target name="com.hp.mw.ts.jts.build"
-    depends="com.hp.mwlabs.jts.generateresourcebundle,com.hp.mw.ts.jts.jar, com.hp.mwlabs.ts.jts.services.jar, com.hp.mwlabs.ts.jts.tests.jar"/>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.ts.jts.compile" depends="com.hp.mwlabs.ts.jts.idl.compile,com.hp.mwlabs.ts.jts.compile,com.hp.mwlabs.jts.generateresourcebundle">
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jts.idl.compile"
-	depends="com.hp.mwlabs.ts.jts.init">
-
-        	<!-- Make ANT aware of user-defined task -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="orbport.classpath"/>
-	        <taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="${orbport.classpath}"/>
-		<taskdef name="idl-build-list-element" classname="com.arjuna.orbportability.common.ant.IDLBuildListElement" classpath="${orbport.classpath}"/>
-
-		<property name="com.hp.mwlabs.ts.jts.build-dir" location="."/>
-		<property name="com.hp.mw.orbportability.orbspecific.include"
-		    value="${com.hp.mwlabs.ts.jts.build-dir}/idl/omg;${com.hp.mwlabs.ts.jts.build-dir}/idl/arjuna"/>
-		<idl-build-list inproperty="com.hp.mw.orbportability.orbspecific.buildlist">
-			<element src="${com.hp.mwlabs.ts.jts.build-dir}/idl/omg/CosTransactions.idl"
-			    	 package="org.omg"
-		    		 mappings="CosTransactions=org.omg"/>
-			<element src="${com.hp.mwlabs.ts.jts.build-dir}/idl/arjuna/ArjunaOTS.idl"
-					 package="com.arjuna"
-					 mappings="CosTransactions=org.omg;ArjunaOTS=com.arjuna;CORBA=org.omg"/>
-			<element src="${com.hp.mwlabs.ts.jts.build-dir}/idl/omg/XA.idl"
-			    	 package="org.omg"
-		    		 mappings="XA=org.omg"/>
-		</idl-build-list>
-
-		<ant antfile="../orbportability/orbspecific.xml">
-			<property name="com.hp.mw.orbportability.orbspecific.modulename" value="jts"/>
-			<property name="com.hp.mw.orbportability.orbspecific.srcdir" location="classes"/>
-		</ant>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jts.compile" depends="com.hp.mwlabs.ts.jts.init">
-
-		<echo message="Compiling module"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<property name="com.hp.mwlabs.ts.jts.compile.excludes"
-		    value="**/orbspecific/**/*.java"/>
-
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jts.src}"
-			destdir="${com.hp.mwlabs.ts.jts.dest}"
-			excludes="${com.hp.mwlabs.ts.jts.compile.excludes}"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-			<classpath>
-				<path path="${build.classpath}"/>
-				<path path="${com.hp.mwlabs.ts.jts.src}"/>
-			</classpath>
-		</javac>
-
-        <!-- Process the properties -->
-    	<property name="property.file" value="jts.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.ts.jts.dest}/${property.file}">
-			<entry key="MODULE" value="${com.hp.mwlabs.ts.modulename}"/>
-			<entry key="SOURCEID" value="${com.hp.mw.sourceid}"/>
-			<entry key="BUILDINFO" value="${com.hp.mw.builder}"/>
-			<entry key="VERSION" value="${com.hp.mw.version}"/>
-			<entry key="DATE" value="${com.hp.mw.date}"/>
-			<entry key="NOTES" value="${com.hp.mw.notes}"/>
-			<entry key="JTS_VERSION" value="${com.hp.mw.ts.version}"/>
-			<entry key="PROPERTIES_FILE" value="${com.hp.mwlabs.ts.jts.propertyfile}"/>
-		</propertyfile>
-	</target>
-
-    <target name="com.hp.mwlabs.ts.jts.services.install" depends="com.hp.mwlabs.ts.jts.services.jar" if="com.hp.mwlabs.ts.jts.services.install">
-
-        <echo message="Installing services"/>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/config"/>
-
-        <copy todir="${com.hp.mw.installationdirectory}/services/config" filtering="on" overwrite="yes">
-            <fileset dir="${com.hp.mwlabs.ts.jts.services.config}">
-                <include name="*.conf"/>
-                <include name="*.properties"/>
-                <include name="*.xml"/>
-            </fileset>
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-            </filterset>
-        </copy>
-
-        <!-- Create copy of unix scripts for each *NIX platform -->
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/hpux"/>
-
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/hpux/">
-            <fileset dir="${com.hp.mwlabs.ts.jts.services.scripts}/unix">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/solaris"/>
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/solaris/">
-            <fileset dir="${com.hp.mwlabs.ts.jts.services.scripts}/unix">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/linux"/>
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/linux/">
-            <fileset dir="${com.hp.mwlabs.ts.jts.services.scripts}/unix">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-        <mkdir dir="${com.hp.mw.installationdirectory}/services/bin/windows"/>
-        <copy todir="${com.hp.mw.installationdirectory}/services/bin/windows/">
-            <fileset dir="${com.hp.mwlabs.ts.jts.services.scripts}/windows">
-                <include name="**/*.*"/>
-            </fileset>
-        </copy>
-
-    </target>
-
-    <target name="com.hp.mwlabs.ts.jts.services.jar" depends="com.hp.mwlabs.ts.jts.services.compile" if="com.hp.mwlabs.ts.jts.services.install">
-
-        <mkdir dir="${com.hp.mwlabs.ts.jts.services.destdir}"/>
-		<jar    basedir="${com.hp.mwlabs.ts.jts.services.dest}"
-                jarfile="${com.hp.mwlabs.ts.jts.services.destdir}/${com.hp.mwlabs.ts.modulename}_services.jar"/>
-
-    </target>
-
-    <target name="com.hp.mwlabs.ts.jts.services.compile" if="com.hp.mwlabs.ts.jts.services.install">
-
-        <echo message="Compiling services"/>
-
-        <mkdir dir="${com.hp.mwlabs.ts.jts.services.dest}"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-        <javac
-            srcdir="${com.hp.mwlabs.ts.jts.services.src}"
-            destdir="${com.hp.mwlabs.ts.jts.services.dest}"
-            debug="${com.hp.mwlabs.debug}"
-            deprecation="${com.hp.mwlabs.deprecation}"
-        >
+    <target name="compile" depends="sharedbuild-jts.compile">
+        <!-- TODO fix me - how to chain macros? or just pass additional.src.dirs -->
+        <javac srcdir="services/classes" destdir="${build.dir}/classes" debug="${debug}"
+               deprecation="${deprecation}" excludes="${excluded.classes}">
             <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.hp.mwlabs.ts.jts.dest}"/>
+                <fileset dir="${build.dir}/lib/ext/" includes="*"/>
+                <fileset dir="." includes="${lib.dir}/ext/*"/>
+                <fileset dir="${global.ext.lib.dir}" includes="${global.ext.libs}"/>
+                <path  refid="jacorb.classpath"/>
             </classpath>
         </javac>
 
+        <delete file="${build.dir}/lib/${modulename}.jar"/>
+        <jar jarfile="${build.dir}/lib/${modulename}.jar"
+             basedir="${build.dir}/classes"/>
     </target>
 
-	<target name="com.hp.mwlabs.ts.jts.tests.jar" depends="com.hp.mwlabs.ts.jts.tests.compile" if="com.hp.mwlabs.ts.jts.tests.compile">
+    <target name="compile-idl" depends="sharedbuild-jts.compile-tests-idl">
 
-		<mkdir dir="${com.hp.mwlabs.ts.jts.tests.destdir}"/>
-		<jar	basedir="${com.hp.mwlabs.ts.jts.tests.dest}"
-			jarfile="${com.hp.mwlabs.ts.jts.tests.destdir}/${com.hp.mwlabs.ts.modulename}_tests.jar"/>
+        <idl-build-list inproperty="idl.buildlist">
+            <element src="${basedir}/idl/omg/CosTransactions.idl" package="org.omg"
+                     mappings="CosTransactions=org.omg"/>
+            <element src="${basedir}/idl/arjuna/ArjunaOTS.idl" package="com.arjuna"
+                     mappings="CosTransactions=org.omg;ArjunaOTS=com.arjuna;CORBA=org.omg"/>
+            <element src="${basedir}/idl/omg/XA.idl" package="org.omg"
+                     mappings="XA=org.omg"/>
+        </idl-build-list>
 
-	</target>
+        <idl-compiler orb="JacORB"
+                      buildlist="${idl.buildlist}" verbose="true"
+                      destdir="${basedir}/${build.dir}/generatedclasses"
+                      parameters="include='${basedir}/idl/omg/;${basedir}/idl/arjuna;${jacorb.home}/idl/omg',classpath='${jacorb.classpath}'"/>
+    </target>
 
-	<target name="com.hp.mwlabs.ts.jts.tests.compile" depends="com.hp.mw.ts.jts.jar" if="com.hp.mwlabs.ts.jts.tests.compile">
+    <target name="compile-tests-idl" depends="sharedbuild-jts.compile-tests-idl">
 
-		<echo message="Compiling tests"/>
-
-		<mkdir dir="${com.hp.mwlabs.ts.jts.tests.dest}"/>
-
-        	<!-- Make ANT aware of user-defined task -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="orbport.classpath"/>
-	        <taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="${orbport.classpath}"/>
-		<taskdef name="idl-build-list-element" classname="com.arjuna.orbportability.common.ant.IDLBuildListElement" classpath="${orbport.classpath}"/>
-
-		<property name="com.hp.mwlabs.ts.jts.build-dir" location="."/>
-		<property name="com.hp.mwlabs.ts.jts.tests-dir" location="tests"/>
-		<property name="com.hp.mw.orbportability.orbspecific.include"
-		    location="${com.hp.mwlabs.ts.jts.build-dir}/idl/omg"/>
-
-		<idl-build-list inproperty="com.hp.mw.orbportability.orbspecific.buildlist">
-			<element 	src="${com.hp.mwlabs.ts.jts.tests-dir}/idl/TestModule.idl"
-						package="com.hp.mwtests.ts.jts" mappings="CosTransactions=org.omg;TestModule=com.hp.mwtests.ts.jts;CORBA=org.omg"/>
-
+        <idl-build-list inproperty="idl.buildlist">
+            <element src="${basedir}/${tests.dir}/idl/TestModule.idl" package="com.hp.mwtests.ts.jts"
+                     mappings="CosTransactions=org.omg;TestModule=com.hp.mwtests.ts.jts;CORBA=org.omg"/>
         </idl-build-list>
 
-        <ant antfile="../orbportability/orbspecific.xml">
-            <property name="com.hp.mw.orbportability.orbspecific.modulename" value="jts_tests"/>
-            <property name="com.hp.mw.orbportability.orbspecific.lib" value="${com.hp.mwlabs.ts.jts.tests.destdir}"/>
-            <property name="com.hp.mw.orbportability.orbspecific.srcdir" value="${com.hp.mwlabs.ts.jts.tests-dir}/classes"/>
-        </ant>
+        <idl-compiler orb="JacORB"
+                      buildlist="${idl.buildlist}"
+                      destdir="${basedir}/${build.dir}/tests/generatedclasses"
+                      parameters="include='${basedir}/idl/omg/;${basedir}/idl/arjuna;${jacorb.home}/idl/omg',classpath='${jacorb.classpath}'"/>
+    </target>
 
-                <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
+    </target>
 
-		<javac
-			srcdir="${com.hp.mwlabs.ts.jts.tests.src}"
-			destdir="${com.hp.mwlabs.ts.jts.tests.dest}"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-                    <classpath>
-                        <path path="${build.classpath}"/>
-                        <path path="${com.hp.mwlabs.ts.jts.tests.src}/classes"/>
-                    </classpath>
-		</javac>
-
-	</target>
-
-	<!-- Jar targets -->
-	<target name="com.hp.mw.ts.jts.jar" depends="com.hp.mw.ts.jts.compile">
-
-		<echo message="Building jar file"/>
-		<mkdir dir="${com.hp.mwlabs.ts.jts.jar.dest}"/>
-
-        <copy file="etc/${com.hp.mwlabs.ts.jts.mappingfile}"
-                tofile="${com.hp.mwlabs.ts.jts.dest}/${com.hp.mwlabs.ts.jts.mappingfile}"/>
-
-		<jar
-			jarfile="${com.hp.mwlabs.ts.jts.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"
-			basedir="${com.hp.mwlabs.ts.jts.dest}"
-		/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-            <classpath>
-                <pathelement location="${com.hp.mwlabs.ts.jts.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar"/>
-            </classpath>
-        </classpath-builder>
-
-	</target>
-
-	<!-- Installation targets -->
-    <target name="com.hp.mw.ts.jts.install" depends="com.hp.mw.ts.jts.build, com.hp.mwlabs.ts.jts.tests.install, com.hp.mwlabs.ts.jts.services.install">
-
-            <echo message="Installing module jts"/>
-            <echo message="Installation directory ${com.hp.mwlabs.installationdirectory}"/>
-            <mkdir dir="${com.hp.mw.propertydirectory}"/>
-
-            <taskdef name="merge-property-files"
-                         classname="com.hp.mw.buildsystem.ant.MergePropertyFiles" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-            <echo>Merging propertyfiles into main product property file</echo>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.jts.propertyfile}"
-                                      merge="${com.hp.mwlabs.ts.jts.etc}/default-${com.hp.mwlabs.ts.jts.propertyfile.src}"/>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.ts.jts.recoverymanager.propertyfile}"
-                                      merge="${com.hp.mwlabs.ts.jts.etc}/default-${com.hp.mwlabs.ts.jts.recoverymanagerpropertyfile.src}"
-                                                      override="true"/>
-
-            <mkdir dir="${com.hp.mw.idldirectory}"/>
-            <copy
-                    todir="${com.hp.mw.idldirectory}"
-                    >
-                    <fileset dir="idl/arjuna">
-                            <include name="ArjunaOTS.idl"/>
-                    </fileset>
-                    <fileset dir="idl/omg">
-                            <include name="CosTransactions.idl"/>
-                    </fileset>
-                    <fileset dir="idl/omg">
-                            <include name="XA.idl"/>
-                    </fileset>
-            </copy>
-
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+			<entry key="JTS_VERSION" value="unknown"/>
+        </propertyfile>
     </target>
 
-	<target name="com.hp.mwlabs.ts.jts.tests.install" depends="com.hp.mwlabs.ts.jts.tests.compile" if="com.hp.mwlabs.ts.jts.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.ts.jts.clean" depends="com.hp.mwlabs.ts.jts.tests.clean">
-
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.ts.jts.dest}"/>
-		<delete dir="${com.hp.mwlabs.ts.jts.jar.dest}"/>
-	</target>
-
-	<target name="com.hp.mwlabs.ts.jts.tests.clean">
-
-		<echo message="Cleaning tests"/>
-		<delete dir="${com.hp.mwlabs.ts.jts.tests.dest}"/>
-
-	</target>
-
-	<!-- Short target names -->
-	<target name="compile" depends="com.hp.mwlabs.ts.jts.idl.compile, com.hp.mw.ts.jts.compile">
-
-	</target>
-
-	<target name="jar" depends="com.hp.mw.ts.jts.jar">
-
-	</target>
-
-	<target name="install" depends="com.hp.mw.ts.jts.install">
-
-	</target>
-
-	<target name="clean" depends="com.hp.mw.ts.jts.clean">
-
-	</target>
-
-        <target name="com.hp.mwlabs.jts.generateresourcebundle">
-
-            <echo message="Generating JTS Resource Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.ts.jts.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.ts.jts.builddir}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.ts.jts.resourcebundle}"/>
-                    <param name="-appendkey" value="[]"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-</project>
-
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTS/orbportability/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/orbportability/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTS/orbportability/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,9 +1,9 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
-  as indicated by the @author tags. 
-  See the copyright.txt in the distribution for a full listing 
-  of individual contributors.
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
@@ -15,308 +15,69 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--
-  ORB Portability
+<project name="module-orbportability" default="dist.leafnode" basedir=".">
 
-  Copyright (C) 1998, 1999, 2000, 2001, 2002
+    <property name="modulename" value="orbportability"/>
 
-  Arjuna Solutions Limited,
-  Newcastle upon Tyne,
-  Tyne and Wear,
-  UK.
+    <property name="global.ext.test.libs" value="TestingFramework.jar"/>
 
-  $Id: build.xml 2342 2006-03-30 13:06:17Z  $
-  -->
-<project name="module-orbportability" default="com.hp.mw.orbportability.build" basedir=".">
+    <import file="../sharedbuild.xml"/>
 
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
+    <target name="init" depends="sharedbuild.init">
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mwlabs.modulename" value="orbportability"/>
+        <import-module.macro module="common"/>
 
-    <property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+    </target>
 
-	<property name="com.hp.mwlabs.orbportability.src" value="classes"/>
-    <property name="com.hp.mwlabs.orbportability.etc" location="etc"/>
-	<property name="com.hp.mwlabs.orbportability.config" value="config"/>
-	<property name="com.hp.mwlabs.orbportability.buildroot" value="build"/>
-	<property name="com.hp.mwlabs.orbportability.builddir" location="${com.hp.mwlabs.orbportability.buildroot}/classes/"/>
-    <property name="com.hp.mwlabs.orbportability.destdir" value="lib"/>
-    <property name="com.hp.mwlabs.orbportability.tests.src" value="tests/classes/"/>
-    <property name="com.hp.mwlabs.orbportability.tests.build" value="${com.hp.mwlabs.orbportability.buildroot}/tests/"/>
-    <property name="com.hp.mwlabs.orbportability.tests.destdir" value="${com.hp.mwlabs.orbportability.destdir}/tests/"/>
+    <target name="taskdefs">
+        <taskdef name="idl-compiler" classname="com.arjuna.orbportability.common.ant.IDLCompiler" classpath="${build.dir}/lib/orbportability.jar;config"/>
+        <taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="${build.dir}/lib/orbportability.jar"/>
+        <taskdef name="idl-build-list-element" classname="com.arjuna.orbportability.common.ant.IDLBuildListElement" classpath="${build.dir}/lib/orbportability.jar"/>
+    </target>
 
-    <property name="com.hp.mwlabs.orbportability.resourcebundle" value="orbportability_msg_en_US.properties"/>
+    <target name="compile" depends="sharedbuild.compile"/>
 
-    <property name="com.hp.mwlabs.orbportability.propertyfile.src" value="${com.hp.mwlabs.modulename}-properties.xml"/>
+    <target name="compile-tests" depends="compile-tests-idl">
+        <compile-tests.macro>
+            <additional.src.dirs>
+                <src location="${build.dir}/tests/generatedclasses"/>
+            </additional.src.dirs>
+        </compile-tests.macro>
+    </target>
 
-	<property name="com.hp.mwlabs.orbportability.mappingfile" value="${com.hp.mwlabs.modulename}-properties.mappings"/>
+    <target name="compile-tests-idl" depends="taskdefs">
 
-	<target name="com.hp.mwlabs.orbportability.init" depends="com.hp.mwlabs.orbportability.setpropertyfiles">
-		<!-- Define default build properties -->
-		<property name="com.hp.mw.sourceid" value="unknown"/>
-		<property name="com.hp.mw.version" value="unknown"/>
-		<property name="com.hp.mw.installationdirectory" value="install"/>
-		<property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-		<property name="com.hp.mw.notes" value=""/>
+        <!-- working dir for the compiler is the dir in which ant was invoked, as we need to anchor with ${basedir} explicitly -->
 
-		<tstamp>
-	    		<format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-	  	</tstamp>
+        <idl-build-list inproperty="idl.buildlist">
+            <element src="${basedir}/${tests.dir}/idl/orbtests.idl" mappings="orbtests=com.hp.mwtests.orbportability.orbspecific" package="com.hp.mwtests.orbportability.orbspecific"/>
+        </idl-build-list>
 
-                <!-- Define classpath builder task -->
-                <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
+        <idl-compiler orb="JacORB"
+                        buildlist="${idl.buildlist}"
+                        destdir="${basedir}/${build.dir}/tests/generatedclasses"
+                        parameters="include='${jacorb.home}/idl/omg/',classpath='${jacorb.classpath}'"/>
 
-		<condition property="com.hp.mwlabs.orbportability.tests.compile">
-			<equals arg1="${com.hp.mw.orbportability.tests.compile}" arg2="yes"/>
-		</condition>
-
-		<condition property="com.hp.mwlabs.orbportability.tests.install">
-			<equals arg1="${com.hp.mw.orbportability.tests.install}" arg2="yes"/>
-		</condition>
-
-		<echo message="Initialising module orbportability"/>
-		<echo message="Source ID = ${com.hp.mw.sourceid}"/>
-		<echo message="Version   = ${com.hp.mw.version}"/>
-		<echo message="Builder   = ${com.hp.mw.builder}"/>
-		<echo message="Date      = ${com.hp.mw.date}"/>
-		<echo message="Notes     = ${com.hp.mw.notes}"/>
-
-		<!-- Installation directory -->
-		<property name="com.hp.mwlabs.installationdirectory"
-		    location="${com.hp.mw.installationdirectory}"/>
-
-		<!-- Compile with debugging? -->
-		<condition property="com.hp.mwlabs.debug" value="no">
-			<equals arg1="${com.hp.mw.debug}" arg2="no"/>
-		</condition>
-		<property name="com.hp.mwlabs.debug" value="yes"/>
-
-		<!-- Compile with deprecation? -->
-		<condition property="com.hp.mwlabs.deprecation" value="yes">
-			<equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-		</condition>
-		<property name="com.hp.mwlabs.deprecation" value="no"/>
-
-		<mkdir	dir="${com.hp.mwlabs.orbportability.builddir}"/>
-                <mkdir	dir="${com.hp.mwlabs.orbportability.destdir}"/>
-
-		<!-- Set the module property file details -->
-		<property name="com.hp.mwlabs.orbportability.propertyfile" value="${com.hp.mwlabs.modulename}-properties.xml"/>
-                <property name="com.hp.mw.orbportability.configurationfile" value="defaultorb-configuration.xml"/>
-		<property name="com.hp.mw.propertydirectory" location="${com.hp.mwlabs.installationdirectory}/etc"/>
-
-		<echo message="Property directory : ${com.hp.mw.propertydirectory}"/>
-		<echo message="Property file name : ${com.hp.mwlabs.orbportability.propertyfile}"/>
-	</target>
-
-    <!-- If this build is part of a product build set the property files to the product property file -->
-    <target name="com.hp.mwlabs.orbportability.setpropertyfiles" if="com.hp.mw.ts.product.name">
-
-            <echo>Overriding propertyfile settings with product propertyfile settings</echo>
-            <property name="com.hp.mwlabs.orbportability.propertyfile" value="${com.hp.mw.ts.product.propertyfile}"/>
-
     </target>
 
-
-	<target name="com.hp.mw.orbportability.build" depends="com.hp.mw.orbportability.jar,com.hp.mwlabs.orbportability.tests.jar">
-
-	</target>
-
-	<target name="com.hp.mwlabs.orbportability.compile" depends="com.hp.mwlabs.orbportability.init, com.hp.mwlabs.orbportability.generateresourcebundle">
-
-                <ant antfile="build-anttasks.xml"/>
-
-                <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-                    <classpath>
-                        <pathelement location="${com.hp.mwlabs.orbportability.destdir}/ext/orbportability-ant.jar"/>
-                        <pathelement location="${com.hp.mwlabs.orbportability.config}"/>
-                    </classpath>
-                </classpath-builder>
-
-                <!-- Make ANT aware of user-defined task -->
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="orbport.classpath"/>
-	        <taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="${orbport.classpath}"/>
-
-   		<idl-build-list inproperty="com.hp.mw.orbportability.orbspecific.buildlist">
-   		</idl-build-list>
-
-		<ant antfile="orbspecific.xml">
-                    <property name="com.hp.mw.orbportability.orbspecific.modulename" value="orbportability"/>
-                    <property name="com.hp.mw.orbportability.orbspecific.include" value="include/"/>
-                    <property name="com.hp.mw.orbportability.orbspecific.srcdir" location="${com.hp.mwlabs.orbportability.src}"/>
-                </ant>
-
-                <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-                <echo message="Building ORB portability code"/>
-
-		<javac 	srcdir="${com.hp.mwlabs.orbportability.src}"
-                        destdir="${com.hp.mwlabs.orbportability.builddir}"
-                        includes="**/*.java"
-                        excludes="com/arjuna/orbportability/internal/orbspecific/**/*.java"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-
-                    <classpath>
-                        <pathelement location="${com.hp.mwlabs.orbportability.src}"/>
-                        <pathelement path="${build.classpath}"/>
-                    </classpath>
-
-		</javac>
-		
-        <!-- Process the properties -->
-    	<property name="property.file" value="orbportability.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.orbportability.builddir}/${property.file}">
-            <entry key="MODULE" value="${com.hp.mwlabs.modulename}"/>
-            <entry key="SOURCEID" value="${com.hp.mw.sourceid}"/>
-            <entry key="BUILDINFO" value="${com.hp.mw.builder}"/>
-            <entry key="VERSION" value="${com.hp.mw.version}"/>
-            <entry key="DATE" value="${com.hp.mw.date}"/>
-            <entry key="NOTES" value="${com.hp.mw.notes}"/>
-			<entry key="ORBPORTABILITY_VERSION" value="${com.hp.mw.version}"/>
-			<entry key="PROPERTIES_FILE" value="${com.hp.mwlabs.orbportability.propertyfile}"/>
-            <entry key="ORB_CONFIGURATION" value="${com.hp.mw.orbportability.configurationfile}"/>
-		</propertyfile>
-
-
-	</target>
-
-    <target name="com.hp.mw.orbportability.install" depends="com.hp.mw.orbportability.build,com.hp.mw.orbportability.tests.install">
-
-            <echo message="Installing module orbportability"/>
-            <echo message="Installation directory : ${com.hp.mwlabs.installationdirectory}"/>
-            <mkdir dir="${com.hp.mw.propertydirectory}"/>
-
-            <taskdef name="merge-property-files"
-                         classname="com.hp.mw.buildsystem.ant.MergePropertyFiles" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-            <echo>Merging propertyfiles into main product property file</echo>
-
-            <merge-property-files master="${com.hp.mw.propertydirectory}/${com.hp.mwlabs.orbportability.propertyfile}"
-                                      merge="${com.hp.mwlabs.orbportability.etc}/default-${com.hp.mwlabs.orbportability.propertyfile.src}"/>
-
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
     </target>
 
-    <target name="com.hp.mw.orbportability.jar" depends="com.hp.mw.orbportability.compile">
-
-            <copy file="${com.hp.mwlabs.orbportability.etc}/${com.hp.mwlabs.orbportability.mappingfile}"
-                      todir="${com.hp.mwlabs.orbportability.builddir}"
-                      overwrite="true"/>
-
-            <jar basedir="${com.hp.mwlabs.orbportability.builddir}"
-                    jarfile="${com.hp.mwlabs.orbportability.destdir}/${com.hp.mwlabs.modulename}.jar"
-                    excludes="com/arjuna/orbportability/common/ant/**/*.class"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}">
-                    <classpath>
-                            <pathelement location="${com.hp.mwlabs.orbportability.destdir}/${com.hp.mwlabs.modulename}.jar"/>
-                    </classpath>
-            </classpath-builder>
-
+    <target name="propertyfile" depends="sharedbuild.propertyfile">
+        <propertyfile file="${build.dir}/classes/${property.file}">
+			<entry key="ORBPORTABILITY_VERSION" value="unknown"/>
+            <entry key="ORB_CONFIGURATION" value="unknown"/>
+        </propertyfile>
     </target>
 
+</project>
 
-	<target name="com.hp.mw.orbportability.clean">
 
-                <echo message="Cleaning ORB Portability module"/>
-		<delete dir="${com.hp.mwlabs.orbportability.buildroot}"/>
-		<delete dir="${com.hp.mwlabs.orbportability.destdir}"/>
-		<delete dir="${com.hp.mwlabs.orbportability.tests.build}"/>
-
-	</target>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.orbportability.compile" depends="com.hp.mwlabs.orbportability.compile">
-
-	</target>
-
-	<target name="com.hp.mw.orbportability.tests.install" depends="com.hp.mwlabs.orbportability.tests.jar" if="com.hp.mwlabs.orbportability.tests.install">
-
-		<echo message="Installing tests"/>
-
-	</target>
-
-	<target name="com.hp.mwlabs.orbportability.tests.jar" depends="com.hp.mwlabs.orbportability.tests.compile" if="com.hp.mwlabs.orbportability.tests.compile">
-
-            <mkdir dir="${com.hp.mwlabs.orbportability.tests.destdir}"/>
-            <jar    basedir="${com.hp.mwlabs.orbportability.tests.build}"
-                    jarfile="${com.hp.mwlabs.orbportability.tests.destdir}/${com.hp.mwlabs.modulename}_tests.jar"/>
-
-        </target>
-
-	<target name="com.hp.mwlabs.orbportability.tests.compile" depends="com.hp.mw.orbportability.jar" if="com.hp.mwlabs.orbportability.tests.compile">
-
-                <!-- Make ANT aware of user-defined task -->
-                <taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="lib/ext/orbportability-ant.jar"/>
-                <taskdef name="idl-build-list-element" classname="com.arjuna.orbportability.common.ant.IDLBuildListElement" classpath="lib/ext/orbportability-ant.jar"/>
-                <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-		<echo message="Building tests"/>
-
-                <mkdir dir="${com.hp.mwlabs.orbportability.tests.build}"/>
-
-                <echo message="Performing ORB specific build"/>
-
-                <property name="com.hp.mwlabs.orbportability.tests.idldir" location="tests/idl/"/>
-
-                <idl-build-list inproperty="com.hp.mw.orbportability.orbspecific.buildlist">
-                    <element src="${com.hp.mwlabs.orbportability.tests.idldir}/orbtests.idl" mappings="orbtests=com.hp.mwtests.orbportability.orbspecific" package="com.hp.mwtests.orbportability.orbspecific"/>
-                </idl-build-list>
-
-                <ant antfile="orbspecific.xml">
-                    <property name="com.hp.mw.orbportability.orbspecific.modulename" value="orbportability_tests"/>
-                    <property name="com.hp.mw.orbportability.orbspecific.lib" value="lib/tests/"/>
-                    <property name="com.hp.mw.orbportability.orbspecific.srcdir" location="${com.hp.mwlabs.orbportability.tests.src}"/>
-                </ant>
-
-                <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javac 	srcdir="${com.hp.mwlabs.orbportability.tests.src}"
-                        destdir="${com.hp.mwlabs.orbportability.tests.build}"
-                        debug="${com.hp.mwlabs.debug}"
-			deprecation="${com.hp.mwlabs.deprecation}"
-		>
-
-                    <classpath>
-                        <pathelement path="${build.classpath}"/>
-                    </classpath>
-
-		</javac>
-
-	</target>
-
-        <target name="clean" depends="com.hp.mw.orbportability.clean"/>
-
-        <target name="com.hp.mwlabs.orbportability.generateresourcebundle">
-
-            <echo message="Generating ORB Portability Resource Bundle"/>
-
-            <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-            <javadoc    sourcepath="${com.hp.mwlabs.orbportability.src}"
-                        packagenames="com.arjuna.*"
-                        failonerror="yes"
-                        private="yes"
-                        defaultexcludes="yes"
-                        classpath="${build.classpath}">
-
-                 <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                    <path>
-                        <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                    </path>
-                    <param name="-basedir" value="${com.hp.mwlabs.orbportability.builddir}"/>
-                    <param name="-resourcebundle" value="${com.hp.mwlabs.orbportability.resourcebundle}"/>
-                    <param name="-appendkey" value="[]"/>
-                 </doclet>
-            </javadoc>
-
-        </target>
-
-</project>

Added: labs/jbosstm/trunk/ArjunaJTS/sharedbuild.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/sharedbuild.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaJTS/sharedbuild.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -0,0 +1,69 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+  MA  02110-1301, USA.
+
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
+-->
+<project name="sharedbuild-jts">
+
+    <import file="../sharedbuild.xml"/>
+
+    <dirname property="sharedbuild-jts.base.dir" file="${ant.file.sharedbuild-jts}" />
+    <property name="jacorb.home" value="${sharedbuild-jts.base.dir}/jacorb"/>
+
+    <path id="jacorb.classpath">
+        <fileset dir="${jacorb.home}/lib" includes="*.jar"/>
+    </path>
+    <property name="jacorb.classpath" refid="jacorb.classpath"/>
+
+    <target name="taskdefs">
+        <taskdef name="idl-compiler" classname="com.arjuna.orbportability.common.ant.IDLCompiler" classpath="${build.dir}/lib/ext/orbportability.jar;../orbportability/config"/>
+        <taskdef name="idl-build-list" classname="com.arjuna.orbportability.common.ant.IDLBuildList" classpath="${build.dir}/lib/ext/orbportability.jar"/>
+        <taskdef name="idl-build-list-element" classname="com.arjuna.orbportability.common.ant.IDLBuildListElement" classpath="${build.dir}/lib/ext/orbportability.jar"/>
+    </target>
+
+    <target name="compile" depends="init, compile-idl">
+        <compile.macro>
+            <additional.classpath>
+                <path refid="jacorb.classpath"/>
+            </additional.classpath>
+            <additional.src.dirs>
+                <src location="${build.dir}/generatedclasses"/>
+            </additional.src.dirs>
+        </compile.macro>
+    </target>
+
+    <target name="compile-idl" depends="taskdefs">
+        <mkdir dir="${build.dir}/generatedclasses"/>
+    </target>
+
+    <target name="compile-tests" depends="compile, compile-tests-idl">
+        <compile-tests.macro>
+            <additional.classpath>
+                <path refid="jacorb.classpath"/>
+            </additional.classpath>
+            <additional.src.dirs>
+                <src location="${build.dir}/tests/generatedclasses"/>
+            </additional.src.dirs>
+        </compile-tests.macro>
+    </target>
+
+    <target name="compile-tests-idl" depends="taskdefs">
+        <mkdir dir="${build.dir}/tests/generatedclasses"/>
+    </target>
+
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTS/tsmx/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/tsmx/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/ArjunaJTS/tsmx/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,9 +1,9 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
-  as indicated by the @author tags. 
-  See the copyright.txt in the distribution for a full listing 
-  of individual contributors.
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
@@ -15,185 +15,58 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<project name="module-tsmx" default="com.arjuna.mw.ts.tsmx.compile" basedir=".">
-    <!-- class path behaviour -->
-    <property name="build.sysclasspath" value="last"/>
-    <property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
+<project name="module-jtstsmx" default="dist.leafnode" basedir=".">
 
-    <!-- Set module name -->
-    <property name="com.arjuna.mwlabs.ts.modulename" value="tsmx"/>
-    <property name="com.arjuna.arjunacore.tsmx.lib"
-        location="${com.arjuna.arjunacore.dir}/tsmx/lib"/>
-    <property name="com.arjuna.arjunacore.tsmx.tools"
-        location="${com.arjuna.arjunacore.tsmx.lib}/bin/tools"/>
-    <property name="com.arjuna.arjunajta.tsmx.classes"
-        location="${com.arjuna.arjunajta.dir}/tsmx/build/bin"/>
-    <property name="com.arjuna.arjunajta.tsmx.lib"
-        location="${com.arjuna.arjunajta.dir}/tsmx/lib"/>
+    <property name="modulename" value="tsmx"/>
 
-    <!-- Load Build Properties File -->
-    <property file="${com.arjuna.mw.ts.properties}"/>
+    <import file="../../sharedbuild.xml"/>
 
-    <!-- Set internal property defaults -->
-    <!-- Path names -->
-    <property name="com.arjuna.mwlabs.ts.tsmx.destroot" location="build"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.jar.dest" location="lib"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.utilities.src" location="bin"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.utilities.dest" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/bin"/>
-    <property name="com.arjuna.mwlabs.ts.tsmx.tmp" location="${com.arjuna.mwlabs.ts.tsmx.destroot}/tmp"/>
+    <target name="init" depends="sharedbuild.init">
 
-    <!-- Initialisation -->
-    <target name="com.arjuna.mwlabs.ts.tsmx.init">
-        <!-- Define default build properties -->
-        <tstamp>
-            <format property="com.arjuna.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-        </tstamp>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
+        <import-module.macro module="jta"/>
+        <import-module.macro module="jts"/>
+        <import-module.macro module="orbportability"/>
 
-        <!-- Define classpath builder task -->
-        <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.compile">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.compile}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.install">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.install}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.arjuna.mwlabs.ts.tsmx.utilities.jar">
-            <equals arg1="${com.arjuna.mw.ts.tsmx.utilities.jar}" arg2="yes"/>
-        </condition>
-
-        <property name="com.arjuna.mw.installationdirectory" value="install"/>
-        <property name="com.arjuna.mw.sourceid" value="unknown"/>
-        <property name="com.arjuna.mw.version" value="unknown"/>
-        <property name="com.arjuna.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-        <property name="com.arjuna.mw.notes" value=""/>
-        <echo message="Initialising module tsmx"/>
-        <echo message="Source ID = ${com.arjuna.mw.sourceid}"/>
-        <echo message="Version   = ${com.arjuna.mw.version}"/>
-        <echo message="Builder   = ${com.arjuna.mw.builder}"/>
-        <echo message="Date      = ${com.arjuna.mw.date}"/>
-        <echo message="Notes     = ${com.arjuna.mw.notes}"/>
-
-        <!-- Installation directory -->
-        <property name="com.arjuna.mwlabs.installationdirectory" location="${com.arjuna.mw.installationdirectory}"/>
-
-        <!-- Compile with debugging? -->
-        <condition property="com.arjuna.mwlabs.debug" value="no">
-            <equals arg1="${com.arjuna.mw.debug}" arg2="no"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.debug" value="yes"/>
-
-        <!-- Compile with deprecation? -->
-        <condition property="com.arjuna.mwlabs.deprecation" value="yes">
-            <equals arg1="${com.arjuna.mw.deprecation}" arg2="yes"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.deprecation" value="no"/>
-
-        <!-- setup classpath -->
-        <property name="com.arjuna.arjunacore.tsmx.dir" location="${com.arjuna.arjunacore.dir}/tsmx"/>
-        <property name="com.arjuna.arjunacore.tsmx.lib.dir" location="${com.arjuna.arjunacore.tsmx.dir}/lib"/>
-        <property name="com.arjuna.arjunacore.tsmx.bin.dir" location="${com.arjuna.arjunacore.tsmx.lib.dir}/bin.tools"/>
-
-        <path id="tsmx.classpath">
-            <fileset dir="${com.arjuna.arjunacore.tsmx.lib.dir}" includes="**/*.jar"/>
-        </path>
-        <property name="tsmx.classpath" refid="tsmx.classpath"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
     </target>
 
-    <target name="com.arjuna.mw.ts.tsmx.compile" depends="com.arjuna.mwlabs.ts.tsmx.utilities.compile"/>
+    <target name="tools" depends="init">
 
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.compile" depends="com.arjuna.mwlabs.ts.tsmx.init">
+        <property name="install.dir" value="${basedir}/${build.dir}/tools"/>
 
-        <echo message="Compiling utilities"/>
+        <ant dir="../../ArjunaJTA/tsmx" target="tools" inheritall="false">
+            <property name="install.dir" value="${install.dir}"/>
+        </ant>
 
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"/>
+        <mkdir dir="${src.dir}"/>
+        <compile.macro>
+            <additional.classpath>
+                <fileset dir="${global.ext.lib.dir}" includes="jta-1_1-classes.zip"/>
+                <fileset dir="${install.dir}" includes="${modulename}-tools.jar"/>
+                <fileset dir="${install.dir}" includes="${modulename}-objectstorebrowser.jar"/>
+            </additional.classpath>
+            <additional.src.dirs>
+                <src location="bin"/>
+            </additional.src.dirs>
+        </compile.macro>
+        <delete dir="${src.dir}"/>
 
-        <javac
-            srcdir="${com.arjuna.mwlabs.ts.tsmx.utilities.src}"
-            destdir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
-            debug="${com.arjuna.mwlabs.debug}"
-            deprecation="${com.arjuna.mwlabs.deprecation}">
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${tsmx.classpath}"/>
-                <path path="${com.arjuna.arjunajta.tsmx.classes}"/>
-            </classpath>
-        </javac>
-    </target>
-
-    <target name="com.arjuna.mw.ts.tsmx.jar" depends="com.arjuna.mwlabs.ts.tsmx.utilities.jar"/>
-
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.jar" depends="com.arjuna.mwlabs.ts.tsmx.utilities.compile">
-
-        <echo message="Building utilities jar file"/>
-
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/plugins"/>
-
-        <property name="objectstorebrowser" value="${com.arjuna.mwlabs.ts.modulename}-objectstorebrowser.jar"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <unzip src="${com.arjuna.arjunacore.tsmx.tools}/${objectstorebrowser}" dest="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <unzip src="${com.arjuna.arjunajta.tsmx.lib}/${objectstorebrowser}" dest="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-
-        <copy todir="${com.arjuna.mwlabs.ts.tsmx.tmp}" overwrite="true">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar file="${install.dir}/${modulename}-objectstorebrowser.jar" update="true">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/objectstorebrowser/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**/*.class,com/arjuna/ats/tools/objecstorebrowser/stateviewers/viewers/**/*.class"/>
-        </copy>
-        <zip zipfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/${objectstorebrowser}" basedir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
+        </jar>
 
-        <property name="osbv-default" value="plugins/osbv-defaults.jar"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <unzip src="${com.arjuna.arjunacore.tsmx.tools}/${osbv-default}" dest="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-
-        <copy todir="${com.arjuna.mwlabs.ts.tsmx.tmp}" overwrite="true">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.utilities.dest}"
+        <jar file="${install.dir}/plugins/osbv-defaults.jar" update="true">
+            <fileset dir="${build.dir}/classes"
                 includes="com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/**/*.class"
                 excludes="com/arjuna/ats/tools/toolsframework/**"/>
-        </copy>
-        <zip zipfile="${com.arjuna.mwlabs.ts.tsmx.jar.dest}/${osbv-default}" basedir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.tmp}"/>
-    </target>
+        </jar>
 
-    <!-- Installation targets -->
-    <target name="com.arjuna.mw.ts.tsmx.install" depends="com.arjuna.mw.ts.tsmx.compile, com.arjuna.mwlabs.ts.tsmx.utilities.install">
-
-        <echo message="Installing module tsmx"/>
-
     </target>
 
-    <target name="com.arjuna.mwlabs.ts.tsmx.utilities.install" depends="com.arjuna.mwlabs.ts.tsmx.utilities.jar">
-
-        <echo message="Installing utilities"/>
-
-        <mkdir dir="${com.hp.mwlabs.installationdirectory}/bin/tools"/>
-        <copy todir="${com.hp.mwlabs.installationdirectory}/bin/tools">
-            <fileset dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}" includes="**/*.jar"/>
-        </copy>
-    </target>
-
-    <!-- Clean targets -->
-    <target name="com.arjuna.mw.ts.tsmx.clean">
-
-        <echo message="Cleaning module"/>
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.destroot}"/>
-
-        <delete dir="${com.arjuna.mwlabs.ts.tsmx.jar.dest}"/>
-    </target>
-
-    <!-- Short target names -->
-    <target name="compile" depends="com.arjuna.mw.ts.tsmx.compile"/>
-    <target name="jar" depends="com.arjuna.mw.ts.tsmx.jar"/>
-    <target name="install" depends="com.arjuna.mw.ts.tsmx.install"/>
-    <target name="clean" depends="com.arjuna.mw.ts.tsmx.clean"/>
-</project>
+</project>
\ No newline at end of file

Added: labs/jbosstm/trunk/antbuildsystem/ant-contrib-1.0b3.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/antbuildsystem/ant-contrib-1.0b3.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: labs/jbosstm/trunk/antbuildsystem/build.xml
===================================================================
--- labs/jbosstm/trunk/antbuildsystem/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/antbuildsystem/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,77 +15,16 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<project name="module-buildsystem" default="com.hp.mw.buildsystem.jar" basedir=".">
-	<!-- class path behaviour -->
-	<property name="build.sysclasspath" value="last"/>
+<project name="module-buildsystem" default="dist.leafnode" basedir=".">
 
-	<!-- Set module name -->
-	<property name="com.hp.mwlabs.ts.modulename" value="buildsystem"/>
+    <property name="modulename" value="buildsystem"/>
 
-	<!-- Set default properties filename -->
-	<property name="com.hp.mw.ts.properties" value="module-buildsystem.properties"/>
-        <property name="com.hp.mwlabs.ts.classpathbuilderfilename" location="./buildsystem.classpath"/>
+    <import file="../sharedbuild.xml"/>
 
-	<!-- Load Build Properties File -->
-	<property file="${com.hp.mw.ts.properties}"/>
+    <target name="compile-tests"/>
+    <target name="run.tests"/>
 
-	<!-- Set internal property defaults -->
-	<property name="com.hp.mw.debug" value="true"/>
-	<!-- Path names -->
-	<property name="com.hp.mwlabs.buildsystem.src" value="classes"/>
-	<property name="com.hp.mwlabs.buildsystem.build" location="build"/>
-	<property name="com.hp.mwlabs.buildsystem.dest" value="${com.hp.mwlabs.buildsystem.build}/classes"/>
-	<property name="com.hp.mwlabs.buildsystem.jar.dest" location="${com.hp.mwlabs.buildsystem.build}/lib"/>
-	<property name="com.hp.mwlabs.buildsystem.libs" location="lib/ext"/>
-
-	<path id="com.hp.mwlabs.buildsystem.classpath">
-		<fileset dir="${com.hp.mwlabs.buildsystem.libs}"/>
-	</path>
-	<property name="com.hp.mwlabs.buildsystem.classpath" refid="com.hp.mwlabs.buildsystem.classpath"/>
-
-	<!-- Initialisation -->
-	<target name="com.hp.mwlabs.buildsystem.init">
-		<!-- Define default build properties -->
-		<tstamp>
-			<format property="com.hp.mw.ts.date" pattern="yyyy/mm/dd hh:mm aa"/>
-		</tstamp>
-		<!-- Make the destination directory -->
-		<mkdir dir="${com.hp.mwlabs.buildsystem.build}"/>
-		<mkdir dir="${com.hp.mwlabs.buildsystem.dest}"/>
-		<mkdir dir="${com.hp.mwlabs.buildsystem.jar.dest}"/>
-	</target>
-
-	<!-- Compilation targets -->
-	<target name="com.hp.mw.buildsystem.compile" depends="com.hp.mwlabs.buildsystem.compile"/>
-
-	<target name="com.hp.mwlabs.buildsystem.compile" depends="com.hp.mwlabs.buildsystem.init">
-		<echo message="Compiling module"/>
-		<javac srcdir="${com.hp.mwlabs.buildsystem.src}"
-                       destdir="${com.hp.mwlabs.buildsystem.dest}"
-                       classpath="${com.hp.mwlabs.buildsystem.classpath}"
-                       excludes="${com.hp.mwlabs.buildsystem.compile.excludes}"
-                       debug="${com.hp.mw.debug}"
-					   deprecation="${com.hp.mw.deprecation}"/>
-	</target>
-
-	<!-- Jar targets -->
-	<target name="com.hp.mw.buildsystem.jar" depends="com.hp.mw.buildsystem.compile">
-		<echo message="Building jar file"/>
-		<jar jarfile="${com.hp.mwlabs.buildsystem.jar.dest}/${com.hp.mwlabs.ts.modulename}.jar" basedir="${com.hp.mwlabs.buildsystem.dest}"/>
-	</target>
-
-	<!-- Clean targets -->
-	<target name="com.hp.mw.buildsystem.clean">
-		<echo message="Cleaning module"/>
-		<delete dir="${com.hp.mwlabs.buildsystem.build}"/>
-		<delete file="${com.hp.mwlabs.buildsystem.info.dest}"/>
-	</target>
-
-	<!-- Short target names -->
-	<target name="compile" depends="com.hp.mw.buildsystem.compile"/>
-	<target name="jar" depends="com.hp.mw.buildsystem.jar"/>
-	<target name="clean" depends="com.hp.mw.buildsystem.clean"/>
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/atsintegration/build.xml
===================================================================
--- labs/jbosstm/trunk/atsintegration/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/atsintegration/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,273 +15,80 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--$Id: build.xml 2342 2006-03-30 13:06:17Z  $-->
+<project name="module-atsintegration" default="dist.leafnode" basedir=".">
 
-<project name="atsintegration" default="com.arjuna.mw.ts.jbossatx.build" basedir=".">
-    <!-- Set module name -->
-    <property name="com.arjuna.mwlabs.ts.modulename" value="atsintegration"/>
+    <property name="modulename" value="jbossatx"/>
 
-    <!-- Set default properties filename -->
-    <property name="com.arjuna.mw.ts.properties" value="atsintegration.properties"/>
+    <property name="global.ext.libs" value="jta-1_1-classes.zip,connector-api.jar"/>
 
-    <!-- Load Build Properties File -->
-    <property file="${com.arjuna.mw.ts.properties}"/>
+    <property name="component-module-list" value="../atsintegration"/>
 
-    <property environment="env"/>
+    <import file="../sharedbuild.xml"/>
 
-	<!-- configure dependencies -->
-	<property name="com.arjuna.buildsystem.dir" location="${buildsystem.dir}"/>
-	<property name="com.arjuna.buildsystem.build.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
+    <target name="init" depends="sharedbuild.init, init.jts">
 
-    <!-- Set internal property defaults -->
-    <!-- Path names -->
-    <property name="com.arjuna.mwlabs.ts.jbossatx.src" location="classes"/>
-    <property name="com.arjuna.mwlabs.ts.jbossatx.buildroot" location="build"/>
-    <property name="com.arjuna.mwlabs.ts.jbossatx.dest" location="${com.arjuna.mwlabs.ts.jbossatx.buildroot}/classes"/>
-    <property name="com.arjuna.mwlabs.ts.jbossatx.jar.dest" value="${com.arjuna.mwlabs.ts.jbossatx.buildroot}/lib"/>
+        <import-module.macro module="common"/>
+        <import-module.macro module="arjuna"/>
+        <import-module.macro module="jta"/>
 
-    <property name="com.arjuna.mwlabs.ts.jbossatx.docs.src" location="docbuild"/>
-    <property name="com.arjuna.mwlabs.ts.jbossatx.docs.dest" location="${com.arjuna.mwlabs.ts.jbossatx.buildroot}/docs"/>
-    <property name="com.arjuna.mwlabs.ts.jbossatx.resourcebundle" value="jbossatx_msg_en_US.properties"/>
+        <copy todir="${build.dir}/lib/ext" flatten="true"
+                file="${sharedbuild.base.dir}/ArjunaCore/tsmx/${build.dir}/lib/tsmx.jar"/>
 
-    <!-- Initialisation -->
-    <target name="com.arjuna.mwlabs.ts.jbossatx.init">
-        <!-- Define default build properties -->
-        <property name="com.arjuna.mw.sourceid" value="unknown"/>
-        <property name="com.arjuna.mw.version" value="unknown"/>
-        <property name="com.arjuna.mw.installationdirectory" value="install"/>
+        <property name="exclude-these-classes" value="**/jts/** ${excluded.classes}"/>
 
-        <tstamp>
-            <format property="com.arjuna.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-        </tstamp>
-
-        <condition property="jboss.home" value="${env.JBOSS_HOME}">
-            <isset property="env.JBOSS_HOME"/>
-        </condition>
-
-        <fail unless="jboss.home">
-The JBoss installation directory must be specified with the JBOSS_HOME environment variable or the jboss.home property.
-        </fail>
-
-        <property name="jboss.server" value="all"/>
-
-        <available property="jboss.server.exists" type="dir"
-            file="${jboss.home}/server/${jboss.server}"/>
-
-        <fail unless="jboss.server.exists">
-The JBoss server '${jboss.server}' does not appear to exist in the installation directory.  Please set jboss.server to the name of the JBoss server instance.
-        </fail>
-
-        <property name="jboss.lib.dir" location="${jboss.home}/lib"/>
-        <property name="jboss.common.lib.dir" location="${jboss.home}/common/lib"/>
-        <property name="jboss.server.all.lib.dir" location="${jboss.home}/server/all/lib"/>
-
-        <property name="com.arjuna.mw.installationdirectory" value="install"/>
-        <property name="com.arjuna.mw.sourceid" value="unknown"/>
-        <property name="com.arjuna.mw.version" value="unknown"/>
-
-        <property name="com.arjuna.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-        <property name="com.arjuna.mw.notes" value=""/>
-
-        <echo message="Initialising module atsintegration"/>
-        <echo message="Source ID = ${com.arjuna.mw.sourceid}"/>
-        <echo message="Version   = ${com.arjuna.mw.version}"/>
-        <echo message="Builder   = ${com.arjuna.mw.builder}"/>
-        <echo message="Date      = ${com.arjuna.mw.date}"/>
-        <echo message="Notes     = ${com.arjuna.mw.notes}"/>
-
-        <path id="com.arjuna.buildsystem.classpath">
-            <fileset dir="${com.arjuna.buildsystem.build.lib}"/>
-        </path>
-        <property name="com.arjuna.buildsystem.classpath" refid="com.arjuna.buildsystem.classpath"/>
-
-        <!-- Installation directory -->
-        <property name="com.arjuna.mwlabs.installationdirectory"
-            location="${com.hp.mw.installationdirectory}"/>
-        <property name="com.arjuna.mwlabs.installation.lib.directory"
-            location="${com.hp.mw.installationdirectory}/lib"/>
-
-        <condition property="com.arjuna.mwlabs.debug" value="no">
-            <equals arg1="${com.hp.mw.debug}" arg2="no"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.debug" value="yes"/>
-
-        <!-- Compile with deprecation? -->
-        <condition property="com.arjuna.mwlabs.deprecation" value="yes">
-            <equals arg1="${com.hp.mw.deprecation}" arg2="yes"/>
-        </condition>
-        <property name="com.arjuna.mwlabs.deprecation" value="no"/>
-
-        <!-- Make the destination directory -->
-        <mkdir dir="${com.arjuna.mwlabs.ts.jbossatx.dest}"/>
-
-        <!-- libs from JBoss App Server installation.
-        Note: we need AS 5.0 as it has new integration API.
-        This won't build against earlier AS releases. Not that it would run on
-        earlier AS versions anyhow, as TransactionManagerService is now MC POJO based.
-
-        As a jbossas component we would like to use just the
-        integration jar here. however it does not contain some
-        stuff we need e.g. rmi, system, logger classes etc, so we
-        need some other jars too. For a jts build we still
-        need the jacorb and iiop libs which are in server/all/lib
-        -->
-
-        <!-- jboss-common-core.jar has UnexpectedThrowable, jboss-logging-spi.jar has Logger, jboss-main.jar has ServerConfig -->
-        <property name="jboss.libs" value="jboss-common-core.jar jboss-logging-spi.jar jboss-bootstrap.jar"/>
-        <!-- jboss-integration.jar has the transactions SPI, jmx-adaptor-plugin.jar has RMIAdaptor, jbosssx has security -->
-        <property name="jboss.common.shared.jta.libs" value="jboss-integration.jar jmx-adaptor-plugin.jar jbosssx.jar"/>
-
-        <property name="jboss.common.shared.jts.libs" value="jboss-iiop.jar"/>
-        <property name="jboss.server.all.jts.libs" value="jacorb.jar"/>
-
-        <condition property="jboss.common.shared.libs" value="${jboss.common.shared.jta.libs} ${jboss.common.shared.jts.libs}">
-            <isset property="com.hp.mwlabs.ts.build.jts"/>
-        </condition>
-        <property name="jboss.common.shared.libs" value="${jboss.common.shared.jta.libs}"/>
-
-        <condition property="jboss.server.all.libs" value="${jboss.server.all.jts.libs}">
-            <isset property="com.hp.mwlabs.ts.build.jts"/>
-        </condition>
-        <property name="jboss.server.all.libs" value=""/>
-
-        <!-- Classpath -->
-        <path id="build.classpath">
-            <fileset dir="${com.arjuna.mwlabs.installation.lib.directory}">
-				<include name="**/*.jar"/>
-				<include name="**/*.zip"/>
-			</fileset>
-			<filelist dir="${jboss.lib.dir}" files="${jboss.libs}"/>
-            <filelist dir="${jboss.common.lib.dir}" files="${jboss.common.shared.libs}"/>
-            <filelist dir="${jboss.server.all.lib.dir}" files="${jboss.server.all.libs}"/>
-
-        </path>
-        <property name="build.classpath" refid="build.classpath"/>
-
-        <condition property="com.arjuna.mwlabs.ts.jbossatx.compile.excludes"
-            value="**/jts/**/*.java">
-            <not>
-                <isset property="com.hp.mwlabs.ts.build.jts"/>
-            </not>
-        </condition>
     </target>
 
-    <!-- Default build target -->
-    <target name="com.arjuna.mw.ts.jbossatx.build" depends="com.arjuna.mwlabs.ts.jbossatx.service.compile,com.arjuna.mwlabs.ts.jbossatx.generateresourcebundle,com.arjuna.mw.ts.jbossatx.jar"/>
-
-    <target name="com.arjuna.mwlabs.ts.jbossatx.service.compile" depends="com.arjuna.mwlabs.ts.jbossatx.init">
-
-        <echo message="Compiling Transaction JBoss service"/>
-
-        <javac
-            srcdir="${com.arjuna.mwlabs.ts.jbossatx.src}"
-            destdir="${com.arjuna.mwlabs.ts.jbossatx.dest}"
-            excludes="${com.arjuna.mwlabs.ts.jbossatx.compile.excludes}"
-            debug="${com.arjuna.mwlabs.debug}"
-            deprecation="${com.arjuna.mwlabs.deprecation}"
-            classpathref="build.classpath"
-            />
-
-		<touch file="${com.arjuna.mwlabs.ts.jbossatx.dest}/built_using_java_${java.specification.version}"/>
-
-	</target>
-
-    <!-- Jar targets -->
-    <target name="com.arjuna.mw.ts.jbossatx.jar"
-        depends="com.arjuna.mwlabs.ts.jbossatx.service.compile">
-
-        <echo message="Building jar file"/>
-        <mkdir dir="${com.arjuna.mwlabs.ts.jbossatx.jar.dest}"/>
-        <jar
-            jarfile="${com.arjuna.mwlabs.ts.jbossatx.jar.dest}/${com.hp.mw.ts.product.name.lowercase}-integration.jar"
-            basedir="${com.arjuna.mwlabs.ts.jbossatx.dest}"
-            />
-
+    <target name="clean">
+        <delete dir="${build.dir}"/>
     </target>
 
+    <target name="init.jts" unless="no_jts">
+        <import-module.macro module="jts"/>
+        <import-module.macro module="jtax"/>
+        <import-module.macro module="orbportability"/>
 
-    <target name="com.arjuna.mwlabs.ts.jbossatx.docs.generate">
-        <mkdir dir="${com.arjuna.mwlabs.ts.jbossatx.docs.dest}"/>
+        <property environment="env"/>
+        <copy todir="${build.dir}/lib/ext" flatten="true"
+                file="${sharedbuild.base.dir}/ArjunaJTS/jacorb/lib/jacorb.jar"/>
 
-        <copy todir="${com.arjuna.mwlabs.ts.jbossatx.docs.dest}">
-            <fileset dir="${com.arjuna.mwlabs.ts.jbossatx.docs.src}/docs/">
-                <include name="**/*.css"/>
-                <include name="**/*.gif"/>
-                <include name="**/*.jpg"/>
-            </fileset>
-        </copy>
-        <style processor="trax"
-               style="${com.arjuna.mwlabs.ts.jbossatx.docs.src}/xsl/ATL_LookAndFeel.xsl"
-               basedir="${com.arjuna.mwlabs.ts.jbossatx.docs.src}/docs/"
-               includes="*.xml" destdir="${com.arjuna.mwlabs.ts.jbossatx.docs.dest}" extension=".html">
-           <param name="rootpath" expression="."/>
-        </style>
+        <property name="exclude-these-classes" value="${excluded.classes}"/>
     </target>
 
-    <!-- Installation targets -->
-    <target name="com.arjuna.mw.ts.jbossatx.install" depends="com.arjuna.mwlabs.ts.jbossatx.install"/>
+    <target name="compile">
 
-    <target name="com.arjuna.mw.ts.jbossatx.install-all" depends="com.arjuna.mw.ts.jbossatx.install"/>
+        <property environment="env"/>
 
+        <compile.macro excluded.classes="${exclude-these-classes}">
+            <additional.classpath>
+                <!-- jboss-common-core.jar has UnexpectedThrowable, jboss-logging-spi.jar has Logger, jboss-main.jar has ServerConfig -->
+                <fileset dir="${env.JBOSS_HOME}/lib" includes="jboss-common-core.jar jboss-logging-spi.jar jboss-bootstrap.jar"/>
+                <!-- jboss-integration.jar has the transactions SPI, jmx-adaptor-plugin.jar has RMIAdaptor, jbosssx has security -->
+                <fileset dir="${env.JBOSS_HOME}/common/lib" includes="jboss-integration.jar jmx-adaptor-plugin.jar jbosssx.jar"/>
 
-    <target name="com.arjuna.mwlabs.ts.jbossatx.install" depends="com.arjuna.mw.ts.jbossatx.build, com.arjuna.mwlabs.ts.jbossatx.docs.generate">
+                <fileset dir="${env.JBOSS_HOME}/common/lib" includes="jboss-iiop.jar"/>
+            </additional.classpath>
+        </compile.macro>
 
-        <echo message="Installing module jbossatx"/>
-
-        <mkdir dir="${com.arjuna.mwlabs.installationdirectory}/lib/"/>
-        <copy todir="${com.arjuna.mwlabs.installationdirectory}/lib/">
-            <fileset dir="${com.arjuna.mwlabs.ts.jbossatx.jar.dest}" includes="*.jar"/>
-        </copy>
-
-        <mkdir dir="${com.arjuna.mwlabs.installationdirectory}/bin/"/>
-        <copy todir="${com.arjuna.mwlabs.installationdirectory}/bin/"
-            filtering="true" overwrite="true">
-            <fileset dir="scripts" includes="run-tools.sh run-tools.bat"/>
-            <filterset>
-                <filter token="PRODUCT_NAME" value="${com.hp.mw.ts.product.name.lowercase}"/>
-                <filter token="HOME_DIRECTORY" value="${com.hp.mw.ts.product.shortened.name.uppercase}_HOME"/>
-            </filterset>
-        </copy>
     </target>
 
-    <!-- Clean targets -->
-    <target name="com.arjuna.mw.ts.jbossatx.clean">
-
-        <echo message="Cleaning module"/>
-        <delete dir="${com.arjuna.mwlabs.ts.jbossatx.buildroot}" failonerror="false"/>
+    <target name="generateresourcebundle">
+        <generateresourcebundle.macro>
+            <args>
+                <param name="-appendkey" value="[]"/>
+            </args>
+        </generateresourcebundle.macro>
     </target>
 
-    <!-- Short target names -->
+    <target name="compile-tests"/>
+    <target name="run.tests"/>
 
-    <target name="jar" depends="com.arjuna.mw.ts.jbossatx.jar"/>
+    <target name="dist" depends="install.lib"/>
 
-    <target name="install" depends="com.arjuna.mw.ts.jbossatx.install"/>
 
-    <target name="clean" depends="com.arjuna.mw.ts.jbossatx.clean"/>
 
-    <target name="com.arjuna.mwlabs.ts.jbossatx.generateresourcebundle">
 
-        <echo message="Generating Integration Resource Bundle"/>
 
-        <javadoc    sourcepath="${com.arjuna.mwlabs.ts.jbossatx.src}"
-                    packagenames="com.arjuna.*"
-                    failonerror="yes"
-                    private="yes"
-                    defaultexcludes="yes"
-                    classpath="${build.classpath}">
-
-            <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                <path>
-                    <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                </path>
-                <param name="-basedir" value="${com.arjuna.mwlabs.ts.jbossatx.dest}"/>
-                <param name="-resourcebundle" value="${com.arjuna.mwlabs.ts.jbossatx.resourcebundle}"/>
-                <param name="-appendkey" value="[]"/>
-            </doclet>
-        </javadoc>
-    </target>
-</project>
-
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/build.xml
===================================================================
--- labs/jbosstm/trunk/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -17,52 +17,15 @@
 
   (C) 2005-2006,
   @author JBoss Inc.
+  (C) 2009 @author Red Hat Middleware LLC.
 -->
-<project name="jbosstm" default="help">
-   <property name="com.hp.mw.installationdirectory" location="install"/>
+<project name="jbossts" default="help">
 
    <property environment="env"/>
 
-   <property name="ext.dir" location="ext"/>
-   <property name="common.dir" location="common"/>
-   <property name="buildsystem.dir" location="antbuildsystem"/>
-   <property name="core.dir" location="ArjunaCore"/>
-   <property name="jta.dir" location="ArjunaJTA"/>
-   <property name="jts.dir" location="ArjunaJTS"/>
-   <property name="integration.dir" location="atsintegration"/>
-   <property name="jboss.tools.dir" location="${core.dir}/tsmx"/>
-   <property name="com.hp.mw.installationdirectory.bin" location="${com.hp.mw.installationdirectory}/bin"/>
-
-   <property name="jboss.eula" location="JBossORG-EULA.txt"/>
-   <property name="jboss.libdir" location="jboss"/>
-   <property name="jboss.install.libdir" location="${com.hp.mw.installationdirectory}/jboss"/>
-
-   <property name="com.hp.mw.deprecation" value="yes"/>
-   <property name="com.arjuna.mw.deprecation" value="yes"/>
-
-   <available property="jts.present" file="${jts.dir}" type="dir"/>
-
+    <!-- TODO wire me up -->
    <property name="com.hp.mw.sourceid" value="unknown"/>
 
-   <property name="junit.jar" location="ext/junit.jar"/>
-   <macrodef name="runant">
-      <attribute name="target"/>
-      <sequential>
-         <java classname="org.apache.tools.ant.launch.Launcher"
-            classpath="${ant.library.dir}/ant-launcher.jar"
-            fork="true" failonerror="true">
-            <sysproperty key="ant.home" value="${ant.home}"/>
-            <sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
-            <sysproperty  key="com.hp.mw.sourceid" value="${com.hp.mw.sourceid}"/>
-            <arg value="-cp"/>
-            <arg value="${junit.jar}"/>
-            <arg value="-f"/>
-            <arg value="${ant.file}"/>
-            <arg value="@{target}"/>
-         </java>
-      </sequential>
-   </macrodef>
-
    <target name="help">
       <echo>
 Targets supported in this build.xml file
@@ -75,176 +38,66 @@
       </echo>
    </target>
 
-   <target name="jts">
-      <runant target="run_jts"/>
-   </target>
+    <macrodef name="install.macro">
+        <attribute name="src.module"/>
+        <sequential>
+            <delete dir="install"/>
+            <copy todir="install">
+                <fileset dir="@{src.module}/build/install"/>
+            </copy>
+        </sequential>
+    </macrodef>
 
-   <target name="jta">
-      <runant target="run_jta"/>
+   <target name="jts" depends="clean, antbuildsystem">
+       <ant dir="ArjunaJTS"/>
+       <install.macro src.module="ArjunaJTS"/>
+       <ant dir="qa"/>
    </target>
 
-   <target name="core">
-      <runant target="run_core"/>
+   <target name="jta" depends="clean, antbuildsystem">
+       <ant dir="ArjunaJTA"/>
+       <install.macro src.module="ArjunaJTA"/>
+       <ant dir="qa"/>
    </target>
 
-   <target name="jbossjts">
-      <runant target="run_jbossjts"/>
-      <runant target="install_jboss_tools"/>
+   <target name="core" depends="clean, antbuildsystem">
+       <ant dir="ArjunaCore"/>
+       <install.macro src.module="ArjunaCore"/>
    </target>
 
-   <target name="jbossjta">
-      <runant target="run_jbossjta"/>
-      <runant target="install_jboss_tools"/>
-   </target>
+    <macrodef name="atsinstall.macro">
+        <attribute name="build.type"/>
+        <sequential>
+            <copy file="atsintegration/build/install/lib/jbossatx.jar"
+                  tofile="install/lib/jboss@{build.type}-integration.jar"/>
+        </sequential>
+    </macrodef>
 
-   <target name="clean">
-      <runant target="run_clean"/>
+   <target name="jbossjts" depends="clean, init_integration, jts">
+       <ant dir="atsintegration" target="dist"/>
+       <atsinstall.macro build.type="jts"/>
    </target>
 
-   <target name="run_jts" if="jts.present">
-      <antcall target="install_jts"/>
+   <target name="jbossjta" depends="clean, init_integration, jta">
+       <ant dir="atsintegration" target="dist">
+           <property name="no_jts" value="true"/>
+       </ant>
+       <atsinstall.macro build.type="jta"/>
    </target>
 
-   <target name="run_jta" depends="install_jta"/>
+    <target name="antbuildsystem" depends="clean">
+        <ant dir="antbuildsystem"/>
+    </target>
 
-   <target name="run_core" depends="install_core"/>
-
-   <target name="run_jbossjts" if="jts.present" depends="init_integration, install_jts">
-      <antcall target="install_integration"/>
+   <target name="clean">
+       <ant dir="antbuildsystem" target="clean"/>
+       <ant dir="common" target="clean"/>
+       <ant dir="ArjunaCore" target="clean"/>
+       <ant dir="ArjunaJTA" target="clean"/>
+       <ant dir="ArjunaJTS" target="clean"/>
+       <ant dir="atsintegration" target="clean"/>
    </target>
 
-   <target name="run_jbossjta" depends="init_integration, install_jta, install_integration"/>
-
-   <target name="run_clean" depends="clean_jts">
-      <delete dir="${com.hp.mw.installationdirectory}"/>
-      <ant dir="${jta.dir}" target="clean"/>
-      <ant dir="${core.dir}" target="clean"/>
-      <ant dir="${common.dir}" target="clean"/>
-      <ant dir="${buildsystem.dir}" target="clean"/>
-      <ant dir="${integration.dir}" target="clean"/>
-      <delete>
-         <fileset dir="." includes="idl-compiler*"/>
-      </delete>
-   </target>
-
-   <target name="clean_jts" if="jts.present">
-      <ant dir="${jts.dir}" target="clean"/>
-   </target>
-
-   <target name="install_jts" depends="clean, init_jts, init, install_jta">
-      <ant dir="${jts.dir}" target="install-all"/>
-   </target>
-
-   <target name="install_jta" depends="clean, init_jta, init, install_core">
-      <ant dir="${jta.dir}" target="install-all"/>
-   </target>
-
-   <target name="install_core" depends="clean, init_core, init, build_common">
-      <ant dir="${core.dir}" target="install-all"/>
-      <copy file="${jboss.eula}" todir="${com.hp.mw.installationdirectory}"/>
-   </target>
-
-   <target name="install_integration">
-      <ant dir="${integration.dir}" target="install"/>
-      <copy todir="${jboss.install.libdir}">
-         <fileset dir="${jboss.libdir}"/>
-      </copy>
-   </target>
-
-   <target name="install_jboss_tools">
-      <ant dir="${jboss.tools.dir}" target="install_jboss_tools">
-          <property name="jboss.ts.tools.install.dir" value="${com.hp.mw.installationdirectory.bin}"/>
-      </ant>
-   </target>
-
-   <target name="build_jts" depends="init_jts, init, build_jta">
-      <ant dir="${jts.dir}" target="jar"/>
-   </target>
-
-   <target name="build_jta" depends="init_jta, init, build_core">
-      <ant dir="${jta.dir}" target="jar"/>
-   </target>
-
-   <target name="build_core" depends="init_core, init, build_common">
-      <ant dir="${core.dir}" target="jar"/>
-   </target>
-
-   <target name="build_common" depends="build_buildsystem">
-      <ant dir="${common.dir}" target="tests"/>
-   </target>
-
-   <target name="build_buildsystem">
-      <ant dir="${buildsystem.dir}" target="jar"/>
-   </target>
-
-   <target name="build_integration">
-      <ant dir="${integration.dir}" target="jar"/>
-   </target>
-
-   <target name="init_jts" unless="init_product">
-      <property name="com.hp.mw.ts.product.name" value="JBossJTS"/>
-      <property name="com.hp.mw.ts.product.shortened.name" value="JBossTS"/>
-      <property name="com.hp.mw.ts.product.name.lowercase" value="jbossjts"/>
-      <property name="com.hp.mw.ts.product.shortened.name.uppercase" value="JBOSSTS"/>
-      <property name="com.hp.mwlabs.ts.build.jts" value="true"/>
-      <path id="com.hp.mwlabs.ts.product.htdocs.path">
-         <dirset dir="${core.dir}" includes="*/classes"/>
-         <dirset dir="${jta.dir}" includes="*/classes"/>
-         <dirset dir="${jts.dir}" includes="*/classes"/>
-      </path>
-      <property name="com.hp.mwlabs.ts.product.htdocs.path" refid="com.hp.mwlabs.ts.product.htdocs.path"/>
-   </target>
-
-   <target name="init_jta" unless="init_product">
-      <property name="com.hp.mw.ts.product.name" value="JBossJTA"/>
-      <property name="com.hp.mw.ts.product.shortened.name" value="JBossTA"/>
-      <property name="com.hp.mw.ts.product.name.lowercase" value="jbossjta"/>
-      <property name="com.hp.mw.ts.product.shortened.name.uppercase" value="JBOSSTA"/>
-      <property name="com.hp.mwlabs.ts.build.jta" value="true"/>
-      <path id="com.hp.mwlabs.ts.product.htdocs.path">
-         <dirset dir="${core.dir}" includes="*/classes"/>
-         <dirset dir="${jta.dir}" includes="*/classes"/>
-      </path>
-      <property name="com.hp.mwlabs.ts.product.htdocs.path" refid="com.hp.mwlabs.ts.product.htdocs.path"/>
-   </target>
-
-   <target name="init_core" unless="init_product">
-      <property name="com.hp.mw.ts.product.name" value="JBossCore"/>
-      <property name="com.hp.mw.ts.product.shortened.name" value="JBossCore"/>
-      <property name="com.hp.mw.ts.product.name.lowercase" value="jbosscore"/>
-      <property name="com.hp.mw.ts.product.shortened.name.uppercase" value="JBOSSCORE"/>
-      <property name="com.hp.mwlabs.ts.build.core" value="true"/>
-      <path id="com.hp.mwlabs.ts.product.htdocs.path">
-         <dirset dir="${core.dir}" includes="*/classes"/>
-      </path>
-      <property name="com.hp.mwlabs.ts.product.htdocs.path" refid="com.hp.mwlabs.ts.product.htdocs.path"/>
-   </target>
-
-   <target name="init">
-      <property name="init_product" value="done"/>
-
-      <tstamp>
-         <format property="com.hp.mw.date" pattern="yyyy/MMM/dd HH:mm"/>
-      </tstamp>
-
-      <!-- starting from 4.6 we change from ${com.hp.mw.ts.product.name.lowercase}-properties.xml
-        to a common name of jbossts-properties.xml to facilitate using the JTS binaries for either
-        JTA or JTS. The actual content of the config file is not affected. -->
-      <property name="com.hp.mw.ts.product.propertyfile" value="jbossts-properties.xml"/>
-
-      <property name="com.hp.mw.version" value="unknown"/>
-
-      <property name="com.hp.mw.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-      <property name="com.hp.mw.notes" value=""/>
-
-      <echo message="Initialising product ${com.hp.mw.ts.product.name}"/>
-      <echo message="Source ID = ${com.hp.mw.sourceid}"/>
-      <echo message="Version   = ${com.hp.mw.version}"/>
-      <echo message="Builder   = ${com.hp.mw.builder}"/>
-      <echo message="Date      = ${com.hp.mw.date}"/>
-      <echo message="Notes     = ${com.hp.mw.notes}"/>
-   </target>
-
    <target name="init_integration">
       <condition property="jboss.home" value="${env.JBOSS_HOME}">
          <isset property="env.JBOSS_HOME"/>

Modified: labs/jbosstm/trunk/common/build.xml
===================================================================
--- labs/jbosstm/trunk/common/build.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/common/build.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -1,6 +1,6 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
   as indicated by the @author tags.
   See the copyright.txt in the distribution for a
   full listing of individual contributors.
@@ -15,336 +15,19 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
 
-  (C) 2005-2006,
-  @author JBoss Inc.
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
 -->
-<!--
+<project name="module-common" default="dist.leafnode" basedir=".">
 
-    Common Module containing:
+    <property name="modulename" value="common"/>
 
-    * PropertyManager
-    * Logging API
+    <import file="../sharedbuild.xml"/>
 
--->
-
-<project name="module-common" default="com.arjuna.common.build" basedir=".">
-    <!-- class path behaviour -->
-    <property name="build.sysclasspath" value="last"/>
-    <property name="com.hp.mwlabs.classpathbuilderfilename" location="buildsystem.classpath"/>
-
-    <!-- Set module name -->
-    <property name="com.arjuna.common.modulename" value="common"/>
-
-    <!-- Load Build Properties File -->
-    <property file="com.arjuna.common.properties"/>
-
-    <!-- Set external property defaults -->
-    <property name="com.hp.mw.ts.common.htdocs.internal" value="no"/>
-
-    <!-- Set internal property defaults -->
-    <!-- Path names -->
-	<property name="com.arjuna.buildsystem.dir" location="${buildsystem.dir}"/>
-	<property name="com.arjuna.buildsystem.build.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
-
-	<property name="com.arjuna.common.src" location="classes"/>
-	<property name="com.arjuna.common.etc" location="etc"/>
-    <property name="com.hp.mwlabs.ts.common.tests.src" location="tests/"/>
-
-    <property name="com.arjuna.common.destroot" location="build"/>
-    <property name="com.hp.mwlabs.ts.common.jar.dest" location="${com.arjuna.common.destroot}/lib"/>
-    <property name="com.hp.mwlabs.ts.common.dest" location="${com.arjuna.common.destroot}/classes"/>
-    <property name="com.hp.mwlabs.ts.common.htdocs.dest" value="${com.arjuna.common.destroot}/htdocs"/>
-    <property name="com.hp.mwlabs.ts.common.tests.dest" location="${com.arjuna.common.destroot}/tests"/>
-    <property name="com.hp.mwlabs.ts.common.reports.dest" location="${com.arjuna.common.destroot}/reports"/>
-    <property name="com.hp.mwlabs.ts.common.tests.destdir" location="${com.hp.mwlabs.ts.common.jar.dest}/tests/"/>
-
-
-    <property name="com.hp.mw.ts.common.tests.compile" value="yes"/>
-    <property name="com.hp.mw.ts.common.tests.install" value="no"/>
-
-    <property name="com.hp.mw.ts.common.log4j.compile" value="yes"/>
-    <property name="com.hp.mw.ts.common.csf.compile" value="yes"/>
-
-    <property name="com.hp.mwlabs.ts.common.resourcebundle" value="common_msg_en_US.properties"/>
-	<property name="com.hp.mwlabs.ts.common.tests.resourcebundle" value="TestLevels_en_US.properties"/>
-
-	<!-- Initialisation -->
-    <target name="com.hp.mwlabs.ts.common.init">
-        <!-- Define default build properties -->
-        <tstamp>
-            <format property="com.hp.mw.ts.common.date" pattern="yyyy/MMM/dd HH:mm"/>
-        </tstamp>
-        <property name="com.hp.mw.ts.common.installationdirectory" value="install"/>
-        <property name="com.hp.mw.ts.common.sourceid" value="unknown"/>
-        <property name="com.hp.mw.ts.common.version" value="unknown"/>
-        <property name="com.arjuna.common.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
-        <property name="com.hp.mw.ts.common.notes" value=""/>
-
-	<path id="com.arjuna.buildsystem.classpath">
-		<fileset dir="${com.arjuna.buildsystem.build.lib}"/>
-	</path>
-	<property name="com.arjuna.buildsystem.classpath" refid="com.arjuna.buildsystem.classpath"/>
-
-        <!-- Define classpath builder task -->
-        <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
-
-	<!-- Clear build classpath file and add all JARs within lib/ext/ -->
-	<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" clear="true">
-            <classpath>
-                <fileset dir="lib/ext/">
-                    <include name="**.jar"/>
-                    <include name="**.zip"/>
-                </fileset>
-            </classpath>
-        </classpath-builder>
-
-        <condition property="com.hp.mwlabs.ts.common.tests.compile">
-            <equals arg1="${com.hp.mw.ts.common.tests.compile}" arg2="yes"/>
-        </condition>
-
-        <condition property="com.hp.mwlabs.ts.common.tests.install">
-            <equals arg1="${com.hp.mw.ts.common.tests.install}" arg2="yes"/>
-        </condition>
-
-
-        <echo message="Initialising module common"/>
-        <echo message="Source ID = ${com.hp.mw.ts.common.sourceid}"/>
-        <echo message="Version   = ${com.hp.mw.ts.common.version}"/>
-        <echo message="Builder   = ${com.arjuna.common.builder}"/>
-        <echo message="Date      = ${com.hp.mw.ts.common.date}"/>
-        <echo message="Notes     = ${com.hp.mw.ts.common.notes}"/>
-
-        <!-- Installation directory -->
-        <property name="com.hp.mwlabs.ts.common.installationdirectory"
-            location="${com.hp.mw.ts.common.installationdirectory}"/>
-
-        <!-- Compile with debugging? -->
-        <condition property="com.hp.mwlabs.ts.common.debug" value="no">
-            <equals arg1="${com.hp.mw.ts.common.debug}" arg2="no"/>
-        </condition>
-        <property name="com.hp.mwlabs.ts.common.debug" value="yes"/>
-
-        <!-- Build htdocs for which package? -->
-        <property name="com.arjuna.common.htdocs.list" value="com.arjuna.common.logging.*"/>
-
-        <!-- Set the module property file details -->
-        <taskdef name="version-to-property" classname="com.hp.mw.buildsystem.ant.VersToProp" classpath="${com.arjuna.buildsystem.classpath}"/>
-        <version-to-property version="${com.hp.mw.ts.common.version}" property="com.hp.mwlabs.ts.common.propertyversion"/>
-
-        <property name="com.hp.mwlabs.ts.common.propertyfile" value="CommonLogging-properties.xml"/>
-        <property name="com.hp.mw.ts.common.propertydirectory" location="${com.hp.mwlabs.ts.common.installationdirectory}/etc"/>
-
-        <echo message="Property file name : ${com.hp.mwlabs.ts.common.propertyfile}"/>
-        <echo message="Property directory : ${com.hp.mw.ts.common.propertydirectory}"/>
-
-        <!-- Make the destination directories -->
-        <mkdir dir="${com.arjuna.common.destroot}"/>
-        <mkdir dir="${com.hp.mwlabs.ts.common.dest}"/>
+    <target name="run.tests">
+        <run.tests.macro>
+            <tests><fileset dir="tests" includes="**/TestLevels.java"/></tests>
+        </run.tests.macro>
     </target>
 
-    <target name="com.arjuna.common.build" depends="com.hp.mw.ts.common.jar, com.hp.mwlabs.ts.common.tests.jar, com.hp.mw.ts.common.htdocs"/>
-
-    <!-- Compilation targets -->
-    <target name="com.arjuna.common.compile" depends="com.hp.mwlabs.ts.common.init,com.hp.mwlabs.ts.common.generateresourcebundle">
-
-        <echo message="Compiling module"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-        <javac srcdir="${com.arjuna.common.src}"
-            destdir="${com.hp.mwlabs.ts.common.dest}"
-            classpath="${com.arjuna.common.src}"
-            excludes="${com.arjuna.common.compile.excludes}"
-            debug="${com.hp.mwlabs.ts.common.debug}"
-			deprecation="${com.hp.mw.deprecation}">
-            <classpath>
-                <path path="${build.classpath}"/>
-                <path path="${com.arjuna.common.src}"/>
-            </classpath>
-        </javac>
-
-		<touch file="${com.hp.mwlabs.ts.common.dest}/built_using_java_${java.specification.version}"/>
-
-		<!-- Process the properties -->
-    	<property name="property.file" value="common.properties"/>
-    	<propertyfile file="${com.hp.mwlabs.ts.common.dest}/${property.file}">
-            <entry key="MODULE" value="${com.arjuna.common.modulename}"/>
-            <entry key="SOURCEID" value="${com.hp.mw.ts.common.sourceid}"/>
-            <entry key="BUILDINFO" value="${com.arjuna.common.builder}"/>
-            <entry key="VERSION" value="${com.hp.mw.ts.common.version}"/>
-            <entry key="DATE" value="${com.hp.mw.ts.common.date}"/>
-            <entry key="NOTES" value="${com.hp.mw.ts.common.notes}"/>
-        </propertyfile>
-
-    </target>
-
-    <!-- Jar targets -->
-    <target name="com.hp.mw.ts.common.jar" depends="com.arjuna.common.compile, com.hp.mw.ts.common.htdocs">
-
-        <echo message="Building common jar file"/>
-
-        <mkdir dir="${com.hp.mwlabs.ts.common.jar.dest}"/>
-
-        <jar jarfile="${com.hp.mwlabs.ts.common.jar.dest}/jbossts-common.jar"
-            basedir="${com.hp.mwlabs.ts.common.dest}"/>
-
-        <jar jarfile="${com.hp.mwlabs.ts.common.jar.dest}/jbossts-common_jdocs.jar"
-            basedir="${com.hp.mwlabs.ts.common.htdocs.dest}"/>
-    </target>
-
-
-    <target name="com.hp.mw.ts.common.htdocs">
-        <echo message="Building htdocs "/>
-
-        <mkdir dir="${com.hp.mwlabs.ts.common.htdocs.dest}"/>
-
-        <javadoc sourcepath="${com.arjuna.common.src}"
-            packagenames="com.arjuna.common.*"
-            destdir="${com.hp.mwlabs.ts.common.htdocs.dest}"
-            failonerror="yes"
-            private="yes"
-            defaultexcludes="yes"
-            >
-        </javadoc>
-
-    </target>
-
-    <target name="com.hp.mw.ts.common.tests.compile" depends="com.hp.mw.ts.common.jar, com.hp.mwlabs.ts.common.tests.generateresourcebundle" if="com.hp.mwlabs.ts.common.tests.compile">
-
-        <echo message="Building tests"/>
-
-        <mkdir dir="${com.hp.mwlabs.ts.common.tests.dest}"/>
-        <!-- <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/> -->
-
-        <javac srcdir="${com.hp.mwlabs.ts.common.tests.src}"
-            destdir="${com.hp.mwlabs.ts.common.tests.dest}"
-            classpath="${com.hp.mwlabs.ts.common.tests.src}"
-            debug="${com.hp.mwlabs.ts.common.debug}">
-            <classpath>
-                <path location="${com.hp.mwlabs.ts.common.dest}"/>
-            </classpath>
-        </javac>
-
-    </target>
-
-    <target name="com.hp.mw.ts.common.tests.run" depends="com.hp.mw.ts.common.tests.compile" if="com.hp.mwlabs.ts.common.tests.compile">
-        <mkdir dir="${com.hp.mwlabs.ts.common.reports.dest}"/>
-        <junit printsummary="yes">
-            <formatter type="plain"/>
-            <classpath>
-                <pathelement location="${com.hp.mwlabs.ts.common.tests.dest}"/>
-                <path location="${com.hp.mwlabs.ts.common.dest}"/>
-                <pathelement path="${build.classpath}"/>
-                <pathelement location="etc"/>
-            </classpath>
-            <batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
-                todir="${com.hp.mwlabs.ts.common.reports.dest}">
-                <fileset dir="${com.hp.mwlabs.ts.common.tests.src}" includes="**/TestLevels.java"/>
-            </batchtest>
-        </junit>
-    </target>
-
-    <target name="com.hp.mwlabs.ts.common.tests.jar" depends="com.hp.mw.ts.common.tests.run" if="com.hp.mwlabs.ts.common.tests.compile">
-
-        <mkdir dir="${com.hp.mwlabs.ts.common.tests.destdir}"/>
-        <jar basedir="${com.hp.mwlabs.ts.common.tests.dest}"
-            jarfile="${com.hp.mwlabs.ts.common.tests.destdir}/${com.arjuna.common.modulename}_tests.jar"/>
-
-    </target>
-
-
-    <!-- Installation targets -->
-    <target name="com.hp.mw.ts.common.install" depends="com.arjuna.common.build, com.hp.mwlabs.ts.common.tests.install">
-
-        <echo message="Installation directory : ${com.hp.mwlabs.ts.common.installationdirectory}"/>
-
-        <echo message="Installing module common"/>
-
-        <echo message="Installing jar files"/>
-        <mkdir dir="${com.hp.mwlabs.ts.common.installationdirectory}/lib"/>
-        <copy
-            todir="${com.hp.mwlabs.ts.common.installationdirectory}/lib"
-            >
-            <fileset dir="${com.hp.mwlabs.ts.common.jar.dest}"/>
-        </copy>
-        <echo message="Installing htdocs"/>
-        <mkdir dir="${com.hp.mwlabs.ts.common.installationdirectory}/htdocs"/>
-        <copy
-            todir="${com.hp.mwlabs.ts.common.installationdirectory}/htdocs"
-            >
-            <fileset dir="${com.hp.mwlabs.ts.common.htdocs.dest}"/>
-        </copy>
-    </target>
-
-    <target name="com.hp.mwlabs.ts.common.tests.install" depends="com.hp.mwlabs.ts.common.tests.jar" if="com.hp.mwlabs.ts.common.tests.install">
-
-        <echo message="Installing tests"/>
-
-    </target>
-
-    <!-- Clean targets -->
-    <target name="com.hp.mw.ts.common.clean">
-        <echo message="Cleaning module"/>
-        <delete dir="${com.arjuna.common.destroot}"/>
-    </target>
-
-    <target name="com.hp.mwlabs.ts.common.generateresourcebundle">
-
-        <echo message="Generating Common Resource Bundle"/>
-
-        <classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-        <javadoc sourcepath="${com.arjuna.common.src}"
-            packagenames="com.arjuna.common.*"
-            failonerror="yes"
-            private="yes"
-            defaultexcludes="yes"
-            classpath="${build.classpath}">
-
-            <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-                <path>
-                    <pathelement path="${com.arjuna.buildsystem.classpath}"/>
-                </path>
-                <param name="-basedir" value="${com.hp.mwlabs.ts.common.dest}"/>
-                <param name="-resourcebundle" value="${com.hp.mwlabs.ts.common.resourcebundle}"/>
-                <param name="-appendkey" value="[]"/>
-            </doclet>
-        </javadoc>
-
-    </target>
-
-	<target name="com.hp.mwlabs.ts.common.tests.generateresourcebundle">
-
-		<echo message="Generating Common Tests Resource Bundle"/>
-
-		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
-
-		<javadoc sourcepath="${com.hp.mwlabs.ts.common.tests.src}"
-			packagenames="*"
-			failonerror="yes"
-			private="yes"
-			defaultexcludes="yes"
-			classpath="${build.classpath}">
-
-			<doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
-				<path>
-					<pathelement path="${com.arjuna.buildsystem.classpath}"/>
-				</path>
-				<param name="-basedir" value="${com.hp.mwlabs.ts.common.tests.dest}"/>
-				<param name="-resourcebundle" value="${com.hp.mwlabs.ts.common.tests.resourcebundle}"/>
-				<param name="-appendkey" value="[]"/>
-			</doclet>
-		</javadoc>
-
-	</target>
-
-
-
-	<!-- Short target names -->
-    <target name="compile" depends="com.arjuna.common.compile"/>
-    <target name="jar" depends="com.hp.mw.ts.common.jar"/>
-    <target name="tests" depends="com.arjuna.common.build"/>
-    <target name="clean" depends="com.hp.mw.ts.common.clean"/>
-    <target name="htdocs" depends="com.hp.mw.ts.common.htdocs"/>
-    <target name="install" depends="com.hp.mw.ts.common.install"/>
-</project>
+</project>
\ No newline at end of file

Modified: labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml
===================================================================
--- labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -82,7 +82,7 @@
 				<set name="ARJUNAJTS_HOME" value="build"/>
 
 			</sets>
-			<jvm id="1.5.0"/>
+			<jvm id="1.6.0"/>
 			<default-classpath name="main"/>
 			<node-exclusions/>
 		</node-configuration>

Modified: labs/jbosstm/trunk/qa/run-dtf-local.xml
===================================================================
--- labs/jbosstm/trunk/qa/run-dtf-local.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/qa/run-dtf-local.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -43,7 +43,7 @@
 
 	<path id="tests.classpath">
         <pathelement location="${working.dir}/qa/lib/TestingFramework.jar"/>
-        <pathelement location="${working.dir}/lib/ext/junit.jar"/>
+        <pathelement location="../ext/junit.jar"/>
         <pathelement location="ext/jdom.jar"/>
     </path>
 
@@ -322,9 +322,11 @@
     </target>
 
 
-    
+
     <target name="scratch">
 
+        <antcall target="junit-tests"><param name="tests" value="otsserver"/></antcall>
+
         <!-- mssql needs different .jar for jdk 1.5 vs. 1.6 runtime -->
         <!--<condition property="mssql.driver" value="sqljdbc4.jar">-->
             <!--<equals arg1="${java.specification.version}" arg2="1.6"/>-->

Modified: labs/jbosstm/trunk/qa/tests/build-jts.xml
===================================================================
--- labs/jbosstm/trunk/qa/tests/build-jts.xml	2009-06-29 15:39:59 UTC (rev 27295)
+++ labs/jbosstm/trunk/qa/tests/build-jts.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -73,9 +73,7 @@
 			<include name="jbossts-common.jar"/>
 			<include name="jta-1_1-classes.zip"/>
 		</fileset>
-		<fileset dir="${org.jboss.jbossts.qa.idlcompiler.lib}">
-			<include name="orbportability-ant.jar"/>
-		</fileset>
+		<pathelement location="../../ArjunaJTS/orbportability/config"/>
 		<fileset file="${org.jboss.jbossts.qa.server_manager_location}" />
         <pathelement path="${org.jboss.jbossts.qa.orb.classpath}"/>
 	</path>

Added: labs/jbosstm/trunk/sharedbuild.xml
===================================================================
--- labs/jbosstm/trunk/sharedbuild.xml	                        (rev 0)
+++ labs/jbosstm/trunk/sharedbuild.xml	2009-06-29 15:43:48 UTC (rev 27296)
@@ -0,0 +1,400 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2009, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+  MA  02110-1301, USA.
+
+  (C) 2009,
+  @author JBoss, a division of Red Hat.
+-->
+<project name="sharedbuild">
+
+    <property name="modulename" value="override-this-in-module-specific-files"/>
+
+    <!-- ############################# -->
+
+    <property name="debug" value="true"/>
+    <property name="deprecation" value="true"/>
+
+    <property name="build.dir" value="build"/>
+    <property name="src.dir" value="classes"/>
+    <property name="tests.dir" value="tests"/>
+    <property name="lib.dir" value="lib"/>
+    <property name="etc.dir" value="etc"/>
+
+    <dirname property="sharedbuild.base.dir" file="${ant.file.sharedbuild}" />
+    <property name="global.ext.lib.dir" value="${sharedbuild.base.dir}/ext"/>
+
+    <property name="global.ext.libs" value="none"/>
+    <property name="global.ext.test.libs" value="junit.jar"/>
+
+    <property name="excluded.classes" value=""/>
+    <property name="excluded.test.classes" value=""/>
+
+    <property name="mappingfile" value="${modulename}-properties.mappings"/>
+
+    <macrodef name="import-module.macro">
+        <attribute name="module"/>
+        <sequential>
+            <copy todir="${build.dir}/lib/ext" flatten="true">
+                <fileset dir="${sharedbuild.base.dir}" includes="**/${build.dir}/lib/@{module}.jar"/>
+            </copy>
+        </sequential>
+    </macrodef>
+
+
+    <taskdef resource="net/sf/antcontrib/antlib.xml">
+        <classpath>
+            <pathelement location="${sharedbuild.base.dir}/antbuildsystem/ant-contrib-1.0b3.jar"/>
+        </classpath>
+    </taskdef>
+
+
+    <target name="clean">
+        <delete dir="${build.dir}"/>
+
+        <property name="component-module-list" value=""/>
+        <for list="${component-module-list}" param="module">
+            <sequential>
+                <ant dir="@{module}" antfile="build.xml" inheritall="false" target="clean"/>
+            </sequential>
+        </for>
+    </target>
+
+    <target name="init">
+
+        <mkdir dir="${build.dir}"/>
+        <mkdir dir="${build.dir}/lib"/>
+        <mkdir dir="${build.dir}/lib/ext"/>
+
+    </target>
+
+    <target name="compile" depends="init">
+        <compile.macro/>
+    </target>
+
+    <macrodef name="compile.macro">
+
+        <attribute name="excluded.classes" default="${excluded.classes}"/>
+        <element name="additional.classpath" optional="true"/>
+        <element name="additional.src.dirs" optional="true"/>
+        <sequential>
+        <mkdir dir="${build.dir}/classes"/>
+        <property name="excludes.list" value="${excluded.classes}"/>
+        <javac srcdir="${src.dir}" destdir="${build.dir}/classes" debug="${debug}"
+               deprecation="${deprecation}" excludes="@{excluded.classes}" fork="true">
+            <classpath>
+                <fileset dir="${build.dir}/lib/ext/" includes="*"/>
+                <fileset dir="." includes="${lib.dir}/ext/*"/>
+                <fileset dir="${global.ext.lib.dir}" includes="${global.ext.libs}"/>
+                <additional.classpath/>
+            </classpath>
+            <additional.src.dirs/>
+        </javac>
+
+        <copy
+            file="${etc.dir}/${mappingfile}"
+            tofile="${build.dir}/classes/${mappingfile}"
+            failonerror="false"/>
+
+        <delete file="${build.dir}/lib/${modulename}.jar"/>
+        <jar jarfile="${build.dir}/lib/${modulename}.jar"
+             basedir="${build.dir}/classes"/>
+
+        </sequential>
+   </macrodef>
+
+    <target name="compile-tests" depends="compile">
+        <compile-tests.macro/>
+    </target>
+
+    <macrodef name="compile-tests.macro">
+
+        <element name="additional.classpath" optional="true"/>
+        <element name="additional.src.dirs" optional="true"/>
+        <sequential>
+        <mkdir dir="${build.dir}/tests"/>
+
+        <javac srcdir="${tests.dir}" destdir="${build.dir}/tests" debug="${debug}"
+               deprecation="${deprecation}" excludes="${excluded.test.classes}">
+            <classpath>
+                <pathelement location="${build.dir}/classes"/>
+                <fileset dir="${build.dir}/lib/ext/" includes="*"/>
+                <fileset dir="." includes="${lib.dir}/ext/*"/>
+                <fileset dir="${global.ext.lib.dir}" includes="${global.ext.libs}"/>
+                <fileset dir="${global.ext.lib.dir}" includes="${global.ext.test.libs}"/>
+                <additional.classpath/>
+            </classpath>
+            <additional.src.dirs/>
+        </javac>
+
+        <delete file="${build.dir}/lib/${modulename}_tests.jar"/>
+        <jar jarfile="${build.dir}/lib/${modulename}_tests.jar"
+            basedir="${build.dir}/tests"/>
+        </sequential>
+    </macrodef>
+
+    <target name="htdocs" depends="init">
+        <mkdir dir="${build.dir}/htdocs"/>
+
+        <javadoc sourcepath="${src.dir}"
+            packagenames="*"
+            destdir="${build.dir}/htdocs"
+            failonerror="yes"
+            private="yes"
+            defaultexcludes="yes">
+            <tag name="message" enabled="false"/>
+        </javadoc>
+
+        <delete file="${build.dir}/lib/${modulename}_jdocs.jar"/>
+        <jar jarfile="${build.dir}/lib/${modulename}_jdocs.jar"
+            basedir="${build.dir}/htdocs"/>
+    </target>
+
+    <macrodef name="generateresourcebundle.macro">
+
+        <element name="args" optional="true"/>
+        <sequential>
+        <javadoc sourcepath="${src.dir}"
+                 packagenames="*"
+                 failonerror="yes"
+                 private="yes"
+                 defaultexcludes="yes">
+
+            <doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
+                <path>
+                    <pathelement location="${sharedbuild.base.dir}/antbuildsystem/build/lib/buildsystem.jar"/>
+                </path>
+                <!-- force absolute path for -basedir or bad things happen -->
+                <param name="-basedir" value="${basedir}/${build.dir}/classes"/>
+                <param name="-resourcebundle" value="${modulename}_msg_en_US.properties"/>
+                <args/>
+            </doclet>
+
+        </javadoc>
+
+        <jar jarfile="${build.dir}/lib/${modulename}.jar" update="true">
+            <fileset dir="${build.dir}/classes/" includes="${modulename}_msg_en_US.properties"/>
+        </jar>
+
+        </sequential>
+
+    </macrodef>
+
+    <target name="generateresourcebundle" depends="init">
+        <generateresourcebundle.macro/>
+    </target>
+
+    <target name="propertyfile" depends="init">
+
+        <!-- Process the properties -->
+        <property name="property.file" value="${modulename}.properties"/>
+        <property name="buildproperty.modulename" value="${modulename}"/>
+        <property name="buildproperty.sourceid" value="unknown"/>
+        <property name="buildproperty.builder" value="JBoss Inc. [${user.name}] (${os.name} ${os.version})"/>
+        <property name="buildproperty.version" value="unknown"/>
+        <tstamp>
+            <format property="buildproperty.date" pattern="yyyy/MMM/dd HH:mm"/>
+        </tstamp>
+        <property name="buildproperty.notes" value=""/>
+
+        <propertyfile file="${build.dir}/classes/${property.file}">
+            <entry key="MODULE" value="${buildproperty.modulename}"/>
+            <entry key="SOURCEID" value="${buildproperty.sourceid}"/>
+            <entry key="BUILDINFO" value="${buildproperty.builder}"/>
+            <entry key="VERSION" value="${buildproperty.version}"/>
+            <entry key="DATE" value="${buildproperty.date}"/>
+            <entry key="NOTES" value="${buildproperty.notes}"/>
+            <entry key="PROPERTIES_FILE" value="jbossts-properties.xml"/>
+        </propertyfile>
+
+        <jar jarfile="${build.dir}/lib/${modulename}.jar" update="true">
+            <fileset dir="${build.dir}/classes/" includes="${property.file}"/>
+        </jar>
+    </target>
+
+    <target name="install.ext.libs">
+
+        <property name="dest.dir" value="${build.dir}"/>
+
+        <copy todir="${dest.dir}/install/lib/ext">
+            <filelist dir="${global.ext.lib.dir}" files="${global.ext.libs}"/>
+        </copy>
+
+        <copy todir="${dest.dir}/install/lib/ext" failonerror="false">
+            <fileset dir="lib/ext"/>
+        </copy>
+
+    </target>
+
+
+    <target name="dist.leafnode" depends="clean, init, compile, compile-tests, generateresourcebundle, propertyfile, run.tests">
+    </target>
+
+    <target name="dist.compositenode" depends="clean, init, install.lib, htdocs">
+        <copy file="copyright.txt" todir="${build.dir}/install"/>
+        <copy file="${sharedbuild.base.dir}/JBossORG-EULA.txt" todir="${build.dir}/install"/>
+        <copy file="${global.ext.lib.dir}/third_party_licenses.txt" todir="${build.dir}/install/lib/ext"/>
+    </target>
+
+
+    <target name="install.lib">
+        <for list="${component-module-list}" param="module">
+            <sequential>
+                <ant dir="@{module}" antfile="build.xml" inheritall="false"/>
+            </sequential>
+        </for>
+
+        <delete file="${build.dir}/lib/${modulename}.jar"/>
+        <touch file="${build.dir}/built_using_java_${java.specification.version}"/>
+
+        <jar jarfile="${build.dir}/lib/${modulename}.jar">
+            <fileset dir="${build.dir}" includes="built_using*"/>
+        </jar>
+
+        <for list="${component-module-list}" param="module">
+            <sequential>
+                <jar destfile="${build.dir}/lib/${modulename}.jar" update="true">
+                    <fileset dir="@{module}/${build.dir}/classes"/>
+                </jar>
+            </sequential>
+        </for>
+
+        <mkdir dir="${build.dir}/install"/>
+        <mkdir dir="${build.dir}/install/lib"/>
+        <mkdir dir="${build.dir}/install/lib/ext"/>
+        <copy todir="${build.dir}/install/lib" file="${build.dir}/lib/${modulename}.jar"/>
+        <copy todir="${build.dir}/install/lib">
+            <fileset dir="${build.dir}" includes="built_using*"/>
+        </copy>
+
+        <for list="${component-module-list}" param="module">
+            <sequential>
+                <ant dir="@{module}" antfile="build.xml" inheritall="false" target="install.ext.libs">
+                    <property name="dest.dir" value="${basedir}/${build.dir}"/>
+                </ant>
+
+            </sequential>
+        </for>
+
+    </target>
+
+
+    <macrodef name="htdocs.composite.macro">
+
+        <element name="packagesets"/>
+        <sequential>
+    	<javadoc sourcepath="*/classes" destdir="${build.dir}/install/htdocs" private="no">
+
+            <packagesets/>
+
+            <classpath>
+                <fileset dir="${build.dir}/install/lib"/>
+                <fileset dir="${build.dir}/install/lib/ext"/>
+                <fileset dir="${build.dir}/lib"/>
+                <fileset dir="${build.dir}/lib/ext"/>
+            </classpath>
+            <tag name="message" enabled="false"/>
+		</javadoc>
+        </sequential>
+    </macrodef>
+
+
+    <macrodef name="install.services.files.macro">
+
+        <attribute name="modulename"/>
+        <attribute name="services.dest.dir"/>
+        <attribute name="productname"/>
+
+        <sequential>
+        <copy todir="@{services.dest.dir}/config" filtering="on" overwrite="yes">
+            <fileset dir="@{modulename}/services/config">
+                <include name="*.conf"/>
+                <include name="*.properties"/>
+                <include name="*.xml"/>
+            </fileset>
+            <filterset>
+                <filter token="PRODUCT_NAME" value="@{productname}"/>
+            </filterset>
+        </copy>
+
+        <!-- Create copy of unix scripts for each *NIX platform -->
+        <mkdir dir="@{services.dest.dir}/bin/hpux"/>
+
+        <copy todir="@{services.dest.dir}/bin/hpux/">
+            <fileset dir="@{modulename}/services/scripts/unix">
+                <include name="**/*.*"/>
+            </fileset>
+        </copy>
+
+        <mkdir dir="@{services.dest.dir}/bin/solaris"/>
+        <copy todir="@{services.dest.dir}/bin/solaris/">
+            <fileset dir="@{modulename}/services/scripts/unix">
+                <include name="**/*.*"/>
+            </fileset>
+        </copy>
+
+        <mkdir dir="@{services.dest.dir}/bin/linux"/>
+        <copy todir="@{services.dest.dir}/bin/linux/">
+            <fileset dir="@{modulename}/services/scripts/unix">
+                <include name="**/*.*"/>
+            </fileset>
+        </copy>
+
+        <mkdir dir="@{services.dest.dir}/bin/windows"/>
+        <copy todir="@{services.dest.dir}/bin/windows/">
+            <fileset dir="@{modulename}/services/scripts/windows">
+                <include name="**/*.*"/>
+            </fileset>
+        </copy>
+        </sequential>
+
+    </macrodef>
+
+    <target name="run.tests"/>
+
+    <macrodef name="run.tests.macro">
+
+        <element name="tests"/>
+        <element name="additional.classpath" optional="true"/>
+
+        <sequential>
+
+        <echo file="${build.dir}/tests/jbossts-properties.xml"
+                message="&lt;properties/&gt;"/>
+
+        <mkdir dir="${build.dir}/testresults"/>
+        <junit printsummary="yes" fork="yes" dir="${build.dir}">
+            <formatter type="plain"/>
+            <classpath>
+                <pathelement location="etc"/>
+                <pathelement location="${build.dir}/classes/"/>
+                <pathelement location="${build.dir}/tests/"/>
+                <fileset dir="${build.dir}/lib/ext/" includes="*"/>
+                <fileset dir="${basedir}" includes="${lib.dir}/ext/*"/>
+                <fileset dir="${global.ext.lib.dir}" includes="${global.ext.libs}"/>
+                <fileset dir="${global.ext.lib.dir}" includes="${global.ext.test.libs}"/>
+                <fileset dir="${global.ext.lib.dir}" includes="commons-logging-1.1.jar,log4j*"/>
+                <additional.classpath/>
+            </classpath>
+
+            <batchtest haltonerror="yes" haltonfailure="yes" fork="yes" todir="${build.dir}/testresults">
+                <tests/>
+            </batchtest>
+        </junit>
+        </sequential>
+
+    </macrodef>
+
+</project>
\ No newline at end of file




More information about the jboss-svn-commits mailing list