[jboss-svn-commits] JBL Code SVN: r31084 - in labs/jbosstm/trunk: ArjunaCore/tsmx and 8 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jan 14 06:42:58 EST 2010
Author: jhalliday
Date: 2010-01-14 06:42:58 -0500 (Thu, 14 Jan 2010)
New Revision: 31084
Added:
labs/jbosstm/trunk/maven/build.xml
Modified:
labs/jbosstm/trunk/ArjunaCore/tsmx/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/jtax/build.xml
labs/jbosstm/trunk/atsintegration/build.xml
labs/jbosstm/trunk/build.xml
labs/jbosstm/trunk/common/build.xml
labs/jbosstm/trunk/maven/pom-template.xml
labs/jbosstm/trunk/qa/tests/build-core.xml
labs/jbosstm/trunk/qa/tests/build-jta.xml
labs/jbosstm/trunk/qa/tests/build-jts.xml
labs/jbosstm/trunk/sharedbuild.xml
Log:
Update build system to use maven for dependency management. JBTM-687
Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -45,7 +45,7 @@
<compile.macro>
<additional.classpath>
- <fileset dir="${global.ext.lib.dir}" includes="jta-1_1-classes.zip"/>
+ <fileset dir="${global.ext.lib.dir}" includes="jta.jar"/>
</additional.classpath>
<additional.src.dirs>
<src location="bin"/>
Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -24,7 +24,7 @@
<property name="excluded.classes" value="**/*JDBC3.java"/>
- <property name="global.ext.libs" value="jta-1_1-classes.zip"/>
+ <property name="global.ext.libs" value="jta.jar"/>
<import file="../../sharedbuild.xml"/>
Modified: labs/jbosstm/trunk/ArjunaJTA/jta/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -22,7 +22,7 @@
<property name="modulename" value="jta"/>
- <property name="global.ext.libs" value="jta-1_1-classes.zip,connector-api.jar"/>
+ <property name="global.ext.libs" value="jta.jar,jboss-jca-api.jar"/>
<import file="../../sharedbuild.xml"/>
Modified: labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/ArjunaJTA/tsmx/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -43,7 +43,7 @@
<mkdir dir="${basedir}/${src.dir}"/>
<compile.macro>
<additional.classpath>
- <fileset dir="${global.ext.lib.dir}" includes="jta-1_1-classes.zip"/>
+ <fileset dir="${global.ext.lib.dir}" includes="jta.jar"/>
<fileset dir="${install.dir}" includes="${modulename}-tools.jar"/>
<fileset dir="${install.dir}" includes="${modulename}-objectstorebrowser.jar"/>
</additional.classpath>
Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -22,7 +22,7 @@
<property name="modulename" value="jtax"/>
- <property name="global.ext.libs" value="jta-1_1-classes.zip,connector-api.jar"/>
+ <property name="global.ext.libs" value="jta.jar,jboss-jca-api.jar"/>
<import file="../sharedbuild.xml"/>
Modified: labs/jbosstm/trunk/atsintegration/build.xml
===================================================================
--- labs/jbosstm/trunk/atsintegration/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/atsintegration/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -22,7 +22,7 @@
<property name="modulename" value="jbossatx"/>
- <property name="global.ext.libs" value="jta-1_1-classes.zip,connector-api.jar"/>
+ <property name="global.ext.libs" value="jta.jar,jboss-jca-api.jar"/>
<property name="component-module-list" value="../atsintegration"/>
@@ -63,10 +63,14 @@
<compile.macro excluded.classes="${exclude-these-classes}">
<additional.classpath>
- <!-- jboss-logmanager.jar for linking the CLF integration code. -->
- <fileset dir="${env.JBOSS_HOME}/lib" includes="jboss-logmanager.jar"/>
- <!-- jboss-integration.jar has the transactions SPI jbosssx has security (needed for recovery module only) -->
- <fileset dir="${env.JBOSS_HOME}/common/lib" includes="jboss-integration.jar jbosssx.jar"/>
+ <fileset dir="${global.ext.lib.dir}">
+ <!-- jboss-logmanager.jar for linking the CLF integration code. -->
+ <include name="jboss-logmanager.jar"/>
+ <include name="jboss-transaction-spi.jar"/>
+ <include name="jboss-corba-ots-spi.jar"/>
+ <!-- jbosssx has security (needed for recovery module only) -->
+ <include name="jbosssx.jar"/>
+ </fileset>
</additional.classpath>
</compile.macro>
@@ -77,8 +81,4 @@
<target name="dist" depends="install.lib"/>
-
-
-
-
</project>
\ No newline at end of file
Modified: labs/jbosstm/trunk/build.xml
===================================================================
--- labs/jbosstm/trunk/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -29,8 +29,8 @@
<property environment="env"/>
- <!-- TODO wire me up -->
- <property name="com.hp.mw.sourceid" value="unknown"/>
+ <!-- use 'standalone' or 'maven' -->
+ <property name="dependency.handling" value="maven"/>
<target name="help">
<echo>
@@ -54,19 +54,19 @@
</sequential>
</macrodef>
- <target name="jts" depends="clean, antbuildsystem">
+ <target name="jts" depends="clean, init_dependencies, antbuildsystem">
<ant dir="ArjunaJTS"/>
<install.macro src.module="ArjunaJTS"/>
<ant dir="qa"/>
</target>
- <target name="jta" depends="clean, antbuildsystem">
+ <target name="jta" depends="clean, init_dependencies, antbuildsystem">
<ant dir="ArjunaJTA"/>
<install.macro src.module="ArjunaJTA"/>
<ant dir="qa"/>
</target>
- <target name="core" depends="clean, antbuildsystem">
+ <target name="core" depends="clean, init_dependencies, antbuildsystem">
<ant dir="ArjunaCore"/>
<install.macro src.module="ArjunaCore"/>
<ant dir="qa"/>
@@ -110,17 +110,36 @@
</if>
<ant dir="atsintegration" target="clean"/>
+
+ <delete dir="build"/>
</target>
<target name="init_integration">
- <condition property="jboss.home" value="${env.JBOSS_HOME}">
- <isset property="env.JBOSS_HOME"/>
- </condition>
+ <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>
+ <if>
+ <equals arg1="${dependency.handling}" arg2="standalone"/>
+ <then>
+ <fail unless="jboss.home">
+ The JBoss installation directory must be specified with the JBOSS_HOME environment variable or the jboss.home property.
+ </fail>
+ </then>
+ </if>
+
</target>
+
+ <target name="init_dependencies">
+ <ant dir="maven" target="${dependency.handling}"/>
+ <if>
+ <isset property="jboss.home"/>
+ <then>
+ <ant dir="maven" target="standalone-atsintegration"/>
+ </then>
+ </if>
+ </target>
+
</project>
Modified: labs/jbosstm/trunk/common/build.xml
===================================================================
--- labs/jbosstm/trunk/common/build.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/common/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -22,7 +22,7 @@
<property name="modulename" value="common"/>
- <property name="global.ext.libs" value="commons-logging-1.1.jar log4j-1.2.14.jar"/>
+ <property name="global.ext.libs" value="commons-logging.jar log4j.jar"/>
<import file="../sharedbuild.xml"/>
Added: labs/jbosstm/trunk/maven/build.xml
===================================================================
--- labs/jbosstm/trunk/maven/build.xml (rev 0)
+++ labs/jbosstm/trunk/maven/build.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -0,0 +1,127 @@
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2010, Red Hat, Inc. and/or its affiliates,
+ 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) 2010,
+ @author JBoss, by Red Hat.
+-->
+<!--
+ JBossTS is built using ant. Historically most 3rd party dependencies lived in svn
+ in dir 'ext' to allow for offline builds and strong versioning. Building the JBossAS
+ integration code required a copy of JBossAS via the JBOSS_HOME env var.
+
+ Starting with 4.10 the build can use maven for dependency management whilst still
+ using ant for the main build. This helps us play nice in a maven ecosystem. The top
+ level build script calls one or other method in this file to install the dependencies
+ into build/extlib. In standalone mode they are copied from ext. In maven mode they are
+ pulled from the repository. In either case build scripts use the maven names without
+ versions to minimise the updating that is needed.
+
+ Caution: Deprecation. At some point the standalone method of building will go away.
+-->
+<project name="JBossTS Dependency Management" default="maven" basedir=".">
+ <description>
+ Utility functions for build time 3rd party dependency processing.
+ </description>
+
+ <property name="ext.lib.src" value="../ext"/>
+ <property name="ext.lib.dest" value="../build/extlib"/>
+
+ <property name="groupid" value="jboss.jbossts"/>
+ <property name="artifact" value="jbossts-build"/>
+ <property name="version" value="unknown"/>
+
+ <target name="maven">
+ <!-- munge the pom template into an actual pom, then use it to install
+ the dependencies into the dir where the build looks for them -->
+
+ <delete dir="${ext.lib.dest}"/>
+ <mkdir dir="${ext.lib.dest}"/>
+
+ <copy file="pom-template.xml"
+ tofile="pom.xml"
+ filtering="true"
+ overwrite="true">
+ <filterset>
+ <filter token="groupid" value="${groupid}"/>
+ <filter token="artifact" value="${artifact}"/>
+ <filter token="version" value="${version}"/>
+ <filter token="packaging" value="jar"/>
+ <filter token="extdir" value="../build/extlib"/>
+ </filterset>
+ </copy>
+
+ <exec executable="mvn" dir="${basedir}">
+ <arg value="dependency:copy-dependencies"/>
+ </exec>
+
+ <copy todir="${ext.lib.dest}" overwrite="true">
+ <fileset dir="${ext.lib.src}">
+ <include name="third_party_licenses.txt"/>
+ <!-- we need a patched version of emma, see JBTM-682 -->
+ <include name="emma.jar"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="standalone">
+
+ <delete dir="${ext.lib.dest}"/>
+ <mkdir dir="${ext.lib.dest}"/>
+
+ <!-- jars that match the maven naming pattern can be copied directly -->
+ <copy todir="${ext.lib.dest}">
+ <fileset dir="${ext.lib.src}">
+ <include name="byteman.jar"/>
+ <include name="emma.jar"/>
+ <include name="emma_ant.jar"/>
+ <include name="wrapper.jar"/>
+ <include name="third_party_licenses.txt"/>
+ </fileset>
+ </copy>
+
+ <!-- jars that don't match maven naming need to be renamed or the build scripts choke.
+ Note: this is a kludge. But you knew that already. -->
+
+ <copy file="${ext.lib.src}/jta-1_1-classes.zip" tofile="${ext.lib.dest}/jta.jar"/>
+ <copy file="${ext.lib.src}/connector-api.jar" tofile="${ext.lib.dest}/jboss-jca-api.jar"/>
+ <copy file="${ext.lib.src}/junit-4.6.jar" tofile="${ext.lib.dest}/junit.jar"/>
+ <copy file="${ext.lib.src}/log4j-1.2.14.jar" tofile="${ext.lib.dest}/log4j.jar"/>
+ <copy file="${ext.lib.src}/commons-logging-1.1.jar" tofile="${ext.lib.dest}/commons-logging.jar"/>
+
+ </target>
+
+ <target name="standalone-atsintegration">
+
+ <!-- in legacy JBOSS_HOME mode we pull the pre-reqs for atsintegration
+ from our local copy of JBossAS rather than from maven -->
+
+ <copy file="${env.JBOSS_HOME}/common/lib/jboss-integration.jar"
+ tofile="${ext.lib.dest}/jboss-transaction-spi.jar"/>
+
+ <copy todir="${ext.lib.dest}">
+ <fileset dir="${env.JBOSS_HOME}/lib">
+ <include name="jboss-logmanager.jar"/>
+ </fileset>
+ <fileset dir="${env.JBOSS_HOME}/common/lib">
+ <include name="jbosssx.jar"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+</project>
Modified: labs/jbosstm/trunk/maven/pom-template.xml
===================================================================
--- labs/jbosstm/trunk/maven/pom-template.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/maven/pom-template.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -143,4 +143,126 @@
</repository>
</repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+
+ <configuration>
+ <outputDirectory>@extdir@</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <excludeTransitive>true</excludeTransitive>
+ <stripVersion>true</stripVersion>
+ </configuration>
+
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <!-- combined deps for the entire JBossTS. At some point we need to modularize this for different builds -->
+
+ <!-- 'common' module builds against commons-logging and at runtime uses commons-logging+log4j as
+ the default log config. Neither are required at runtime if using certain non-default logger settings -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+
+
+ <!-- JTA (local: ArjunaJTA/jta and remote: ArjunaJTS/jtax) need JTA and JCA (for tx inflow) apis. -->
+
+ <dependency>
+ <!-- switch to http://repository.jboss.com/maven2/org/jboss/javaee/jboss-transaction-api/
+ when it becomes available. -->
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ <version>1.5.0.GA</version>
+ </dependency>
+
+ <!-- unit tests use junit4 and some use byteman -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.6</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.byteman</groupId>
+ <artifactId>byteman</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- build system uses emma for code coverage metrics -->
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma_ant</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+
+ <!-- installation as a service requires the wrapper, but is an optional deployment model -->
+ <dependency>
+ <groupId>tanukisoft</groupId>
+ <artifactId>wrapper</artifactId>
+ <version>3.2.3</version>
+ </dependency>
+
+
+ <!-- atsintegration (i.e. the JBossAS glue code) requires some app server bits.
+ TODO versions for these (and maybe other deps too) should really come
+ from the JBossAS component-matrix/pom.xml i.e.
+ http://repository.jboss.com/maven2/org/jboss/jbossas/jboss-as-component-matrix/
+ rather than be hardcoded here -->
+
+ <dependency>
+ <groupId>org.jboss.logmanager</groupId>
+ <artifactId>jboss-logmanager</artifactId>
+ <version>1.1.1.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <version>5.1.0.SP1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-corba-ots-spi</artifactId>
+ <version>5.1.0.SP1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx</artifactId>
+ <version>2.1.0.20091223</version>
+ </dependency>
+
+ </dependencies>
+
</project>
\ No newline at end of file
Modified: labs/jbosstm/trunk/qa/tests/build-core.xml
===================================================================
--- labs/jbosstm/trunk/qa/tests/build-core.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/qa/tests/build-core.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -32,7 +32,7 @@
<fileset dir="${org.jboss.jbossts.qa.ts.home}/lib/">
<include name="arjunacore.jar"/>
</fileset>
- <pathelement location="../../ext/junit-4.6.jar"/>
+ <fileset dir="../../build/extlib" includes="junit.jar"/>
<pathelement location="../ext/jboss-profiler-jvmti.jar"/>
</path>
Modified: labs/jbosstm/trunk/qa/tests/build-jta.xml
===================================================================
--- labs/jbosstm/trunk/qa/tests/build-jta.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/qa/tests/build-jta.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -40,9 +40,9 @@
<include name="jbossjta.jar"/>
</fileset>
<fileset dir="${org.jboss.jbossts.qa.ts.home}/lib/ext">
- <include name="jta-1_1-classes.zip"/>
+ <include name="jta.jar"/>
</fileset>
- <pathelement location="../../ext/junit-4.6.jar"/>
+ <fileset dir="../../build/extlib" includes="junit.jar"/>
<pathelement location="../ext/jboss-profiler-jvmti.jar"/>
<fileset file="${org.jboss.jbossts.qa.server_manager_location}" />
Modified: labs/jbosstm/trunk/qa/tests/build-jts.xml
===================================================================
--- labs/jbosstm/trunk/qa/tests/build-jts.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/qa/tests/build-jts.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -51,12 +51,12 @@
<include name="jbossjts-${org.jboss.jbossts.qa.orb.name.short}.jar"/>
</fileset>
<fileset dir="${org.jboss.jbossts.qa.ts.home}/lib/ext">
- <include name="jta-1_1-classes.zip"/>
+ <include name="jta.jar"/>
</fileset>
<pathelement location="../../ArjunaJTS/orbportability/config"/>
<fileset file="${org.jboss.jbossts.qa.server_manager_location}" />
<pathelement path="${org.jboss.jbossts.qa.orb.classpath}"/>
- <pathelement location="../../ext/junit-4.6.jar"/>
+ <fileset dir="../../build/extlib" includes="junit.jar"/>
<pathelement location="../ext/jboss-profiler-jvmti.jar"/>
</path>
Modified: labs/jbosstm/trunk/sharedbuild.xml
===================================================================
--- labs/jbosstm/trunk/sharedbuild.xml 2010-01-14 10:45:57 UTC (rev 31083)
+++ labs/jbosstm/trunk/sharedbuild.xml 2010-01-14 11:42:58 UTC (rev 31084)
@@ -37,10 +37,11 @@
<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"/>
+ <!-- build/extlib is populated by maven/build.xml via /build.xml target init_dependencies -->
+ <property name="global.ext.lib.dir" value="${sharedbuild.base.dir}/build/extlib"/>
<property name="global.ext.libs" value="none"/>
- <property name="global.ext.test.libs" value="junit-4.6.jar"/>
+ <property name="global.ext.test.libs" value="junit.jar"/>
<property name="excluded.classes" value=""/>
<property name="excluded.test.classes" value=""/>
@@ -498,7 +499,7 @@
<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*"/>
+ <fileset dir="${global.ext.lib.dir}" includes="commons-logging.jar,log4j.jar"/>
<additional.classpath.aux/>
<path refid="emma.lib" />
</classpath>
More information about the jboss-svn-commits
mailing list