[Jboss-cvs] JBoss Messaging SVN: r1028 - in trunk: . lib tests tests/bin tests/lib tools tools/etc tools/etc/buildmagic tools/etc/jbossbuild tools/lib

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 1 14:14:39 EDT 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-08-01 14:12:23 -0400 (Tue, 01 Aug 2006)
New Revision: 1028

Added:
   trunk/build-messaging.xml
   trunk/build-thirdparty.xml
   trunk/lib/
   trunk/lib/README.txt
   trunk/lib/jboss-j2ee.jar
   trunk/lib/jboss-j2se.jar
   trunk/lib/jboss-jmx.jar
   trunk/lib/jboss-remoting.jar
   trunk/lib/jboss-system.jar
   trunk/lib/jboss-transaction.jar
   trunk/lib/jboss.jar
   trunk/lib/jbosssx.jar
   trunk/lib/jnp-client.jar
   trunk/tests/lib/
   trunk/tests/lib/jboss-common-jdbc-wrapper.jar
   trunk/tests/lib/jboss-jca.jar
   trunk/tests/lib/jboss-local-jdbc.jar
   trunk/tests/lib/jboss-mbeans.jar
   trunk/tests/lib/jms-ra.jar
   trunk/tests/lib/mysql-connector-java-3.1.13-bin.jar
   trunk/tools/
   trunk/tools/etc/
   trunk/tools/etc/buildmagic/
   trunk/tools/etc/buildmagic/aliases.ent
   trunk/tools/etc/jbossbuild/
   trunk/tools/etc/jbossbuild/jbossbuild.properties
   trunk/tools/etc/jbossbuild/tasks.xml
   trunk/tools/lib/
   trunk/tools/lib/jbossbuild.jar
Removed:
   trunk/.cvsignore
   trunk/component-info.xml
   trunk/jbossbuild.xml
   trunk/tests/.cvsignore
   trunk/tests/bin/.cvsignore
Modified:
   trunk/build.xml
   trunk/tests/bin/runtest
   trunk/tests/build.sh
   trunk/tests/build.xml
Log:
The first check in of the new jbossbuild build system

Deleted: trunk/.cvsignore
===================================================================
--- trunk/.cvsignore	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/.cvsignore	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,2 +0,0 @@
-output
-*.iml

Added: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/build-messaging.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -0,0 +1,719 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
+]>
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- JBoss, Home of Professional Open Source                                                     -->
+<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
+<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
+<!-- full listing of individual contributors.                                                    -->
+<!--                                                                                             -->
+<!-- This is free software; you can redistribute it and/or modify it                             -->
+<!-- under the terms of the GNU Lesser General Public License as                                 -->
+<!-- published by the Free Software Foundation; either version 2.1 of                            -->
+<!-- the License, or (at your option) any later version.                                         -->
+<!--                                                                                             -->
+<!-- This software is distributed in the hope that it will be useful,                            -->
+<!-- but WITHOUT ANY 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 along with this software; if not, write to the Free                                 -->
+<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
+<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- $Id$ -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+
+<project default="compile" name="JBoss Messaging">
+
+   <!-- ======================================================================================== -->
+   <!-- Configuration                                                                            -->
+   <!-- ======================================================================================== -->
+
+   <!--
+        Module name(s) & version.
+   -->
+
+   <property name="messaging.version.major" value="1"/>
+   <property name="messaging.version.minor" value="0"/>
+   <property name="messaging.version.revision" value="1"/>
+   <property name="messaging.version.incrementing" value="5"/>
+   <property name="messaging.version.tag" value="CR4"/>
+   <property name="messaging.version.name" value=""/>
+   <property name="messaging.version.cvstag" value="JBossMessaging_1_0_1_CR4"/>
+   <property name="module.name" value="messaging"/>
+   <property name="module.Name" value="JBoss Messaging"/>
+   <property name="module.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
+
+   <property name="jms.version.major" value="1"/>
+   <property name="jms.version.minor" value="1"/>
+   <property name="jms.version" value="1.1"/>
+
+   <!--
+        Jar manifest version information.
+    -->
+
+   <tstamp>
+     <format property="build.number" pattern="yyyyMMddHHmm"/>
+   </tstamp>
+
+   <property name="messaging.specification.title" value="${module.Name}"/>
+   <property name="messaging.specification.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
+   <property name="messaging.specification.vendor" value="JBoss (http://www.jboss.org/)"/>
+
+   <property name="messaging.implementation.title" value="${module.Name}"/>
+   <property name="messaging.implementation.url" value="http://www.jboss.org/"/>
+   <property name="messaging.implementation.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag} (build: CVSTag=${messaging.version.cvstag} date=${build.number})"/>
+   <property name="messaging.implementation.vendor" value="JBoss Inc."/>
+   <property name="messaging.implementation.vendor.id" value="${messaging.implementation.url}"/>
+
+   <property environment="ENV"/>
+
+   <!--
+        Project paths.
+   -->
+
+   <property name="project.root" value="${basedir}"/>
+   <property name="project.source" value="${project.root}/src"/>
+   <property name="source.java" value="${project.source}/main"/>
+   <property name="source.etc" value="${project.source}/etc"/>
+   <property name="project.output" value="${project.root}/output"/>
+   <property name="build.classes" value="${project.output}/classes"/>
+   <property name="build.lib" value="${project.output}/lib"/>
+   <property name="build.api" value="${project.output}/api"/>
+   <property name="build.etc" value="${project.output}/etc"/>
+   <property name="build.bin" value="${project.output}/bin"/>
+   <property name="build.docs" value="${project.output}/docs"/>
+   <property name="build.parsers" value="${project.output}/gen-parsers"/>
+   <property name="build.resources" value="${project.output}/resources"/>
+   <property name="build.examples" value="${project.output}/examples"/>
+   <property name="build.reports" value="${project.output}/reports"/>
+   <property name="build.gen" value="${project.output}/gen"/>
+   <property name="build.gen-src" value="${project.output}/gen-src"/>
+   <property name="build.todo" value="${project.output}/todo"/>
+   <property name="build.jar" value="${project.output}/jar"/>
+   <property name="build.scoped-sar" value="${project.output}/scoped-sar"/>
+   <property name="project.thirdparty" value="${project.root}/thirdparty"/>
+   <property name="release.output" value="${project.root}/release/jboss-messaging-${module.version}"/>
+
+   <!-- ======================================================================================== -->
+   <!-- Thirdparty Dependency Definitions                                                        -->
+   <!-- ======================================================================================== -->
+
+   &libraries;
+
+   <!--
+       This module is based on Java 1.4
+   -->
+
+   <property name="javac.target" value="1.4"/>
+   <property name="javac.source" value="1.4"/>
+
+   <property name="javac.debug" value="true"/>
+   <property name="javac.optimize" value="false"/>
+   <property name="javac.depend" value="false"/>
+   <property name="javac.verbose" value="false"/>
+   <property name="javac.deprecation" value="true"/>
+   <property name="javac.include.ant.runtime" value="false"/>
+   <property name="javac.include.java.runtime" value="true"/>
+   <property name="javac.fail.onerror" value="true"/>
+
+   <!--
+        Non-JBoss dependencies.
+        They must available in the repository and declared as <componentrefs> in build-thirdparty.xml.
+   -->
+   <path id="external.dependencies.classpath">
+      <!-- <path refid="apache.commons.classpath"/> -->
+      <path refid="oswego.concurrent.classpath"/>
+      <path refid="javassist.classpath"/>
+      <path refid="jgroups.jgroups.classpath"/>
+      <path refid="trove.trove.classpath"/>
+   </path>
+
+   <!--
+        JBoss dependencies.
+        They must available in the repository and declared as <componentrefs> in build-thirdparty.xml.
+
+        NOTE: If one of JBoss dependencies (jboss-remoting.jar, jboss-serialization.jar) is locally
+              present in ./lib, it will take precedence over the corresponding repository instance.
+    -->
+   <path id="jboss.dependencies.classpath">
+      <path refid="jboss.common.classpath"/>
+      <path refid="jboss.aop.classpath"/>
+      <path refid="jboss.remoting.classpath"/>
+      <path refid="jboss.serialization.classpath"/>
+   </path>
+
+   <!--
+        Locally maintained dependencies.
+
+        NOTE: If one of JBoss dependencies (jboss-remoting.jar, jboss-serialization.jar) is locally
+              present in ./lib, it will take precedence over the corresponding repository instance.
+   -->
+
+   <property name="jboss.j2ee.lib" value="${project.root}/lib/"/>
+   <path id="jboss.j2ee.classpath">
+      <pathelement location="${project.root}/lib/jboss-j2ee.jar"/>
+   </path>
+
+   <property name="jboss.j2se.lib" value="${project.root}/lib/"/>
+   <path id="jboss.j2se.classpath">
+      <pathelement location="${project.root}/lib/jboss-j2se.jar"/>
+   </path>
+
+   <path id="jboss.system.classpath">
+      <pathelement location="${project.root}/lib/jboss-system.jar"/>
+   </path>
+
+   <path id="jboss.security.classpath">
+      <pathelement location="${project.root}/lib/jbosssx.jar"/>
+   </path>
+
+   <path id="jboss.transaction.classpath">
+      <pathelement location="${project.root}/lib/jboss-transaction.jar"/>
+   </path>
+
+   <!--
+       If I don't use directly UnifiedClassLoader3, this should go away.
+   -->
+   <path id="jboss.jmx.classpath">
+      <pathelement location="${project.root}/lib/jboss-jmx.jar"/>
+   </path>
+
+   <property name="jboss.server.lib" value="${project.root}/lib/"/>
+
+   <property name="jboss.naming.lib" value="${project.root}/lib/"/>
+
+   <path id="local.dependencies.classpath">
+      <path refid="jboss.j2ee.classpath"/>
+      <path refid="jboss.j2se.classpath"/>
+      <path refid="jboss.system.classpath"/>
+      <path refid="jboss.security.classpath"/>
+      <path refid="jboss.transaction.classpath"/>
+      <path refid="jboss.jmx.classpath"/>
+      <path refid="jboss.remoting.classpath"/>
+       <path refid="jboss.serialization.classpath"/>
+   </path>
+
+   <!--
+        The compilation classpath.
+   -->
+   <path id="compilation.classpath">
+      <path refid="local.dependencies.classpath"/>
+      <path refid="external.dependencies.classpath"/>
+      <path refid="jboss.dependencies.classpath"/>
+   </path>
+
+   <!--
+        The AOPC classpath.
+   -->
+   <path id="aopc.classpath">
+      <path refid="compilation.classpath"/>
+      <pathelement path="${build.classes}"/>
+   </path>
+
+   <!-- ======================================================================================== -->
+   <!-- Local Dependencies Override Tasks                                                        -->
+   <!-- ======================================================================================== -->
+
+   <target name="resolve-local-dependencies"
+           depends="detect-availability,
+                    use-local-remoting,
+                    use-repository-remoting,
+                    use-local-serialization,
+                    use-repository-serialization"/>
+
+
+   <target name="detect-availability">
+      <detect-availability dependency="remoting"/>
+      <detect-availability dependency="serialization"/>
+   </target>
+
+   <target name="use-local-remoting" if="local.remoting.present">
+      <path id="jboss.remoting.classpath">
+         <pathelement location="${project.root}/lib/jboss-remoting.jar"/>
+      </path>
+      <property name="current.jboss.remoting.lib" value="${project.root}/lib"/>
+   </target>
+
+   <target name="use-repository-remoting" unless="local.remoting.present">
+      <property name="current.jboss.remoting.lib" value="${jboss.remoting.lib}"/>
+   </target>
+
+   <target name="use-local-serialization" if="local.serialization.present">
+      <path id="jboss.serialization.classpath">
+         <pathelement location="${project.root}/lib/jboss-serialization.jar"/>
+      </path>
+      <property name="current.jboss.serialization.lib" value="${project.root}/lib"/>
+   </target>
+
+   <target name="use-repository-serialization" unless="local.serialization.present">
+      <property name="current.jboss.serialization.lib" value="${jboss.serialization.lib}"/>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- Compilation Tasks                                                                        -->
+   <!-- ======================================================================================== -->
+
+   <target name="compile" depends="compile-parsers, compile-classes, compile-etc"/>
+
+   <target name="compile-parsers">
+
+      <mkdir dir="${build.parsers}/org/jboss/jms/selector"/>
+      <echo message="${sun.javacc.lib}"/>
+      <javacc target="${source.java}/org/jboss/jms/selector/SelectorParser.jj"
+              outputdirectory="${build.parsers}/org/jboss/jms/selector"
+              javacchome="${sun.javacc.lib}"
+              static="false"/>
+
+      <mkdir dir="${build.classes}"/>
+      <javac destdir="${build.classes}"
+             target="${javac.target}"
+             source="${javac.source}"
+             debug="${javac.debug}"
+             optimize="${javac.optimize}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${build.parsers}"/>
+         <src path="${source.java}"/>
+         <include name="org/jboss/jms/selector/ASCII_CharStream.java"/>
+         <include name="org/jboss/jms/selector/ParserException.java"/>
+         <include name="org/jboss/jms/selector/SelectorParser.java"/>
+         <include name="org/jboss/jms/selector/SelectorParserConstants.java"/>
+         <include name="org/jboss/jms/selector/SelectorParserTokenManager.java"/>
+         <include name="org/jboss/jms/selector/Token.java"/>
+         <include name="org/jboss/jms/selector/TokenMgrError.java"/>
+         <include name="org/jboss/jms/selector/Operator.java"/>
+         <include name="org/jboss/jms/selector/Identifier.java"/>
+         <classpath refid="compilation.classpath"/>
+      </javac>
+   </target>
+
+   <target name="compile-classes">
+
+      <mkdir dir="${build.classes}"/>
+      <!-- <display-path path="compilation.classpath"/> -->
+      <javac destdir="${build.classes}"
+             target="${javac.target}"
+             source="${javac.source}"
+             optimize="${javac.optimize}"
+             debug="${javac.debug}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${source.java}"/>
+         <include name="**/*.java"/>
+         <classpath refid="compilation.classpath"/>
+      </javac>
+
+      <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="jboss.aop.classpath"/>
+      <echo message="NOTE: aopc incremental compilation might fail, if so do an ant clean first (see JMESSAGING-271)"/>
+      <aopc compilerclasspathref="aopc.classpath"
+            classpathref="aopc.classpath"
+            verbose="false">
+         <classpath refid="aopc.classpath"/>
+         <src path="${build.classes}"/>
+         <aoppath path="src/etc/prepare-aop.xml"/>
+      </aopc>
+   </target>
+
+   <target name="compile-etc">
+
+      <mkdir dir="${build.etc}"/>
+      <copy todir="${build.etc}" filtering="yes">
+         <fileset dir="${source.etc}">
+            <include name="**"/>
+         </fileset>
+         <filterset>
+            <filter token="JMS_VERSION" value="${jms.version}"/>
+            <filter token="JMS_VERSION_MAJOR" value="${jms.version.major}"/>
+            <filter token="JMS_VERSION_MINOR" value="${jms.version.minor}"/>
+            <filter token="MODULE_VERSION" value="${module.version}"/>
+            <filter token="MESSAGING_VERSION_MAJOR" value="${messaging.version.major}"/>
+            <filter token="MESSAGING_VERSION_MINOR" value="${messaging.version.minor}"/>
+            <filter token="MESSAGING_VERSION_INCREMENTING" value="${messaging.version.incrementing}"/>
+            <filter token="MODULE_NAME" value="${module.Name}"/>
+         </filterset>
+      </copy>
+      <move file="${build.etc}/VERSION-PRE-SUBSTITUTE" toFile="${build.etc}/VERSION"/>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- Javadoc                                                                                  -->
+   <!-- ======================================================================================== -->
+
+   <target name="javadoc" depends="compile">
+
+      <javadoc destdir="${build.api}" author="true" version="true" use="true" windowtitle="JBoss Messaging ${module.version}">
+
+         <packageset dir="${source.java}" defaultexcludes="yes">
+            <include name="org/jboss/**"/>
+         </packageset>
+
+         <doctitle><![CDATA[<h2>JBoss Messaging  ${module.version}</h2>]]></doctitle>
+         <bottom><![CDATA[<i>Copyright &#169; 2006 JBoss Inc. All Rights Reserved.</i>]]></bottom>
+         <tag name="todo" scope="all" description="To do:"/>
+         <group title="JMS Facade" packages="org.jboss.jms.*"/>
+         <group title="Messaging Core" packages="org.jboss.messaging.*"/>
+      </javadoc>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- Archival Tasks                                                                           -->
+   <!-- ======================================================================================== -->
+
+   <target name="jar" depends="compile, jar-structure">
+
+      <mkdir dir="${build.lib}"/>
+      <jar jarfile="${build.lib}/jboss-${module.name}.jar" manifest="${build.etc}/default.mf">
+         <fileset dir="${build.classes}" includes="**"/>
+         <fileset dir="${build.jar}" includes="**"/>
+      </jar>
+   </target>
+
+   <target name="scoped-sar" depends="compile, scoped-sar-structure, extract-server-dependencies">
+
+      <mkdir dir="${build.lib}"/>
+      <jar jarfile="${build.lib}/jboss-${module.name}-scoped.sar" manifest="${build.etc}/default.mf">
+         <fileset dir="${build.classes}" includes="**"/>
+         <fileset dir="${build.scoped-sar}" includes="**"/>
+         <fileset dir="${build.jar}" includes="**"/>
+      </jar>
+   </target>
+
+   <target name="jar-structure">
+
+      <mkdir dir="${build.jar}/META-INF"/>
+      <mkdir dir="${build.jar}/xmdesc"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/messaging-service.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/connection-factories-service.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/destinations-service.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/hsqldb-persistence-service.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/remoting-service.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/jms-ds.xml"/>
+      <copy file="${build.etc}/VERSION" toFile="${build.jar}/VERSION"/>
+      <copy todir="${build.jar}/xmdesc">
+         <fileset dir="${source.etc}/xmdesc" includes="*.xml"/>
+      </copy>
+      <copy todir="${build.jar}" file="${source.etc}/aop-messaging-server.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/aop-messaging-client.xml"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/config/messaging-users.properties"/>
+      <copy todir="${build.jar}" file="${source.etc}/server/default/config/messaging-roles.properties"/>
+   </target>
+
+   <target name="scoped-sar-structure" depends="jar-structure, extract-server-dependencies">
+
+      <copy todir="${build.scoped-sar}/META-INF" file="${source.etc}/server/default/deploy/jboss-service.xml"/>
+   </target>
+
+   <target name="extract-server-dependencies" depends="resolve-local-dependencies">
+
+      <fail message="Fix the build script to correctly define 'current.jboss.remoting.lib'!" unless="current.jboss.remoting.lib"/>
+      <fail message="Fix the build script to correctly define 'current.jboss.serialization.lib'!" unless="current.jboss.serialization.lib"/>
+
+      <mkdir dir="${build.scoped-sar}"/>
+
+      <copy todir="${build.scoped-sar}" file="${current.jboss.remoting.lib}/jboss-remoting.jar"/>
+      <copy todir="${build.scoped-sar}" file="${current.jboss.serialization.lib}/jboss-serialization.jar"/>
+      <copy todir="${build.scoped-sar}" file="${jboss.aop.lib}/jboss-aop.jar"/>
+      <!-- <copy todir="${build.scoped-sar}" file="${jboss.aspects.lib}/jboss-aspect-library.jar"/> -->
+      <copy todir="${build.scoped-sar}" file="${javassist.javassist.lib}/javassist.jar"/>
+      <copy todir="${build.scoped-sar}" file="${trove.trove.lib}/trove.jar"/>
+
+      <mkdir dir="${build.scoped-sar}/tmp"/>
+      <!-- we need org/jboss/util/collection.SoftValueHashMap
+           which was moved http://jira.jboss.org/jira/browse/JBMESSAGING-281
+      -->
+      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.common.lib}/jboss-common.jar" >
+         <patternset>
+            <include name="org/jboss/util/collection/SoftValueHashMap*.class"/>
+            <!--
+                 required by 4.0.1sp1 and lower
+            -->
+            <include name="org/jboss/util/propertyeditor/**"/>
+         </patternset>
+      </unjar>
+      <jar jarfile="${build.scoped-sar}/jboss-common-softvaluehashmap.jar">
+         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </jar>
+      <delete>
+          <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </delete>
+      <!-- I also need org.jboss.util.stream.* -->
+      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.common.lib}/jboss-common.jar">
+         <patternset>
+            <include name="org/jboss/util/stream/**"/>
+         </patternset>
+      </unjar>
+      <jar jarfile="${build.scoped-sar}/jboss-common-stream.jar">
+         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </jar>
+      <delete>
+          <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </delete>
+
+      <!-- I need InvocationMarshaller both on server and client side, and versions prior to
+           JBoss 4.0.3 don't have them, so I need to include them as well. I only need to extract
+           org.jboss.invocation.unified.marshall from jboss.jar, because otherwise I scope classes
+           like javaURLContextFactory, which will mess up JNDI and other things.
+      -->
+      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.server.lib}/jboss.jar">
+         <patternset>
+            <include name="org/jboss/invocation/unified/**"/>
+         </patternset>
+      </unjar>
+      <jar jarfile="${build.scoped-sar}/jboss-unified-invocation.jar">
+         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </jar>
+      <delete>
+          <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </delete>
+
+      <!--
+           Required to deploy in 4.0.1 and lower. Currently we don't support it.
+      -->
+      <!--
+      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.security.lib}/jbosssx.jar">
+         <patternset>
+            <include name="org/jboss/security/SecurityAssociation*.class"/>
+            <include name="org/jboss/security/SecurityActions*.class"/>
+         </patternset>
+      </unjar>
+      <jar jarfile="${build.scoped-sar}/jboss-securityassociation.jar">
+         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
+      </jar>
+      -->
+
+      <delete dir="${build.scoped-sar}/tmp"/>
+   </target>
+
+   <target name="artifacts" depends="jar, scoped-sar, client-jar"/>
+
+   <target name="client-jar" depends="compile, scoped-sar">
+
+      <mkdir dir="${project.output}/jboss-messaging-client"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${jboss.aop.lib}/jboss-aop.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${current.jboss.remoting.lib}/jboss-remoting.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${current.jboss.serialization.lib}/jboss-serialization.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${javassist.javassist.lib}/javassist.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${trove.trove.lib}/trove.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${build.scoped-sar}/jboss-common-softvaluehashmap.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${jboss.common.lib}/jboss-common-client.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${jboss.j2se.lib}/jboss-j2se.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${jboss.naming.lib}/jnp-client.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${oswego.concurrent.lib}/concurrent.jar"/>
+      <unjar dest="${project.output}/jboss-messaging-client" src="${apache.log4j.lib}/log4j.jar"/>
+      <jar jarfile="${build.lib}/jboss-messaging-client.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/**"/>
+         </fileset>
+         <fileset dir="${build.etc}">
+            <include name="VERSION"/>
+         </fileset>
+         <fileset dir="${project.output}/jboss-messaging-client">
+            <include name="VERSION"/>
+         </fileset>
+         <fileset dir="${project.output}/jboss-messaging-client" includes="**"/>
+      </jar>
+      <delete dir="${project.output}/jboss-messaging-client"/>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- Release Tasks                                                                            -->
+   <!-- ======================================================================================== -->
+
+   <target name="archive-functional" depends="release-structure">
+
+      <mkdir dir="./tests/output/jboss-messaging-functional-test-results-${module.version}"/>
+      <copy todir="./tests/output/jboss-messaging-functional-test-results-${module.version}">
+         <fileset dir="./tests/output/reports/html">
+            <include name="**"/>
+         </fileset>
+      </copy>
+      <zip destfile="${release.output}/test-results/jboss-messaging-functional-test-results-${module.version}.zip"
+           basedir="./tests/output" includes="jboss-messaging-functional-test-results-${module.version}/**"/>
+      <delete dir="./tests/output/jboss-messaging-functional-test-results-${module.version}"/>
+   </target>
+
+   <target name="archive-stress" depends="release-structure">
+
+      <mkdir dir="./tests/output/jboss-messaging-stress-test-results-${module.version}"/>
+      <copy todir="./tests/output/jboss-messaging-stress-test-results-${module.version}">
+         <fileset dir="./tests/output/reports/html">
+            <include name="**"/>
+         </fileset>
+      </copy>
+      <zip destfile="${release.output}/test-results/jboss-messaging-stress-test-results-${module.version}.zip"
+           basedir="./tests/output" includes="jboss-messaging-stress-test-results-${module.version}/**"/>
+      <delete dir="./tests/output/jboss-messaging-stress-test-results-${module.version}"/>
+   </target>
+
+   <target name="archive-smoke" depends="release-structure">
+
+      <copy todir="${release.output}/test-results">
+         <fileset dir="./tests/smoke/output">
+            <include name="*.html"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="release-bundle" depends="artifacts, release-structure, examples, userdoc, bundle-source, bundle-test-results, javadoc">
+
+      <copy todir="${release.output}" file="${build.lib}/jboss-${module.name}-scoped.sar"/>
+      <copy todir="${release.output}" file="${build.lib}/jboss-${module.name}-client.jar"/>
+      <copy todir="${release.output}" file="./docs/README.html"/>
+      <copy todir="${release.output}/api">
+         <fileset dir="${build.api}" includes="**"/>
+      </copy>
+      <copy todir="${release.output}/util">
+         <fileset dir="./util">
+            <include name="*.xml"/>
+            <exclude name="do-not-distribute*"/>
+         </fileset>
+      </copy>
+      <zip destfile="${build.lib}/jboss-messaging-${module.version}.zip"
+           basedir="${project.root}/release"/>
+      <echo message="Release bundle jboss-messaging-${module.version}.zip done"/>
+   </target>
+
+   <target name="release-structure">
+
+      <mkdir dir="${release.output}/util"/>
+      <mkdir dir="${release.output}/examples"/>
+      <mkdir dir="${release.output}/docs/userguide"/>
+      <mkdir dir="${release.output}/src"/>
+      <mkdir dir="${release.output}/test-results"/>
+   </target>
+
+   <!-- Note: This target must be ran after the smoke test -->
+   <target name="examples" depends="release-structure">
+
+      <copy todir="${release.output}/examples">
+         <fileset dir="./docs/examples">
+            <exclude name="programmatic-deployment"/>
+            <exclude name="**/do-not-distribute*"/>
+         </fileset>
+      </copy>
+      <copy todir="${release.output}/examples/config">
+         <fileset dir="./src/etc/server/default/deploy">
+            <include name="*-persistence-service.xml"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="userdoc" depends="release-structure">
+
+      <ant dir="./docs/gettingstarted" antfile="build.xml" target="all"/>
+      <copy todir="${release.output}/docs/userguide">
+         <fileset dir="${project.output}/docs/userguide/en">
+            <include name="**"/>
+            <exclude name="**/do-not-distribute*"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="bundle-source" depends="release-structure">
+
+      <zip destfile="${release.output}/src/jboss-messaging-${module.version}-src.zip"
+           basedir="${source.java}" excludes="**/CVS,*.iml"/>
+      <zip destfile="${release.output}/src/jboss-messaging-tests-${module.version}-src.zip"
+           basedir="${project.root}/tests/src" includes="org/jboss/test/**" excludes="**/CVS,*.iml"/>
+   </target>
+
+   <target name="bundle-test-results" depends="release-structure">
+
+      <available file="${release.output}/test-results/jboss-messaging-functional-test-results-${module.version}.zip"
+                 property="functional.test.results.present" value="true"/>
+      <fail message="Functional test results ${release.output}/test-results/jboss-messaging-functional-test-results-${module.version}.zip not available!"
+            unless="functional.test.results.present"/>
+      <available file="${release.output}/test-results/jboss-messaging-stress-test-results-${module.version}.zip"
+                 property="stress.test.results.present" value="true"/>
+      <fail message="Stress test results ${release.output}/test-results/jboss-messaging-stress-test-results-${module.version}.zip not available!"
+            unless="stress.test.results.present"/>
+   </target>
+
+   <target name="deployscoped" depends="scoped-sar">
+      <copy file="${build.lib}/jboss-${module.name}-scoped.sar"
+            todir="${ENV.JBOSS_HOME}/server/default/deploy"/>
+   </target>
+
+   <target name="deploydefault" depends="jar">
+      <copy file="${build.lib}/jboss-${module.name}.sar"
+            todir="${ENV.JBOSS_HOME}/server/default/deploy"/>
+   </target>
+
+   <target name="undeploydefault">
+      <delete file="${ENV.JBOSS_HOME}/server/default/deploy/jboss-${module.name}.sar"/>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- TCK Tasks                                                                                -->
+   <!-- ======================================================================================== -->
+
+   <target name="cts-deploy" depends="jar">
+      <copy file="${build.lib}/jboss-${module.name}.sar"
+         todir="${ENV.JBOSS_HOME}/server/cts-messaging/deploy"/>
+   </target>
+
+   <target name="cts-undeploy">
+      <delete file="${ENV.JBOSS_HOME}/server/cts-messaging/deploy/jboss-${module.name}.sar"/>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- Cleaning Tasks                                                                           -->
+   <!-- ======================================================================================== -->
+
+   <target name="clean">
+
+      <delete dir="${project.output}" quiet="true"/>
+
+      <ant dir="./docs/examples/queue" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./docs/examples/topic" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./docs/examples/mdb" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./docs/examples/stateless" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./docs/examples/ejb3mdb" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./docs/examples/secure-socket" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./tests" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./perf" antfile="build.xml" inheritAll="false" target="clean"/>
+   </target>
+
+   <!-- ======================================================================================== -->
+   <!-- Macros                                                                                   -->
+   <!-- ======================================================================================== -->
+
+   <macrodef name="display-path">
+      <attribute name="path"/>
+      <sequential>
+         <pathconvert refid="@{path}" targetos="unix" property="@{path}.representation"/>
+         <echo message="@{path}: ${@{path}.representation}"/>
+      </sequential>
+   </macrodef>
+
+   <macrodef name="detect-availability">
+      <attribute name="dependency"/>
+      <sequential>
+         <available file="${project.root}/lib/jboss-@{dependency}.jar"
+                    property="local.@{dependency}.present"/>
+      </sequential>
+   </macrodef>
+
+</project>
\ No newline at end of file

Added: trunk/build-thirdparty.xml
===================================================================
--- trunk/build-thirdparty.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/build-thirdparty.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- JBoss, Home of Professional Open Source                                                     -->
+<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
+<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
+<!-- full listing of individual contributors.                                                    -->
+<!--                                                                                             -->
+<!-- This is free software; you can redistribute it and/or modify it                             -->
+<!-- under the terms of the GNU Lesser General Public License as                                 -->
+<!-- published by the Free Software Foundation; either version 2.1 of                            -->
+<!-- the License, or (at your option) any later version.                                         -->
+<!--                                                                                             -->
+<!-- This software is distributed in the hope that it will be useful,                            -->
+<!-- but WITHOUT ANY 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 along with this software; if not, write to the Free                                 -->
+<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
+<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- $Id$ -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+<project name="main.build" default="synchronize">
+
+   <!-- ======================================================================================== -->
+   <!-- Configuration                                                                            -->
+   <!-- ======================================================================================== -->
+
+   <property file="local.properties"/>
+   <property file="synchronize.properties"/>
+   <property name="librariesEntFile" value="./thirdparty/libraries.ent"/>
+
+   <property environment="ENV"/>
+
+   <!--
+      | Allow jbossbuild.repository to be set from (in order or priority)
+      | 1) Command line -Djbossbuild.repository=...
+      | 2) synchronize.properties jbossbuild.repository setting
+      | 3) JBOSS_REPOSITORY environment variable
+   -->
+   <condition property="jbossbuild.repository" value="${ENV.JBOSS_REPOSITORY}">
+      <isset property="ENV.JBOSS_REPOSITORY"/>
+   </condition>
+
+   <!--
+      | Fall back to default.
+   -->
+   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
+
+   <import file="./tools/etc/jbossbuild/tasks.xml"/>
+
+   <!--
+      | This is where JBoss Messaging external dependencies are declared. The repository is in CVS
+      | under the module repository.jboss.com whose contents are pushed to the
+      | http://repository.jboss.com site.
+   -->
+   <build id="jboss-messaging"
+          impltitle="JBoss Messaging"
+          implversion="undefined"
+          implvendor="JBoss Inc."
+          implurl="http://www.jboss.org"
+          description="JBoss Messaging"
+          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
+          thirdpartypath="./thirdparty/"
+          location="${jbossbuild.repository}"
+          targetdefs="targets">
+
+
+      <!--
+           Dependencies requrired to build the project.
+      -->
+      <componentref name="retrotranslator" version="0.9.6jboss"/>
+      <componentref name="sun-javacc" version="3.2"/>
+      <componentref name="oswego-concurrent" version="1.3.4"/>
+      <componentref name="apache-log4j" version="1.2.8"/>
+      <componentref name="javassist" version="3.2.0.GA"/>
+      <componentref name="jgroups" version="2.3"/>
+      <componentref name="trove" version="1.0.2"/>
+      <componentref name="jboss/common" version="snapshot"/>
+      <componentref name="jboss/aop" version="1.5.0.GA"/>
+      <componentref name="jboss/serialization" version="1.0.1.GA"/>
+      <componentref name="jboss/remoting" version="2.0.0.Beta2"/>
+
+      <!--
+           Dependencies required to test the project.
+      -->
+      <componentref name="junit" version="3.8.1"/>
+      <componentref name="hsqldb" version="1.8.0.2"/>
+      <componentref name="dom4j" version="1.6"/>
+      <componentref name="jboss/profiler/jvmti" version="1.0.0.CR5"/>
+      <componentref name="jboss/jbossxb" version="1.0.0.CR6"/>
+
+
+   </build>
+
+   <synchronizeinfo/>
+
+   <!--
+      | Generate the targets.
+   -->
+   <generate generate="jboss-messaging"/>
+
+   <target name="generate-libraries-ent" depends="synchronize">
+      <gen-lib-file path="tools/etc/buildmagic" filename="${librariesEntFile}"/>
+      <visit-componentref-graph componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor"/>
+   </target>
+
+</project>
\ No newline at end of file

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/build.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,838 +1,87 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "../tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
-   <!ENTITY modules SYSTEM "../tools/etc/buildmagic/modules.ent">
-]>
 
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- JBoss, Home of Professional Open Source                                                     -->
+<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
+<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
+<!-- full listing of individual contributors.                                                    -->
+<!--                                                                                             -->
+<!-- This is free software; you can redistribute it and/or modify it                             -->
+<!-- under the terms of the GNU Lesser General Public License as                                 -->
+<!-- published by the Free Software Foundation; either version 2.1 of                            -->
+<!-- the License, or (at your option) any later version.                                         -->
+<!--                                                                                             -->
+<!-- This software is distributed in the hope that it will be useful,                            -->
+<!-- but WITHOUT ANY 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 along with this software; if not, write to the Free                                 -->
+<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
+<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
 
 
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
 <!-- $Id$ -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
 
 
-<project default="main" name="JBoss/Messaging">
+<project default="jar" name="JBoss Messaging">
 
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
+   <!--
+        Setting "external.project" to true makes jbossbuild use the current directory, and not its
+        parent, as project root. DO NOT change this.
    -->
+   <property name="external.project" value="true"/>
 
-  &buildmagic;
-
-
-
-
-  <!-- ================================================================== -->
-  <!-- Initialization                                                     -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Initialize the build system.  Must depend on '_buildmagic:init'.
-     | Other targets should depend on 'init' or things will mysteriously fail.
+   <!--
+        Setting "nodownload" to true inhibits downloading of up-to-date dependencies.
    -->
+   <property name="nodownload" value="false"/>
 
-  <target name="init" unless="init.disable" depends="_buildmagic:init">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.
-     |
-     | This target is invoked by the Buildmagic initialization logic and
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-     <property name="messaging.version.major" value="1"/>
-     <property name="messaging.version.minor" value="0"/>
-     <property name="messaging.version.revision" value="1"/>
-     <property name="messaging.version.incrementing" value="4"/>
-     <property name="messaging.version.tag" value="GA"/>
-     <property name="messaging.version.name" value=""/>
-     <!-- This must be set to the CVS tag for any release -->
-     <property name="messaging.version.cvstag" value="JBossMessaging_1_0_1_GA"/>
-
-     <!-- Module name(s) & version -->
-     <property name="module.name" value="messaging"/>
-     <property name="module.Name" value="JBoss Messaging"/>
-     <property name="module.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
-
-     <!-- Manifest version info -->
-     <property name="messaging.specification.title" value="${module.Name}"/>
-     <property name="messaging.specification.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
-     <property name="messaging.specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-     <property name="messaging.implementation.title" value="${module.Name}"/>
-     <property name="messaging.implementation.url" value="http://www.jboss.org/"/>
-     <property name="messaging.implementation.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag} (build: CVSTag=${messaging.version.cvstag} date=${build.id})"/>
-     <property name="messaging.implementation.vendor" value="JBoss Inc."/>
-     <property name="messaging.implementation.vendor.id" value="${implementation.url}"/>
-
-     <property name="jms.version.major" value="1"/>
-     <property name="jms.version.minor" value="1"/>
-     <property name="jms.version" value="1.1"/>
-
-    <!-- ========= -->
-    <!-- Libraries -->
-    <!-- ========= -->
-
-    &libraries;
-
-
-    <!-- The combined library classpath -->
-    <path id="library.classpath">
-       <path refid="apache.commons.classpath"/>
-       <path refid="oswego.concurrent.classpath"/>
-       <path refid="javassist.classpath"/>
-       <path refid="jgroups.jgroups.classpath"/>
-       <path refid="junit.junit.classpath"/>
-       <path refid="trove.trove.classpath"/>
-    </path>
-
-
-    <!-- ======= -->
-    <!-- Modules -->
-    <!-- ======= -->
-
-     &modules;
-
-     <!-- The combined dependent module classpath -->
-     <path id="dependentmodule.classpath">
-        <path refid="jboss.common.classpath"/>
-        <path refid="jboss.j2ee.classpath"/>
-        <path refid="jboss.remoting.classpath"/>
-        <path refid="jboss.serialization.classpath"/>
-        <path refid="jboss.aop.classpath"/>
-        <path refid="jboss.aspects.classpath"/>
-        <path refid="jboss.j2se.classpath"/>
-        <path refid="jboss.system.classpath"/>
-        <path refid="jboss.security.classpath"/>
-        <path refid="jboss.server.classpath"/>
-        <path refid="jboss.transaction.classpath"/>
-
-        <!-- If I don't use directly UnifiedClassLoader3, this should go away -->
-        <path refid="jboss.jmx.classpath"/>
-     </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <!-- Where source files live -->
-    <property name="source.java" value="${module.source}/main"/>
-    <property name="source.etc" value="${module.source}/etc"/>
-
-    <!-- Where build generated files will go -->
-    <property name="build.reports" value="${module.output}/reports"/>
-    <property name="build.classes" value="${module.output}/classes"/>
-    <property name="build.lib" value="${module.output}/lib"/>
-    <property name="build.api" value="${module.output}/api"/>
-    <property name="build.etc" value="${module.output}/etc"/>
-    <property name="build.gen-src" value="${module.output}/gen-src"/>
-    <property name="build.gen" value="${module.output}/gen"/>
-    <property name="build.parsers" value="${module.output}/parsers"/>
-
-     <!-- Messaging specific structure properties -->
-     <property name="build.jar" value="${module.output}/jar"/>
-     <property name="build.scoped-sar" value="${module.output}/scoped-sar"/>
-
-    <!-- Install/Release structure -->
-    <property name="install.id" value="${module.name}-${module.version}"/>
-    <property name="release.id" value="${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-
-    <!-- The combined thirdparty classpath -->
-    <path id="thirdparty.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-    </path>
-
-    <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-    <property name="rmic.stubVersion" value="1.2"/>
-
-    <!-- classpath and local.classpath must have a value using with a path -->
-    <property name="classpath" value=""/>
-    <property name="local.classpath" value=""/>
-
-    <!-- The classpath required to build classes. -->
-    <path id="javac.classpath">
-      <pathelement path="${classpath}"/>
-      <pathelement path="${local.classpath}"/>
-      <path refid="thirdparty.classpath"/>
-    </path>
-
-    <path id="aopc.classpath">
-       <path refid="javac.classpath"/>
-       <pathelement path="${build.classes}"/>
-    </path>
-
-    <!-- The classpath required to build javadocs. -->
-    <path id="javadoc.classpath">
-      <path refid="javac.classpath"/>
-    </path>
-
-    <!-- xdoclet -->
-    <path id="xdoclet.task.classpath">
-      <path refid="javac.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <fileset dir="${xdoclet.xdoclet.lib}">
-        <include name="**/*.jar"/>
-      </fileset>
-    </path>
-    <property name="xdoclet.task.classpath"
-          refid="xdoclet.task.classpath"/>
-
-    <!-- Packages to include when generating api documentation -->
-    <property name="javadoc.packages" value="org.jboss.jms.*"/>
-
-    <!-- Override JUnit defaults -->
-    <property name="junit.timeout" value="240000"/> <!-- 4 minutes -->
-    <property name="junit.batchtest.todir" value="${build.reports}"/>
-    <property name="junit.jvm.options" value="-Ddummy"/>
-
-     <!-- ==================== -->
-     <!-- Local path overrides -->
-     <!-- ==================== -->
-
-     <!--
-         Sometimes I need to locally patch a library and use the local version (src/resources),
-         until the change makes it to thridpary. This is how you can locally override a library.
-         To use the thirdparty library, just uncoment the standard definition of the "common.."
-         propery and comment out the localized definitions below.
-      -->
-
-     <!--
-     <property name="current.jboss.remoting.lib" value="${jboss.remoting.lib}"/>
-      -->
-     <property name="current.jboss.remoting.lib" value="${module.root}/src/resources"/>
-     <path id="jboss.remoting.classpath">
-        <pathelement path="${module.root}/src/resources/jboss-remoting.jar"/>
-     </path>
-
-     <property name="current.jboss.serialization.lib" value="${module.root}/src/resources"/>
-     <path id="jboss.serialization.classpath">
-         <pathelement path="${module.root}/src/resources/jboss-serialization.jar"/>
-     </path>
-
-     <property name="current.jboss.aop.lib" value="${module.root}/src/resources"/>
-     <path id="jboss.aop.classpath">
-         <pathelement path="${module.root}/src/resources/jboss-aop.jar"/>
-     </path>
-
-     <property name="current.jboss.aspects.lib" value="${module.root}/src/resources"/>
-     <path id="jboss.aspects.classpath">
-         <pathelement path="${module.root}/src/resources/jboss-aspects.jar"/>
-     </path>
-
-     <!--
-     <path id="jgroups.jgroups.classpath">
-          <pathelement path="${module.root}/src/resources/jgroups-core.jar"/>
-     </path>
-     -->
-
-
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile"
-      description="Compile all source files."
-      depends="compile-parsers, compile-classes, compile-etc"/>
-
-    <!-- Compile parsers -->
-  <target name="compile-parsers" depends="init">
-    <mkdir dir="${build.parsers}/org/jboss/jms/selector"/>
-
-    <!-- message selector parser -->
-    <javacc target="${source.java}/org/jboss/jms/selector/SelectorParser.jj"
-            outputdirectory="${build.parsers}/org/jboss/jms/selector"
-            javacchome="${sun.javacc.lib}"
-            static="false"/>
-
-    <!-- compile them now -->
-    <mkdir dir="${build.classes}"/>
-    <javac destdir="${build.classes}"
-           optimize="${javac.optimize}"
-           target="${javac.target}"
-           source="${javac.source}"
-           debug="${javac.debug}"
-           depend="${javac.depend}"
-           verbose="${javac.verbose}"
-           deprecation="${javac.deprecation}"
-           includeAntRuntime="${javac.include.ant.runtime}"
-           includeJavaRuntime="${javac.include.java.runtime}"
-           failonerror="${javac.fail.onerror}">
-       <classpath refid="javac.classpath"/>
-
-       <!-- JavaCC creates output in a flat namespace -->
-       <src path="${build.parsers}"/>
-       <!--
-       <include name="*.java"/>
-    -->
-       <!-- Only want to build required the bits under selectors.* here -->
-       <src path="${source.java}"/>
-       <include name="org/jboss/jms/selector/ASCII_CharStream.java"/>
-       <include name="org/jboss/jms/selector/ParserException.java"/>
-       <include name="org/jboss/jms/selector/SelectorParser.java"/>
-       <include name="org/jboss/jms/selector/SelectorParserConstants.java"/>
-       <include name="org/jboss/jms/selector/SelectorParserTokenManager.java"/>
-       <include name="org/jboss/jms/selector/Token.java"/>
-       <include name="org/jboss/jms/selector/TokenMgrError.java"/>
-       <include name="org/jboss/jms/selector/Operator.java"/>
-       <include name="org/jboss/jms/selector/Identifier.java"/>
-    </javac>
-  </target>
-
-  <!-- Compile all class files -->
-   <target name="compile-classes" depends="init">
-      <mkdir dir="${build.classes}"/>
-      <javac destdir="${build.classes}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeAntRuntime="${javac.include.ant.runtime}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
-         <src path="${source.java}"/>
-         <classpath refid="javac.classpath"/>
-         <include name="${javac.includes}"/>
-         <exclude name="${javac.excludes}"/>
-      </javac>
-      <taskdef name="aopc" classname="org.jboss.aop.ant.AopC"
-         classpathref="jboss.aop.classpath"/>
-      <echo message="NOTE: aopc incremental compilation might fail, if so do an ant clean first (see JMESSAGING-271)"/>
-      <aopc compilerclasspathref="aopc.classpath" classpathref="aopc.classpath" verbose="false">
-         <classpath refid="aopc.classpath"/>
-         <src path="${build.classes}"/>
-         <aoppath path="src/etc/prepare-aop.xml"/>
-      </aopc>
-   </target>
-
-  <!-- Compile manifests -->
-  <target name="compile-etc" depends="init">
-    <mkdir dir="${build.etc}"/>
-    <copy todir="${build.etc}" filtering="yes">
-      <fileset dir="${source.etc}">
-         <include name="**"/>
-      </fileset>
-       <filterset>
-          <filter token="JMS_VERSION" value="${jms.version}"/>
-          <filter token="JMS_VERSION_MAJOR" value="${jms.version.major}"/>
-          <filter token="JMS_VERSION_MINOR" value="${jms.version.minor}"/>
-          <filter token="MODULE_VERSION" value="${module.version}"/>
-          <filter token="MESSAGING_VERSION_MAJOR" value="${messaging.version.major}"/>
-          <filter token="MESSAGING_VERSION_MINOR" value="${messaging.version.minor}"/>
-          <filter token="MESSAGING_VERSION_INCREMENTING" value="${messaging.version.incrementing}"/>
-          <filter token="MODULE_NAME" value="${module.Name}"/>
-       </filterset>
-    </copy>
-    <move file="${build.etc}/VERSION-PRE-SUBSTITUTE" toFile="${build.etc}/VERSION"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
    <!--
-   | Build all jar files.
+        Create the thirdparty folder from items in the repository then generate a new libraries.ent
+        file and include it in the build.
    -->
-   <target name="jars" description="Builds all jar files."
-      depends="_buildmagic:build-bypass-check"
-      unless="build-bypass.on">
-
-      <call target="jar"/>
-
-      <!-- Update the build marker to allow bypassing -->
-      <touch file="${build-bypass.marker}"/>
-
+   <target name="createthirdparty" unless="inhibit.downloads" depends="check.inhibit.downloads">
+      <ant antfile="build-thirdparty.xml" target="generate-libraries-ent"/>
    </target>
 
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="dist" depends="javadocs">
-  </target>
-
-  <target name="install"
-      description="Install the structure for a release."
-      depends="all, _buildmagic:install:default">
-
-      <mkdir dir="${module.source}/bin"/>
-
-      <filter token="module.name" value="${module.name}"/>
-      <copy todir="${install.root}/bin" filtering="yes">
-          <fileset dir="${module.source}/bin"/>
-      </copy>
-      <chmod dir="${install.root}/bin" perm="ugo+rx" includes="**/*.sh"/>
-
-      <copy todir="${install.root}/lib" filtering="no">
-            <fileset dir="${jboss.j2ee.lib}">
-                <include name="jboss-j2ee.jar"/>
-            </fileset>
-            <fileset dir="${jboss.common.lib}">
-                <include name="jboss-common.jar"/>
-            </fileset>
-            <fileset dir="${apache.log4j.lib}">
-                <include name="log4j.jar"/>
-            </fileset>
-            <fileset dir="${apache.commons.lib}">
-                <include name="commons-logging.jar"/>
-            </fileset>
-            <fileset dir="${jgroups.jgroups.lib}">
-                <include name="jgroups.jar"/>
-            </fileset>
-      </copy>
-  </target>
-
-  <target name="release" depends="install"/>
-
-  <target name="release-zip"
-      description="Builds a ZIP distribution."
-      depends="release, _buildmagic:release:zip"/>
-
-  <target name="release-tar"
-      description="Builds a TAR distribution."
-      depends="release, _buildmagic:release:tar"/>
-
-  <target name="release-tgz"
-      description="Builds a TAR-GZ distribution."
-      depends="release, _buildmagic:release:tgz"/>
-
-  <target name="release-all"
-      description="Builds a distribution for each archive type."
-      depends="release-zip, release-tgz"/>
-
-
-  <!-- ================================================================== -->
-  <!-- Cleaning                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- Clean up all build output -->
-  <target name="clean"
-      description="Cleans up most generated files."
-      depends="_buildmagic:clean">
-
-      <ant dir="./docs/examples/queue" antfile="build.xml" inheritAll="false" target="clean"/>
-      <ant dir="./docs/examples/topic" antfile="build.xml" inheritAll="false" target="clean"/>
-      <ant dir="./docs/examples/mdb" antfile="build.xml" inheritAll="false" target="clean"/>
-      <ant dir="./docs/examples/stateless" antfile="build.xml" inheritAll="false" target="clean"/>
-      <ant dir="./docs/examples/ejb3mdb" antfile="build.xml" inheritAll="false" target="clean"/>
-      <ant dir="./docs/examples/secure-socket" antfile="build.xml" inheritAll="false" target="clean"/>
-
-      <ant dir="./tests" antfile="build.xml" inheritAll="false" target="clean"/>
-      <ant dir="./perf" antfile="build.xml" inheritAll="false" target="clean"/>
-  </target>
-
-  <!-- Clean up all generated files -->
-  <target name="clobber"
-      description="Cleans up all generated files."
-      depends="_buildmagic:clobber, clean">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Misc.                                                              -->
-  <!-- ================================================================== -->
-
-  <target name="main" depends="most"
-      description="Executes the default target (most)."/>
-
-  <target name="all" depends="jars, docs"
-      description="Builds everything."/>
-
-  <target name="most" depends="jars"
-      description="Builds almost everything."/>
-
-  <target name="help"
-          description="Show this help message."
-      depends="_buildmagic:help:standard"/>
-
-   <target name="display-path" depends="init">
-      <pathconvert refid="dependentmodule.classpath" targetos="unix" property="path.representation"/>
-      <echo message="${path.representation}"/>
+   <target name="check.inhibit.downloads">
+      <condition property="inhibit.downloads">
+         <or>
+            <uptodate property="dependencies.current"
+                      srcfile="build-thirdparty.xml"
+                      targetfile="./thirdparty/libraries.ent"/>
+            <istrue value="${nodownload}"/>
+         </or>
+      </condition>
    </target>
 
-   <!-- ================================================================== -->
-   <!-- Messaging-specific tasks                                           -->
-   <!-- ================================================================== -->
-
-   <property environment="ENV"/>
-
-   <target name="create-lib-dir">
-      <mkdir dir="${build.lib}"/>
+   <target name="compile" depends="createthirdparty">
+      <ant antfile="build-messaging.xml" target="compile"/>
    </target>
 
-   <target name="jar" depends="compile, create-lib-dir, jar-structure">
-      <jar jarfile="${build.lib}/jboss-${module.name}.jar" manifest="${build.etc}/default.mf">
-         <fileset dir="${build.classes}" includes="**"/>
-         <fileset dir="${build.jar}" includes="**"/>
-      </jar>
+   <target name="jar" depends="createthirdparty">
+      <ant antfile="build-messaging.xml" target="jar"/>
    </target>
 
-   <target name="scoped-sar" depends="compile, create-lib-dir, scoped-sar-structure, extract-server-dependencies">
-      <jar jarfile="${build.lib}/jboss-${module.name}-scoped.sar" manifest="${build.etc}/default.mf">
-         <fileset dir="${build.classes}" includes="**"/>
-         <fileset dir="${build.scoped-sar}" includes="**"/>
-         <fileset dir="${build.jar}" includes="**"/>
-      </jar>
+   <target name="artifacts" depends="createthirdparty">
+      <ant antfile="build-messaging.xml" target="artifacts"/>
    </target>
 
-   <target name="artifacts" depends="jar, scoped-sar, client-jar"/>
-
-   <target name="jar-structure">
-      <mkdir dir="${build.jar}/META-INF"/>
-      <mkdir dir="${build.jar}/xmdesc"/>
-
-      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/messaging-service.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/connection-factories-service.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/destinations-service.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/hsqldb-persistence-service.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/remoting-service.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/deploy/jms-ds.xml"/>
-      <copy file="${build.etc}/VERSION" toFile="${build.jar}/VERSION"/>
-
-      <copy todir="${build.jar}/xmdesc">
-         <fileset dir="${source.etc}/xmdesc" includes="*.xml"/>
-      </copy>
-      <copy todir="${build.jar}" file="${source.etc}/aop-messaging-server.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/aop-messaging-client.xml"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/config/messaging-users.properties"/>
-      <copy todir="${build.jar}" file="${source.etc}/server/default/config/messaging-roles.properties"/>
+   <target name="clean">
+      <ant antfile="build-messaging.xml" target="clean"/>
    </target>
 
-   <target name="scoped-sar-structure" depends="jar-structure, extract-server-dependencies">
-
-      <copy todir="${build.scoped-sar}/META-INF" file="${source.etc}/server/default/deploy/jboss-service.xml"/>
-
-   </target>
-
-   <target name="extract-server-dependencies">
-
-      <fail message="Fix the build script to correctly define 'current.jboss.remoting.lib'!" unless="current.jboss.remoting.lib"/>
-      <fail message="Fix the build script to correctly define 'current.jboss.serialization.lib'!" unless="current.jboss.serialization.lib"/>
-      <fail message="Fix the build script to correctly define 'current.jboss.aop.lib'!" unless="current.jboss.aop.lib"/>
-      <fail message="Fix the build script to correctly define 'current.jboss.aspects.lib'!" unless="current.jboss.aspects.lib"/>
-
-      <mkdir dir="${build.scoped-sar}"/>
-
-      <copy todir="${build.scoped-sar}" file="${current.jboss.remoting.lib}/jboss-remoting.jar"/>
-      <copy todir="${build.scoped-sar}" file="${current.jboss.serialization.lib}/jboss-serialization.jar"/>
-      <copy todir="${build.scoped-sar}" file="${current.jboss.aop.lib}/jboss-aop.jar"/>
-      <copy todir="${build.scoped-sar}" file="${current.jboss.aspects.lib}/jboss-aspect-library.jar"/>
-      <copy todir="${build.scoped-sar}" file="${javassist.javassist.lib}/javassist.jar"/>
-      <copy todir="${build.scoped-sar}" file="${trove.trove.lib}/trove.jar"/>
-
-      <mkdir dir="${build.scoped-sar}/tmp"/>
-      <!-- we need org/jboss/util/collection.SoftValueHashMap
-           which was moved http://jira.jboss.org/jira/browse/JBMESSAGING-281
-      -->
-      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.common.lib}/jboss-common.jar" >
-         <patternset>
-            <include name="org/jboss/util/collection/SoftValueHashMap*.class"/>
-            <!--
-                 required by 4.0.1sp1 and lower
-            -->
-            <include name="org/jboss/util/propertyeditor/**"/>
-         </patternset>
-      </unjar>
-      <jar jarfile="${build.scoped-sar}/jboss-common-softvaluehashmap.jar">
-         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </jar>
-      <delete>
-          <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </delete>
-      <!-- I also need org.jboss.util.stream.* -->
-      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.common.lib}/jboss-common.jar">
-         <patternset>
-            <include name="org/jboss/util/stream/**"/>
-         </patternset>
-      </unjar>
-      <jar jarfile="${build.scoped-sar}/jboss-common-stream.jar">
-         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </jar>
-      <delete>
-          <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </delete>
-      <!-- I need InvocationMarshaller both on server and client side, and versions prior to
-           JBoss 4.0.3 don't have them, so I need to include them as well. I only need to extract
-           org.jboss.invocation.unified.marshall from jboss.jar, because otherwise I scope classes
-           like javaURLContextFactory, which will mess up JNDI and other things.
-      -->
-      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.server.lib}/jboss.jar">
-         <patternset>
-            <include name="org/jboss/invocation/unified/**"/>
-         </patternset>
-      </unjar>
-      <jar jarfile="${build.scoped-sar}/jboss-unified-invocation.jar">
-         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </jar>
-      <delete>
-          <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </delete>
-
-      <!--
-           Required to deploy in 4.0.1 and lower. Currently we don't support it.
-      -->
-      <!--
-      <unjar dest="${build.scoped-sar}/tmp" src="${jboss.security.lib}/jbosssx.jar">
-         <patternset>
-            <include name="org/jboss/security/SecurityAssociation*.class"/>
-            <include name="org/jboss/security/SecurityActions*.class"/>
-         </patternset>
-      </unjar>
-      <jar jarfile="${build.scoped-sar}/jboss-securityassociation.jar">
-         <fileset dir="${build.scoped-sar}/tmp" includes="**"/>
-      </jar>
-      -->
-
-      <delete dir="${build.scoped-sar}/tmp"/>
-   </target>
-
-   <target name="client-jar" depends="compile, scoped-sar">
-      <mkdir dir="${module.output}/jboss-messaging-client"/>
-
-      <unjar dest="${module.output}/jboss-messaging-client" src="${current.jboss.aop.lib}/jboss-aop.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${current.jboss.remoting.lib}/jboss-remoting.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${current.jboss.serialization.lib}/jboss-serialization.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${javassist.javassist.lib}/javassist.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${trove.trove.lib}/trove.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${build.scoped-sar}/jboss-common-softvaluehashmap.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${jboss.common.lib}/jboss-common-client.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${jboss.j2se.lib}/jboss-j2se.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${jboss.naming.lib}/jnp-client.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${oswego.concurrent.lib}/concurrent.jar"/>
-      <unjar dest="${module.output}/jboss-messaging-client" src="${apache.log4j.lib}/log4j.jar"/>
-
-      <jar jarfile="${build.lib}/jboss-messaging-client.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/**"/>
-         </fileset>
-         <fileset dir="${build.etc}">
-            <include name="VERSION"/>
-         </fileset>
-         <fileset dir="${module.output}/jboss-messaging-client">
-            <include name="VERSION"/>
-         </fileset>
-         <fileset dir="${module.output}/jboss-messaging-client" includes="**"/>
-      </jar>
-
-      <delete dir="${module.output}/jboss-messaging-client"/>
-   </target>
-
-   <!-- ================================================================== -->
-   <!-- Release tasks                                                      -->
-   <!-- ================================================================== -->
-
-   <target name="archive-functional" depends="release-structure">
-      <mkdir dir="./tests/output/jboss-messaging-functional-test-results-${module.version}"/>
-      <copy todir="./tests/output/jboss-messaging-functional-test-results-${module.version}">
-         <fileset dir="./tests/output/reports/html">
-            <include name="**"/>
-         </fileset>
-      </copy>
-      <zip destfile="${release.output}/test-results/jboss-messaging-functional-test-results-${module.version}.zip"
-           basedir="./tests/output" includes="jboss-messaging-functional-test-results-${module.version}/**"/>
-      <delete dir="./tests/output/jboss-messaging-functional-test-results-${module.version}"/>
-   </target>
-
-   <target name="archive-stress" depends="release-structure">
-      <mkdir dir="./tests/output/jboss-messaging-stress-test-results-${module.version}"/>
-      <copy todir="./tests/output/jboss-messaging-stress-test-results-${module.version}">
-         <fileset dir="./tests/output/reports/html">
-            <include name="**"/>
-         </fileset>
-      </copy>
-      <zip destfile="${release.output}/test-results/jboss-messaging-stress-test-results-${module.version}.zip"
-           basedir="./tests/output" includes="jboss-messaging-stress-test-results-${module.version}/**"/>
-      <delete dir="./tests/output/jboss-messaging-stress-test-results-${module.version}"/>
-   </target>
-
-   <target name="archive-smoke" depends="release-structure">
-      <copy todir="${release.output}/test-results">
-         <fileset dir="./tests/smoke/output">
-            <include name="*.html"/>
-         </fileset>
-      </copy>
-   </target>
-
-   <target name="release-bundle" depends="artifacts, release-structure, examples, userdoc, bundle-source, bundle-test-results, javadoc">
-
-      <copy todir="${release.output}" file="${build.lib}/jboss-${module.name}-scoped.sar"/>
-      <copy todir="${release.output}" file="${build.lib}/jboss-${module.name}-client.jar"/>
-      <copy todir="${release.output}" file="./docs/README.html"/>
-      <copy todir="${release.output}/api">
-         <fileset dir="${build.api}" includes="**"/>
-      </copy>
-      <copy todir="${release.output}/util">
-         <fileset dir="./util">
-            <include name="*.xml"/>
-            <exclude name="do-not-distribute*"/>
-         </fileset>
-      </copy>
-      <zip destfile="${build.lib}/jboss-messaging-${module.version}.zip"
-           basedir="${module.root}/release"/>
-      <echo message="Release bundle jboss-messaging-${module.version}.zip done"/>
-   </target>
-
-   <target name="release-structure" depends="init">
-      <property name="release.output" value="${module.root}/release/jboss-messaging-${module.version}"/>
-      <mkdir dir="${release.output}/util"/>
-      <mkdir dir="${release.output}/examples"/>
-      <mkdir dir="${release.output}/docs/userguide"/>
-      <mkdir dir="${release.output}/src"/>
-      <mkdir dir="${release.output}/test-results"/>
-   </target>
-
-   <!-- Note: This target must be ran after the smoke test -->
-   <target name="examples" depends="release-structure">
-      <copy todir="${release.output}/examples">
-         <fileset dir="./docs/examples">
-            <exclude name="programmatic-deployment"/>
-            <exclude name="**/do-not-distribute*"/>
-         </fileset>
-      </copy>
-      <copy todir="${release.output}/examples/config">
-         <fileset dir="./src/etc/server/default/deploy">
-            <include name="*-persistence-service.xml"/>
-         </fileset>
-      </copy>
-   </target>
-
-   <target name="userdoc" depends="release-structure">
-      <ant dir="./docs/gettingstarted" antfile="build.xml" target="all"/>
-      <copy todir="${release.output}/docs/userguide">
-         <fileset dir="${module.output}/docs/userguide/en">
-            <include name="**"/>
-            <exclude name="**/do-not-distribute*"/>
-         </fileset>
-      </copy>
-   </target>
-
-   <target name="bundle-source" depends="release-structure">
-      <zip destfile="${release.output}/src/jboss-messaging-${module.version}-src.zip"
-           basedir="${source.java}" excludes="**/CVS,*.iml"/>
-      <zip destfile="${release.output}/src/jboss-messaging-tests-${module.version}-src.zip"
-           basedir="${module.root}/tests/src" includes="org/jboss/test/**" excludes="**/CVS,*.iml"/>
-   </target>
-
-   <target name="bundle-test-results" depends="release-structure">
-      <available file="${release.output}/test-results/jboss-messaging-functional-test-results-${module.version}.zip"
-                 property="functional.test.results.present" value="true"/>
-      <fail message="Functional test results ${release.output}/test-results/jboss-messaging-functional-test-results-${module.version}.zip not available!"
-            unless="functional.test.results.present"/>
-      <available file="${release.output}/test-results/jboss-messaging-stress-test-results-${module.version}.zip"
-                 property="stress.test.results.present" value="true"/>
-      <fail message="Stress test results ${release.output}/test-results/jboss-messaging-stress-test-results-${module.version}.zip not available!"
-            unless="stress.test.results.present"/>
-
-      <!-- TODO
-      <available file="${release.output}/test-results/jboss-messaging-smoke-test-results-${module.version}.zip"
-                 property="smoke.test.results.present" value="true"/>
-      <fail message="Smoke test results ${release.output}/test-results/jboss-messaging-functional-smoke-results-${module.version}.zip not available!"
-            unless="smoke.test.results.present"/>
-      -->
-   </target>
-
-   <target name="javadoc" depends="compile">
-      <javadoc destdir="${build.api}" author="true" version="true" use="true" windowtitle="JBoss Messaging ${module.version}">
-
-         <packageset dir="${source.java}" defaultexcludes="yes">
-            <include name="org/jboss/**"/>
-         </packageset>
-
-         <doctitle><![CDATA[<h2>JBoss Messaging  ${module.version}</h2>]]></doctitle>
-         <bottom><![CDATA[<i>Copyright &#169; 2006 JBoss Inc. All Rights Reserved.</i>]]></bottom>
-         <tag name="todo" scope="all" description="To do:"/>
-         <group title="JMS Facade" packages="org.jboss.jms.*"/>
-         <group title="Messaging Core" packages="org.jboss.messaging.*"/>
-         <!--
-         <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp"/>
-         <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
-         -->
-      </javadoc>
-   </target>
-
-
-   <target name="deployscoped" depends="scoped-sar">
-      <copy file="${build.lib}/jboss-${module.name}-scoped.sar"
-            todir="${ENV.JBOSS_HOME}/server/default/deploy"/>
-   </target>
-
-   <target name="deploydefault" depends="jar">
-      <copy file="${build.lib}/jboss-${module.name}.sar"
-            todir="${ENV.JBOSS_HOME}/server/default/deploy"/>
-   </target>
-
-   <target name="undeploydefault" depends="init">
-      <delete file="${ENV.JBOSS_HOME}/server/default/deploy/jboss-${module.name}.sar"/>
-   </target>
-
-   <!-- ================================================================== -->
-   <!-- TCK tasks                                                          -->
-   <!-- ================================================================== -->
-
-   <target name="cts-deploy" depends="jar">
-      <copy file="${build.lib}/jboss-${module.name}.sar"
-         todir="${ENV.JBOSS_HOME}/server/cts-messaging/deploy"/>
-   </target>
-
-   <target name="cts-undeploy" depends="init">
-      <delete file="${ENV.JBOSS_HOME}/server/cts-messaging/deploy/jboss-${module.name}.sar"/>
-   </target>
-
-   <!-- ================================================================== -->
-   <!-- smoke test                                                         -->
-   <!-- ================================================================== -->
-
    <target name="smoke">
-      <ant dir="tests/smoke" antfile="build.xml" target="smoke-test" inheritAll="false"/>
+      <ant dir="tests/smoke" antfile="build.xml" target="all" inheritAll="false"/>
    </target>
 
-</project>
-
-
-
-
-
+</project>
\ No newline at end of file

Deleted: trunk/component-info.xml
===================================================================
--- trunk/component-info.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/component-info.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,11 +0,0 @@
-<project name="jms-component-info">
-   <component id="jms"
-              module="jboss-jms"
-              version="5.0-SNAPSHOT"
-   >
-      <artifact id="jboss-messaging.jar"/>
-      <export>
-         <include input="jboss-messaging.jar"/>
-      </export>
-   </component>
-</project>
\ No newline at end of file

Deleted: trunk/jbossbuild.xml
===================================================================
--- trunk/jbossbuild.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/jbossbuild.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- jms component definition                                        -->
-<!-- ================================================================== -->
-
-<project name="project" 
-         default="build" 
-         basedir="."
->
-   <!-- The main build -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-   <import file="component-info.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The component definition                                        -->
-   <!-- =============================================================== -->
-
-   <componentdef component="jms" 
-                 description="JBoss jms">
-
-      <!-- ============================================================ -->
-      <!-- The main source                                              -->
-      <!-- ============================================================ -->
-
-      <generatedsource id="sun-config-parser"
-                       srcdir="main"
-                       javacc="org/jboss/jms/selector/SelectorParser.jj"
-                       static="false"/>
-
-
-
-
-      <source id="main">
-         <include component="oswego-concurrent"/>
-         <include component="javassist"/>
-         <include component="jgroups"/>
-         <include component="junit"/>
-         <include component="common"/>
-         <include component="j2ee"/>
-         <include component="jboss/remoting"/>
-         <include component="aop"/>
-         <include component="aspects"/>
-         <include component="j2se"/>
-         <include component="system"/>
-         <include input="sun-config-parser"/>
-         <include component="server"/>
-         <include component="security"/>
-      </source>
-
-      <!-- ============================================================ -->
-      <!-- jboss-jms.jar                                             -->
-      <!-- ============================================================ -->
-
-      <artifactdef artifact="jboss-messaging.jar">
-         <include input="main">
-            <include pattern="org/jboss/**"/>
-         </include>
-      </artifactdef>
-
-    
-   </componentdef>
-
-   <!-- Generate the targets -->   
-   <generate generate="jms"/>
-
-</project>

Added: trunk/lib/README.txt
===================================================================
--- trunk/lib/README.txt	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/lib/README.txt	2006-08-01 18:12:23 UTC (rev 1028)
@@ -0,0 +1 @@
+jboss-remoting.jar        2.0.0.Beta2 (locally built with minor fix in TimerUtil.java to make Timer daemon, and bound connection pool fix and removal of log.isTraceEnabled in MicroSockectClientInvoker)

Added: trunk/lib/jboss-j2ee.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss-j2ee.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jboss-j2se.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss-j2se.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jboss-jmx.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss-jmx.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jboss-remoting.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss-remoting.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jboss-system.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss-system.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jboss-transaction.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss-transaction.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jboss.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jboss.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jbosssx.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jbosssx.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/jnp-client.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/jnp-client.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: trunk/tests/.cvsignore
===================================================================
--- trunk/tests/.cvsignore	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tests/.cvsignore	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,2 +0,0 @@
-output
-*.log

Deleted: trunk/tests/bin/.cvsignore
===================================================================
--- trunk/tests/bin/.cvsignore	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tests/bin/.cvsignore	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1 +0,0 @@
-.testrc

Modified: trunk/tests/bin/runtest
===================================================================
--- trunk/tests/bin/runtest	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tests/bin/runtest	2006-08-01 18:12:23 UTC (rev 1028)
@@ -38,6 +38,14 @@
    TEST_SERIALIZATION=$ENV_TEST_SERIALIZATION
 fi
 
+#
+# We should use the same test execution classpath as the ant <junit> task, so we run ant to get
+# it from there.
+#
+
+ant -Dtest.execution.classpath.file=bin/.test.execution.classpath -f $reldir/../build.xml get-test-execution-classpath
+CLASSPATH=`cat $reldir/.test.execution.classpath`
+
 outputdir="$reldir/../output"
 
 if ! mkdir -p $outputdir/logs; then
@@ -88,23 +96,6 @@
 
 JAVA_OPTS="-Xmx1024M $JAVA_OPTS -Dmodule.output=$reldir/../output $REMOTE_TEST -Dtest.database=$TEST_DATABASE -Dtest.serialization=$TEST_SERIALIZATION"
 
-#
-# Local path overrides
-#
-
-#REMOTING_LIB=$reldir/../../../thirdparty/jboss/remoting/lib/jboss-remoting.jar
-REMOTING_LIB=$reldir/../../src/resources/jboss-remoting.jar
-
-#SERIALIZATION_LIB=$reldir/../../../thirdparty/jboss/serialization/lib/jboss-serialization.jar
-SERIALIZATION_LIB=$reldir/../../src/resources/jboss-serialization.jar
-
-#AOP_LIB=$reldir/../../../aop/output/lib/jboss-aop.jar
-AOP_LIB=$reldir/../../src/resources/jboss-aop.jar
-
-JGROUPS_LIB=$reldir/../../../thirdparty/jgroups/lib/jgroups.jar
-#JGROUPS_LIB=$reldir/../resources/jgroups-core.jar
-
-
 if [ "$TARGET_TEST" != "" ]; then
    TARGET_TEST="-t $TARGET_TEST"
 fi
@@ -114,47 +105,9 @@
   $reldir/start-rmi-server $REMOTE_DEBUG_FLAG
 fi
 
-java $JAVA_OPTS -cp \
-$reldir/../etc${SEP}\
-$reldir/../../src/etc${SEP}\
-$reldir/../../output/etc${SEP}\
-$reldir/../output/classes${SEP}\
-$reldir/../../output/lib/jboss-messaging.jar${SEP}\
-$reldir/../../../thirdparty/apache-log4j/lib/log4j.jar${SEP}\
-$reldir/../../../thirdparty/apache-logging/lib/commons-logging.jar${SEP}\
-$reldir/../../../thirdparty/junit/lib/junit.jar${SEP}\
-$reldir/../../../thirdparty/oswego-concurrent/lib/concurrent.jar${SEP}\
-$reldir/../../../thirdparty/javassist/lib/javassist.jar${SEP}\
-$reldir/../../../thirdparty/trove/lib/trove.jar${SEP}\
-$reldir/../../../thirdparty/apache-httpclient/lib/commons-httpclient.jar${SEP}\
-$reldir/../../../thirdparty/dom4j/lib/dom4j.jar${SEP}\
-$reldir/../../../thirdparty/sun-servlet/lib/servlet-api.jar${SEP}\
-$reldir/../../src/resources/hsqldb.jar${SEP}\
-$reldir/../../src/resources/mysql-connector-java-3.0.17-ga-bin.jar${SEP}\
-$reldir/../../src/resources/ojdbc14.jar${SEP}\
-$reldir/../../src/resources/postgresql-8.1-405.jdbc3.jar${SEP}\
-$reldir/../../../naming/output/lib/jnp-client.jar${SEP}\
-${REMOTING_LIB}${SEP}\
-${SERIALIZATION_LIB}${SEP}\
-${AOP_LIB}${SEP}\
-$reldir/../../../j2ee/output/lib/jboss-j2ee.jar${SEP}\
-$reldir/../../../j2se/output/lib/jboss-j2se.jar${SEP}\
-$reldir/../../../jmx/output/lib/jboss-jmx.jar${SEP}\
-$reldir/../../../mbeans/output/lib/jboss-mbeans.jar${SEP}\
-$reldir/../../../common/output/lib/jboss-common.jar${SEP}\
-$reldir/../../../common/output/lib/jboss-xml-binding.jar${SEP}\
-$reldir/../../../system/output/lib/jboss-system.jar${SEP}\
-$reldir/../../../transaction/output/lib/jboss-transaction.jar${SEP}\
-$reldir/../../../security/output/lib/jbosssx.jar${SEP}\
-$reldir/../../../connector/output/lib/jboss-local-jdbc.jar${SEP}\
-$reldir/../../../connector/output/lib/jboss-common-jdbc-wrapper.jar${SEP}\
-$reldir/../../../connector/output/lib/jboss-jca.jar${SEP}\
-$reldir/../../../connector/output/lib/jms-ra.jar${SEP}\
-$reldir/../../../server/output/lib/jboss.jar${SEP}\
-$reldir/../../../build/output/jboss-5.0.0.Alpha/client/jbossall-client.jar${SEP}\
-${JGROUPS_LIB}${SEP}\
- org.jboss.test.messaging.tools.junit.SelectiveTestRunner $TARGET_CLASS $TARGET_TEST
 
+$JAVA_HOME/bin/java $JAVA_OPTS -cp "$CLASSPATH" \
+org.jboss.test.messaging.tools.junit.SelectiveTestRunner $TARGET_CLASS $TARGET_TEST
 
 if [ "$isRemote" = "true" ]; then
   $reldir/stop-rmi-server

Modified: trunk/tests/build.sh
===================================================================
--- trunk/tests/build.sh	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tests/build.sh	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,180 +1,7 @@
 #!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
 
-# $Id$
 
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
+reldir=`dirname $0`
 
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
+$ANT_HOME/bin/ant -lib $reldir/../thirdparty/junit/lib/junit.jar "$@" 
 
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0 -Xmx512M"
-
-    # debugging options
-    #ANT_OPTS="$ANT_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=antitself"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # override properties locally
-    if [ -f $DIRNAME/build.properties ]; then
-         LOCAL_PROPERTIES="-propertyfile $DIRNAME/build.properties"
-    fi
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS $LOCAL_PROPERTIES "$@"
-    else
-	exec $ANT $ANT_OPTIONS $LOCAL_PROPERTIES "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Modified: trunk/tests/build.xml
===================================================================
--- trunk/tests/build.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tests/build.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -1,222 +1,294 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY libraries SYSTEM "../../thirdparty/libraries.ent">
-   <!ENTITY modules SYSTEM "../../tools/etc/buildmagic/modules.ent">
-]>
 
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- JBoss, Home of Professional Open Source                                                     -->
+<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
+<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
+<!-- full listing of individual contributors.                                                    -->
+<!--                                                                                             -->
+<!-- This is free software; you can redistribute it and/or modify it                             -->
+<!-- under the terms of the GNU Lesser General Public License as                                 -->
+<!-- published by the Free Software Foundation; either version 2.1 of                            -->
+<!-- the License, or (at your option) any later version.                                         -->
+<!--                                                                                             -->
+<!-- This software is distributed in the hope that it will be useful,                            -->
+<!-- but WITHOUT ANY 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 along with this software; if not, write to the Free                                 -->
+<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
+<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
 
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
 <!-- $Id$ -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
 
-<project default="tests" name="JBoss/Messaging">
+<project default="tests" name="JBoss Messaging Tests">
 
-   <!-- overridden to resolve thirdparty & module deps -->
-   <dirname property="remote.root" file="${basedir}"/>
-   <dirname property="project.root" file="${remote.root}"/>
+   <!--
+        'tests' is Messaging's subproject, we're relying on the main project thirdparty and lib
+        directories.
+   -->
+   <property name="project.root" value="${basedir}/.."/>
 
-   <import file="../../tools/etc/buildmagic/build-common.xml"/>
+   <!--
+        Import Messaging's properties, paths and everything else.
+   -->
+   <import file="../build-messaging.xml"/>
 
-   <!-- ================================================================== -->
-   <!-- Configuration                                                      -->
-   <!-- ================================================================== -->
+   <!-- ======================================================================================== -->
+   <!-- Configuration                                                                            -->
+   <!-- ======================================================================================== -->
 
-   <!-- Module name(s) & version -->
-   <property name="module.name" value="jms"/>
-   <property name="module.Name" value="JBoss Messaging"/>
-   <property name="module.version" value="1.0.1"/>
+   <property name="build.tests.remote" value="false"/>
+   <property name="test.bind.address" value="localhost"/>
 
+   <!--
+        Functional tests.
+   -->
 
-   <property environment="ENV"/>
+   <property name="functional.tests.database" value="hsqldb"/>
+   <property name="functional.tests.serialization" value="jboss"/>
 
-   <!-- ========= -->
-   <!-- Libraries -->
-   <!-- ========= -->
-   &libraries;
-
    <!--
-       Sometimes I need to locally patch a library and use the local version (src/resources),
-       until the change makes it to thirdparty. This is how you can locally override a library.
-       To use the thirdparty library, just comment out the path definition below.
+        Stress tests.
    -->
 
+   <property name="stress.tests.database" value="mysql"/>
+   <property name="stress.tests.serialization" value="jboss"/>
+
    <!--
-   <path id="jgroups.jgroups.classpath">
-      <pathelement path="${module.root}/../src/resources/jgroups-core.jar"/>
-   </path>
+        Project paths.
    -->
 
-   <!-- The combined library classpath -->
-   <path id="library.classpath">
-      <path refid="apache.log4j.classpath"/>
-      <path refid="jboss.profiler.jvmti.classpath"/>
-      <path refid="oswego.concurrent.classpath"/>
-      <path refid="junit.junit.classpath"/>
-      <path refid="javassist.classpath"/>
-      <path refid="trove.classpath"/>
-      <path refid="dom4j.dom4j.classpath"/>
-      <path refid="jgroups.jgroups.classpath"/>
-      <path refid="sun.servlet.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <path refid="apache.tomcat.classpath"/>
+   <property name="tests.root" value="${basedir}"/>
+   <property name="source.tests.java" value="${tests.root}/src"/>
+   <property name="source.tests.stylesheets" value="${source.tests.java}/stylesheets"/>
+   <property name="tests.output" value="${tests.root}/output"/>
+   <property name="build.tests.classes" value="${tests.output}/classes"/>
+   <property name="build.tests.lib" value="${tests.output}/lib"/>
+   <property name="build.tests.reports" value="${tests.output}/reports"/>
+   <property name="build.tests.stylesheets" value="${tests.output}/stylesheets"/>
+   <property name="build.tests.archive" value="jboss-messaging-tests.jar"/>
+   <property name="build.tests.ejbarchive" value="jboss-messaging-tests-ejb.jar"/>
 
+   <!--
+        JUnit configuration
+   -->
 
-      <path location="../src/resources/hsqldb.jar"/>
-      <path location="../src/resources/jcommon-1.0.0-rc1.jar"/>
-      <path location="../src/resources/jfreechart-1.0.0-rc1.jar"/>
-      <path location="../src/resources/jboss-remoting.jar"/>
-      <!-- MySQl JDBC driver -->
-      <path location="../src/resources/mysql-connector-java-3.1.13-bin.jar"/>
-      <!-- Oracle JDBC driver -->
-      <path location="../src/resources/ojdbc14.jar"/>
-      <!-- PostgreSQL JDBC driver -->
-      <path location="../src/resources/postgresql-8.1-405.jdbc3.jar"/>
+   <property name="junit.printsummary" value="true"/>
+   <property name="junit.haltonerror" value="false"/>
+   <property name="junit.haltonfailure" value="false"/>
+   <property name="junit.fork" value="false"/>
+   <property name="junit.includeantruntime" value="true"/>
+   <property name="junit.timeout" value="600000"/>
 
-   </path>
+   <property name="junit.timeout2" value="300000"/>
+   <property name="stress.timeout" value="4800000"/>
 
-   <!-- ======= -->
-   <!-- Modules -->
-   <!-- ======= -->
-   &modules;
+   <property name="junit.showoutput" value="true"/>
+   <property name="junit.jvm" value=""/>
+   <property name="junit.jvm.options" value=""/>
+   <property name="junit.formatter.usefile" value="true"/>
+   <property name="junit.batchtest.todir" value="${build.tests.reports}"/>
+   <property name="junit.batchtest.haltonerror" value="false"/>
+   <property name="junit.batchtest.haltonfailure" value="false"/>
+   <property name="junit.batchtest.fork" value="false"/>
+   <property name="junit.test.haltonfailure" value="false"/>
+   <property name="junit.test.haltonerror" value="false"/>
 
    <!--
-       Sometimes I need to locally patch a library and use the local version (src/resources),
-       until the change makes it to thridpary. This is how you can locally override a library.
-       To use the thirdparty library, just comment out the path definition below.
+        Locally maintained dependencies.
    -->
 
-   <!-- The combined dependent module classpath -->
-   <path id="dependentmodule.classpath">
-      <path refid="jboss.jms.classpath"/>
-      <path refid="jboss.common.classpath"/>
-      <path refid="jboss.jbossxb.classpath"/>
-      <path refid="jboss.j2ee.classpath"/>
-      <path refid="jboss.j2se.classpath"/>
-      <path refid="jboss.jmx.classpath"/>
-      <path refid="jboss.mbeans.classpath"/>
-      <path refid="jboss.serialization.classpath"/>
-      <path refid="jboss.aop.classpath"/>
-      <path refid="jboss.aspects.classpath"/>
-      <path refid="jboss.system.classpath"/>
-      <path refid="jboss.transaction.classpath"/>
-      <path refid="jboss.naming.classpath"/>
-      <path refid="jboss.server.classpath"/>
-      <path refid="jboss.remoting.classpath"/>
-      <path refid="jboss.security.classpath"/>
+   <path id="jboss.server.classpath">
+      <pathelement location="${jboss.server.lib}/jboss.jar"/>
+   </path>
 
-      <!-- these are only required to compile test support -->
-      <path refid="jboss.jca.classpath"/>
+   <property name="jboss.jca.lib" value="${tests.root}/lib"/>
+   <path id="jboss.jca.classpath">
+      <pathelement path="${jboss.jca.lib}/jboss-jca.jar"/>
+      <pathelement path="${jboss.jca.lib}/jboss-local-jdbc.jar"/>
+      <pathelement path="${jboss.jca.lib}/jboss-common-jdbc-wrapper.jar"/>
+      <pathelement path="${jboss.jca.lib}/jms-ra.jar"/>
+   </path>
 
-      <!-- jms-ra.jar -->
-      <path location="${jboss.jca.lib}/jms-ra.jar"/>
-
+   <property name="jboss.mbeans.lib" value="${tests.root}/lib"/>
+   <path id="jboss.mbeans.classpath">
+      <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
    </path>
 
-   <!-- ==================== -->
-   <!-- Local path overrides -->
-   <!-- ==================== -->
+   <!--
+       JDBC Drivers.
+   -->
 
-   <path id="jboss.remoting.classpath">
-      <pathelement path="${module.root}/../src/resources/jboss-remoting.jar"/>
+   <path id="mysql.jdbc.driver.classpath">
+      <pathelement path="${tests.root}/lib/mysql-connector-java-3.1.13-bin.jar"/>
    </path>
 
-   <path id="jboss.serialization.classpath">
-       <pathelement path="${module.root}/../src/resources/jboss-serialization.jar"/>
+   <path id="oracle.jdbc.driver.classpath">
+      <pathelement path="${tests.root}/lib/ojdbc14.jar"/>
    </path>
 
-   <path id="jboss.aop.classpath">
-       <pathelement path="${module.root}/../src/resources/jboss-aop.jar"/>
+   <path id="postgres.jdbc.driver.classpath">
+      <pathelement path="${tests.root}/postgresql-8.1-405.jdbc3.jar"/>
    </path>
 
-   <path id="jboss.aspects.classpath">
-       <pathelement path="${module.root}/../src/resources/jboss-aspects.jar"/>
+   <!--
+        The compilation classpath.
+   -->
+
+   <path id="test.compilation.classpath">
+      <path refid="compilation.classpath"/>
+      <path location="../output/lib/jboss-messaging.jar"/>
+      <path refid="junit.junit.classpath"/>
+      <path refid="hsqldb.hsqldb.classpath"/>
+      <path refid="jboss.server.classpath"/> <!-- for org.jboss.jms.jndi.JNDIProviderAdapter -->
+      <path refid="jboss.jca.classpath"/>  <!-- for org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory, etc -->
+      <path refid="jboss.profiler.jvmti.classpath"/>
    </path>
 
    <!--
-   <path id="jgroups.jgroups.classpath">
-        <pathelement path="${module.root}/src/resources/jgroups-core.jar"/>
-   </path>
+        The execution classpath.
    -->
 
+   <path id="test.execution.classpath">
+      <pathelement location="${tests.root}/etc"/>
+      <pathelement location="${build.tests.classes}"/>
+      <pathelement location="${project.root}/src/etc"/> <!-- server's configuration files -->
+      <path refid="test.compilation.classpath"/>
+      <path refid="dom4j.dom4j.classpath"/>
+      <path refid="apache.log4j.classpath"/>
+      <path refid="jboss.mbeans.classpath"/>
+      <path refid="jboss.jbossxb.classpath"/>
+      <path refid="mysql.jdbc.driver.classpath"/>
+      <path refid="oracle.jdbc.driver.classpath"/>
+      <path refid="postgres.jdbc.driver.classpath"/>
+   </path>
 
 
+   <!--  This is the complete execution classpath of the CVS latest snapshot -->
+<path id="test.execution.classpath2">
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-log4j/lib/log4j.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/jboss/profiler/jvmti/lib/jboss-profiler-jvmti.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/junit/lib/junit.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/javassist/lib/javassist.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/trove/lib/trove.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/dom4j/lib/dom4j.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/jgroups/lib/jgroups.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/sun-servlet/lib/jsp-api.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-collections/lib/commons-collections.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-logging/lib/commons-logging.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-pool/lib/commons-pool.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-discovery/lib/commons-discovery.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-lang/lib/commons-lang-2.0.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/catalina-ant.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/catalina.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/el-api.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/jasper-el.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/jasper-jdt.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/jasper.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/jsp-api.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/servlet-api.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/tomcat-coyote.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/tomcat-dbcp.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/tomcat-i18n-es.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/tomcat-i18n-fr.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/apache-tomcat/lib/tomcat-i18n-ja.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/hsqldb.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/jcommon-1.0.0-rc1.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/jfreechart-1.0.0-rc1.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/jboss-remoting.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/mysql-connector-java-3.1.13-bin.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/ojdbc14.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/postgresql-8.1-405.jdbc3.jar"/>
+<pathelement location="C:/work/jboss-messaging/output/lib/jboss-messaging.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/jboss/common/lib/namespace.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/jboss/common/lib/jboss-common.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/jboss/common/lib/jboss-archive-browsing.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/j2ee/output/lib/jboss-j2ee.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/j2ee/output/lib/jboss-jaxrpc.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/j2ee/output/lib/jboss-saaj.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/j2se/output/lib/jboss-j2se.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jmx/output/lib/jboss-jmx.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/mbeans/output/lib/jboss-mbeans.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/jboss-serialization.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/jboss-aop.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/jms/src/resources/jboss-aspects.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/system/output/lib/jboss-system.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/transaction/output/lib/jboss-transaction.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/naming/output/lib/jnpserver.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/server/output/lib/jboss.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/server/output/lib/jmx-adaptor-plugin.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/security/output/lib/jbosssx.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/connector/output/lib/jboss-jca.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/connector/output/lib/jboss-local-jdbc.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/connector/output/lib/jboss-ha-local-jdbc.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/connector/output/lib/jboss-common-jdbc-wrapper.jar"/>
+<pathelement location="C:/work/src/cvs/jboss-head/connector/output/lib/jms-ra.jar"/>
+<pathelement location="C:/work/jboss-messaging/tests/etc"/>
+<pathelement location="C:/work/jboss-messaging/src/etc"/>
+<pathelement location="C:/work/jboss-messaging/output/etc"/>
+<pathelement location="C:/work/jboss-messaging/tests/output/classes"/>
+  </path>
 
-   <!-- ===== -->
-   <!-- Tasks -->
-   <!-- ===== -->
 
-   <property name="source.tests.java" value="${module.source}"/>
-   <property name="source.tests.stylesheets" value="${module.source}/stylesheets"/>
-   <property name="build.tests.classes" value="${module.output}/classes"/>
-   <property name="build.tests.lib" value="${module.output}/lib"/>
-   <property name="build.tests.reports" value="${module.output}/reports"/>
-   <property name="build.tests.stylesheets" value="${module.output}/stylesheets"/>
-   <property name="build.tests.archive" value="jboss-messaging-tests.jar"/>
-   <property name="build.tests.ejbarchive" value="jboss-messaging-tests-ejb.jar"/>
-   <property name="build.tests.remote" value="false"/>
-   <property name="test.bind.address" value="localhost"/>
-
-   <property name="functional.tests.database" value="hsqldb"/>
-   <property name="functional.tests.serialization" value="jboss"/>
-   <property name="stress.tests.database" value="mysql"/>
-   <property name="stress.tests.serialization" value="jboss"/>
-
-   <path id="test.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-      <pathelement path="${module.root}/etc"/>
-      <pathelement path="${module.root}/../src/etc"/>
-      <pathelement path="${module.root}/../output/etc"/>
+   <path id="stress.test.execution.classpath">
+      <pathelement path="${tests.root}/etc/stress"/>
+      <path refid="test.execution.classpath"/>
    </path>
 
-   <path id="stress.test.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-      <pathelement path="${module.root}/etc/stress"/>
-      <pathelement path="${module.root}/etc"/>
-      <pathelement path="${module.root}/../src/etc"/>
-      <pathelement path="${module.root}/../output/etc"/>
-   </path>
+   <!-- ======================================================================================== -->
+   <!-- Compilation Tasks                                                                        -->
+   <!-- ======================================================================================== -->
 
-   <!-- Compile all test files -->
    <target name="compile">
 
       <mkdir dir="${build.tests.classes}"/>
-
       <javac destdir="${build.tests.classes}"
-         optimize="${javac.optimize}"
-         target="1.4"
-         source="1.4"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
+             optimize="${javac.optimize}"
+             target="1.4"
+             source="1.4"
+             debug="${javac.debug}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
          <src path="${source.tests.java}"/>
-         <classpath refid="test.classpath"/>
+         <classpath refid="test.compilation.classpath"/>
          <include name="**/*.java"/>
       </javac>
 
-      <!-- Call rmi compiler to create stub for server -->
-      <rmic base="${build.tests.classes}" includes="**/RMITestServer.class,**/RMINamingDelegate.class">
-         <classpath refid="test.classpath"/>
+      <!--
+           RMI compilation to to create stub for server.
+      -->
+      <rmic base="${build.tests.classes}"
+            includes="**/RMITestServer.class,**/RMINamingDelegate.class">
+         <classpath refid="test.compilation.classpath"/>
       </rmic>
    </target>
 
-   <target name="tests-jar"
-           depends="compile"
-           description="Creates the jar file with all the tests">
+   <!-- ======================================================================================== -->
+   <!-- Archival Tasks                                                                           -->
+   <!-- ======================================================================================== -->
 
+   <target name="tests-jar" depends="compile">
+
       <mkdir dir="${build.tests.lib}"/>
-
-      <!-- Build the tests jar -->
       <jar jarfile="${build.tests.lib}/${build.tests.archive}">
          <fileset dir="${build.tests.classes}">
             <include name="org/jboss/test/messaging/**"/>
@@ -224,53 +296,29 @@
       </jar>
    </target>
 
-   <!--
-      The values from imported files or set by the calling ant tasks will take precedence over
-      the values specified below.
+   <!-- ======================================================================================== -->
+   <!-- Execution Helper Tasks                                                                   -->
+   <!-- ======================================================================================== -->
 
-      Specifically, these value are overriden by those read from ./build.properties!
-   -->
-   <property name="junit.printsummary" value="true"/>
-   <property name="junit.haltonerror" value="false"/>
-   <property name="junit.haltonfailure" value="false"/>
-   <property name="junit.fork" value="false"/>
-   <property name="junit.includeantruntime" value="true"/>
-   <property name="junit.timeout" value="600000"/>
-
-   <property name="junit.timeout2" value="300000"/>
-
-   <property name="stress.timeout" value="4800000"/>
-
-   <property name="junit.showoutput" value="true"/>
-   <property name="junit.jvm" value=""/>
-   <property name="junit.jvm.options" value=""/>
-   <property name="junit.formatter.usefile" value="true"/>
-   <property name="junit.batchtest.todir" value="${build.tests.reports}"/>
-   <property name="junit.batchtest.haltonerror" value="false"/>
-   <property name="junit.batchtest.haltonfailure" value="false"/>
-   <property name="junit.batchtest.fork" value="false"/>
-   <property name="junit.test.haltonfailure" value="false"/>
-   <property name="junit.test.haltonerror" value="false"/>
-
-   <target name="prepare-testdirs"
-           description="Prepares the directory structure required by a test run">
+   <target name="prepare-testdirs">
       <mkdir dir="${build.tests.reports}"/>
-      <mkdir dir="${module.output}/logs"/>
+      <mkdir dir="${tests.output}/logs"/>
    </target>
 
    <target name="clear-test-logs" unless="test.logs.cleared">
+
       <!-- At the beginning of a test run, clean up the logs, since log4j runs in "append" mode -->
-      <echo message="Cleaning test logs ${module.output}/logs/*.log"/>
+      <echo message="Cleaning test logs ${tests.output}/logs/*.log"/>
       <delete quiet="true">
-         <fileset dir="${module.output}/logs" includes="*.log"/>
+         <fileset dir="${tests.output}/logs" includes="*.log"/>
       </delete>
       <property name="test.logs.cleared" value="true"/>
    </target>
 
-   <target name="start-rmi-server"
-           description="Starts the RMI server used by remote tests">
+   <target name="start-rmi-server" description="Starts the RMI server used by remote tests">
+
       <java classname="org.jboss.test.messaging.tools.jmx.rmi.RMITestServer" fork="true" spawn="true">
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="remote.test.suffix" value="-remote"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
@@ -278,51 +326,37 @@
          <!--
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/>
          -->
-         <classpath>
-            <pathelement location="${module.output}/classes"/>
-            <pathelement location="${module.root}/../output/classes"/>
-            <path refid="test.classpath"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
       </java>
    </target>
 
-   <target name="start-rmi-server-stress"
-           description="Starts the RMI server used by remote stress tests">
+   <target name="start-rmi-server-stress" description="Starts the RMI server used by remote stress tests">
+
       <java classname="org.jboss.test.messaging.tools.jmx.rmi.RMITestServer" fork="true" spawn="true">
          <jvmarg value="-Xmx768M"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="remote.test.suffix" value="-remote"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${stress.tests.database}"/>
          <sysproperty key="test.serialization" value="${stress.tests.serialization}"/>
          <!-- <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/> -->
-         <classpath>
-            <path refid="stress.test.classpath"/>
-            <pathelement location="${module.output}/classes"/>
-            <pathelement location="${module.root}/../output/classes"/>
-         </classpath>
+         <classpath refid="stress.test.execution.classpath"/>
       </java>
    </target>
 
    <target name="stop-rmi-server" description="Stops the RMI server used by remote tests">
-      <java classname="org.jboss.test.messaging.tools.jmx.rmi.StopRMIServer">
-         <classpath>
-            <path refid="jboss.common.classpath"/>
-            <path refid="jboss.j2ee.classpath"/>
-            <path refid="jboss.remoting.classpath"/>
-            <path refid="jboss.j2se.classpath"/>
-            <path refid="jboss.system.classpath"/>
-            <pathelement location="${module.root}/etc"/>
-            <pathelement location="${module.output}/classes"/>
-            <pathelement location="${module.root}/../output/classes"/>
-         </classpath>
-      </java>
+      <java classname="org.jboss.test.messaging.tools.jmx.rmi.StopRMIServer"
+            classpathref="test.execution.classpath"/>
    </target>
 
+   <!-- ======================================================================================== -->
+   <!-- Test Execution Tasks                                                                     -->
+   <!-- ======================================================================================== -->
+
    <target name="tests" depends="tests-jar, prepare-testdirs, clear-test-logs">
-      <antcall target="crash-tests"/>
+      <!--<antcall target="crash-tests"/>-->
       <antcall target="invm-tests"/>
-      <antcall target="remote-tests"/>
+      <!-- <antcall target="remote-tests"/> -->
    </target>
 
    <target name="stress-tests" depends="tests-jar, prepare-testdirs, clear-test-logs">
@@ -330,43 +364,46 @@
       <antcall target="remote-stress-tests"/>
    </target>
 
+   <target name="invm-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
+           description="Runs all available tests an in-VM configuration">
 
-  <target name="invm-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
-      description="Runs all available tests an in-VM configuration">
+      <display-path path="test.execution.classpath"/>
 
-      <antcall target="print-testclasspath"/>
-
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="${junit.includeantruntime}"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${junit.timeout2}">
+             fork="${junit.fork}"
+             includeantruntime="${junit.includeantruntime}"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${junit.timeout2}">
 
          <sysproperty key="remote" value="false"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
-         <sysproperty key="jboss.jms.lib" value="${jboss.jms.lib}"/>
-         <jvmarg value="-Xmx512M"/>
+         <sysproperty key="build.lib" value="${build.lib}"/>
+         <jvmarg value="-Xmx1024M"/>
          <!--
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
          -->
-         <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
          <formatter type="xml" usefile="${junit.formatter.usefile}"/>
          <batchtest fork="${junit.batchtest.fork}"
-            todir="${junit.batchtest.todir}"
-            haltonfailure="${junit.batchtest.haltonfailure}"
-            haltonerror="${junit.batchtest.haltonerror}">
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
             <formatter type="plain" usefile="${junit.formatter.usefile}"/>
             <fileset dir="${build.tests.classes}">
                <!-- <include name="org/jboss/test/messaging/jms/JMSTest.class"/> -->
-               <include name="**/messaging/**/*Test.class"/>
+
+
+               <!--
+               <include name="**/messaging/core/paging/**/*Test.class"/>
+               <include name="**/messaging/core/plugin/**/*Test.class"/>
+               -->
+
+               <include name="**/messaging/core/**/*Test.class"/>
                <include name="**/messaging/jms/**/*Test.class"/>
                <exclude name="**/jms/stress/**"/>
                <exclude name="**/jms/crash/*Test.class"/>
@@ -378,83 +415,77 @@
       </junit>
    </target>
 
-     <target name="memory-leak-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
-         description="Runs memory-leak tests using JBossProfiler in-VM configuration">
+   <target name="memory-leak-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
+           description="Runs memory-leak tests using JBossProfiler in-VM configuration">
 
-         <property name="ostarget" value="windows"/>
-         <antcall target="print-testclasspath"/>
+      <property name="ostarget" value="windows"/>
+      <display-path path="test.execution.classpath"/>
 
-         <junit printsummary="${junit.printsummary}"
-            fork="${junit.fork}"
-            includeantruntime="${junit.includeantruntime}"
-            haltonerror="${junit.haltonerror}"
-            haltonfailure="${junit.haltonfailure}"
-            showoutput="${junit.showoutput}"
-            timeout="${junit.timeout2}">
+      <junit printsummary="${junit.printsummary}"
+             fork="${junit.fork}"
+             includeantruntime="${junit.includeantruntime}"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${junit.timeout2}">
 
-            <sysproperty key="remote" value="false"/>
-            <sysproperty key="module.output" value="${module.output}"/>
-            <sysproperty key="test.bind.address" value="${test.bind.address}"/>
-            <sysproperty key="test.database" value="${functional.tests.database}"/>
-            <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
-            <sysproperty key="jboss.jms.lib" value="${jboss.jms.lib}"/>
-            <jvmarg value="-Xmx512M"/>
-            <jvmarg value="-agentpath:${jboss.profiler.jvmti.lib}/bin/windows/jbossAgent.dll"/>
-            <!--
-            <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
-            -->
-            <classpath>
-               <path refid="test.classpath"/>
-               <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-            </classpath>
-            <formatter type="xml" usefile="${junit.formatter.usefile}"/>
-            <batchtest fork="${junit.batchtest.fork}"
-               todir="${junit.batchtest.todir}"
-               haltonfailure="${junit.batchtest.haltonfailure}"
-               haltonerror="${junit.batchtest.haltonerror}">
-               <formatter type="plain" usefile="${junit.formatter.usefile}"/>
-               <fileset dir="${build.tests.classes}">
-                  <!-- <include name="org/jboss/test/messaging/jms/JMSTest.class"/> -->
-                  <include name="**/jms/MemLeakTest.class"/>
-                  <!-- TODO Exclude all distributed tests until after 1.0 release -->
-                  <exclude name="**/messaging/core/distributed/**/*Test.class"/>
-               </fileset>
-            </batchtest>
-         </junit>
-      </target>
+         <sysproperty key="remote" value="false"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
+         <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+         <sysproperty key="test.database" value="${functional.tests.database}"/>
+         <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
+         <sysproperty key="build.lib" value="${build.lib}"/>
+         <jvmarg value="-Xmx512M"/>
+         <jvmarg value="-agentpath:${jboss.profiler.jvmti.lib}/bin/windows/jbossAgent.dll"/>
+         <!--
+         <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
+         -->
+         <classpath refid="test.execution.classpath"/>
+         <formatter type="xml" usefile="${junit.formatter.usefile}"/>
+         <batchtest fork="${junit.batchtest.fork}"
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
+            <formatter type="plain" usefile="${junit.formatter.usefile}"/>
+            <fileset dir="${build.tests.classes}">
+               <!-- <include name="org/jboss/test/messaging/jms/JMSTest.class"/> -->
+               <include name="**/jms/MemLeakTest.class"/>
+               <!-- TODO Exclude all distributed tests until after 1.0 release -->
+               <exclude name="**/messaging/core/distributed/**/*Test.class"/>
+            </fileset>
+         </batchtest>
+      </junit>
+   </target>
 
-<target name="ref-test" depends="tests-jar, prepare-testdirs, clear-test-logs"
-      description="Runs all available tests an in-VM configuration">
+   <target name="ref-test" depends="tests-jar, prepare-testdirs, clear-test-logs"
+           description="Runs all available tests an in-VM configuration">
 
-      <antcall target="print-testclasspath"/>
+      <display-path path="test.execution.classpath"/>
 
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="${junit.includeantruntime}"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${junit.timeout2}">
+             fork="${junit.fork}"
+             includeantruntime="${junit.includeantruntime}"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${junit.timeout2}">
 
          <sysproperty key="remote" value="false"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
-         <sysproperty key="jboss.jms.lib" value="${jboss.jms.lib}"/>
+         <sysproperty key="build.lib" value="${build.lib}"/>
          <jvmarg value="-Xmx512M"/>
          <!--
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
          -->
-         <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
          <formatter type="xml" usefile="${junit.formatter.usefile}"/>
          <batchtest fork="${junit.batchtest.fork}"
-            todir="${junit.batchtest.todir}"
-            haltonfailure="${junit.batchtest.haltonfailure}"
-            haltonerror="${junit.batchtest.haltonerror}">
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
             <formatter type="plain" usefile="${junit.formatter.usefile}"/>
             <fileset dir="${build.tests.classes}">
                <!-- <include name="org/jboss/test/messaging/jms/JMSTest.class"/> -->
@@ -469,21 +500,21 @@
       </junit>
    </target>
 
-  <target name="invm-stress-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
-      description="Runs all stress tests in an in-VM configuration">
+   <target name="invm-stress-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
+           description="Runs all stress tests in an in-VM configuration">
 
-      <antcall target="print-stresstest-classpath"/>
+      <display-path path="test.execution.classpath"/>
 
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="${junit.includeantruntime}"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${stress.timeout}">
+             fork="${junit.fork}"
+             includeantruntime="${junit.includeantruntime}"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${stress.timeout}">
 
          <sysproperty key="remote" value="false"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${stress.tests.database}"/>
          <sysproperty key="test.serialization" value="${stress.tests.serialization}"/>
@@ -491,17 +522,14 @@
          <!--
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
          -->
-         <classpath>
-            <path refid="stress.test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="stress.test.execution.classpath"/>
          <sysproperty key="messaging-test-configuration" value="StressInVM"/>
          <formatter classname="org.jboss.test.messaging.tools.ant.XMLJUnitMultipleResultFormatter"
-            usefile="${junit.formatter.usefile}" extension="-StressInVM.xml"/>
+                    usefile="${junit.formatter.usefile}" extension="-StressInVM.xml"/>
          <batchtest fork="${junit.batchtest.fork}"
-            todir="${junit.batchtest.todir}"
-            haltonfailure="${junit.batchtest.haltonfailure}"
-            haltonerror="${junit.batchtest.haltonerror}">
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
             <formatter type="plain" usefile="${junit.formatter.usefile}"/>
             <fileset dir="${build.tests.classes}">
                <include name="**/jms/stress/**/*Test.class"/>
@@ -511,23 +539,23 @@
    </target>
 
    <target name="remote-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
-      description="Runs remotely all tests for which it makes sense to run remotely">
+           description="Runs remotely all tests for which it makes sense to run remotely">
 
       <antcall target="stop-rmi-server"/>
       <antcall target="start-rmi-server"/>
       <mkdir dir="${build.tests.reports}"/>
-      <antcall target="print-testclasspath"/>
+      <display-path path="test.execution.classpath"/>
 
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="yes"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${junit.timeout2}">
+             fork="${junit.fork}"
+             includeantruntime="yes"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${junit.timeout2}">
 
          <sysproperty key="remote" value="true"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
@@ -536,9 +564,8 @@
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
          -->
          <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-            <pathelement location="${module.root}/output/classes"/>
+            <path refid="test.execution.classpath"/>
+            <pathelement location="${tests.root}/output/classes"/>
 
             <!-- Add this when http://jira.jboss.org/jira/browse/JBAS-2554 is done -->
             <!--
@@ -555,12 +582,12 @@
 
          <sysproperty key="messaging-test-configuration" value="Remote"/>
          <formatter classname="org.jboss.test.messaging.tools.ant.XMLJUnitMultipleResultFormatter"
-            usefile="${junit.formatter.usefile}" extension="-Remote.xml"/>
+                    usefile="${junit.formatter.usefile}" extension="-Remote.xml"/>
 
          <batchtest fork="${junit.batchtest.fork}"
-            todir="${junit.batchtest.todir}"
-            haltonfailure="${junit.batchtest.haltonfailure}"
-            haltonerror="${junit.batchtest.haltonerror}">
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
             <formatter type="plain" usefile="${junit.formatter.usefile}"/>
             <fileset dir="${build.tests.classes}">
                <!-- <include name="org/jboss/test/messaging/jms/JMSTest.class"/> -->
@@ -584,32 +611,31 @@
    </target>
 
    <target name="remote-stress-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
-      description="Runs remotely all stress tests for which it makes sense to run remotely">
+           description="Runs remotely all stress tests for which it makes sense to run remotely">
 
       <antcall target="stop-rmi-server"/>
       <antcall target="start-rmi-server-stress"/>
       <mkdir dir="${build.tests.reports}"/>
-      <antcall target="print-stresstest-classpath"/>
+      <display-path path="test.execution.classpath"/>
 
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="yes"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${stress.timeout}">
+             fork="${junit.fork}"
+             includeantruntime="yes"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${stress.timeout}">
 
          <sysproperty key="remote" value="true"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${stress.tests.database}"/>
          <sysproperty key="test.serialization" value="${stress.tests.serialization}"/>
          <jvmarg value="-Xmx512M"/>
          <!-- <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=unittest"/> -->
          <classpath>
-            <path refid="stress.test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-            <pathelement location="${module.root}/output/classes"/>
+            <path refid="stress.test.execution.classpath"/>
+            <pathelement location="${tests.root}/output/classes"/>
 
             <!-- Add this when http://jira.jboss.org/jira/browse/JBAS-2554 is done -->
             <!--
@@ -626,12 +652,12 @@
 
          <sysproperty key="messaging-test-configuration" value="StressRemote"/>
          <formatter classname="org.jboss.test.messaging.tools.ant.XMLJUnitMultipleResultFormatter"
-            usefile="${junit.formatter.usefile}" extension="-StressRemote.xml"/>
+                    usefile="${junit.formatter.usefile}" extension="-StressRemote.xml"/>
 
          <batchtest fork="${junit.batchtest.fork}"
-            todir="${junit.batchtest.todir}"
-            haltonfailure="${junit.batchtest.haltonfailure}"
-            haltonerror="${junit.batchtest.haltonerror}">
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
             <formatter type="plain" usefile="${junit.formatter.usefile}"/>
             <fileset dir="${build.tests.classes}">
                <include name="org/jboss/test/messaging/jms/stress/**/*Test.class"/>
@@ -683,15 +709,15 @@
    <target name="crash-test" description="Runs crash test">
 
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="yes"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${junit.timeout2}">
+             fork="${junit.fork}"
+             includeantruntime="yes"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${junit.timeout2}">
 
          <sysproperty key="remote" value="true"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
@@ -700,9 +726,8 @@
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=antjunit"/>
          -->
          <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-            <pathelement location="${module.root}/output/classes"/>
+            <path refid="test.execution.classpath"/>
+            <pathelement location="${tests.root}/output/classes"/>
 
             <!-- Add this when http://jira.jboss.org/jira/browse/JBAS-2554 is done -->
             <!--
@@ -719,13 +744,13 @@
 
          <sysproperty key="messaging-test-configuration" value="Crash"/>
          <formatter classname="org.jboss.test.messaging.tools.ant.XMLJUnitMultipleResultFormatter"
-            usefile="${junit.formatter.usefile}" extension="-Crash.xml"/>
+                    usefile="${junit.formatter.usefile}" extension="-Crash.xml"/>
 
          <test name="${crash.test.name}"
-             fork="true"
-             todir="${junit.batchtest.todir}"
-             haltonfailure="${junit.test.haltonfailure}"
-             haltonerror="${junit.test.haltonerror}">
+               fork="true"
+               todir="${junit.batchtest.todir}"
+               haltonfailure="${junit.test.haltonfailure}"
+               haltonerror="${junit.test.haltonerror}">
          </test>
 
       </junit>
@@ -733,16 +758,12 @@
    </target>
 
 
-   <target name="jmstests"
-           depends="tests-jar, prepare-testdirs, clear-test-logs"
+   <target name="jmstests" depends="tests-jar, prepare-testdirs, clear-test-logs"
            description="Runs the jms tests only">
 
-      <antcall target="print-testclasspath"/>
-
+      <display-path path="test.execution.classpath"/>
       <antcall target="start-rmi-server"/>
 
-      <echo message="${junit.timeout2}"/>
-
       <junit printsummary="${junit.printsummary}"
              fork="${junit.fork}"
              includeantruntime="${junit.includeantruntime}"
@@ -751,15 +772,12 @@
              showoutput="${junit.showoutput}"
              timeout="${junit.timeout2}">
          <sysproperty key="remote" value="${build.tests.remote}"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
          <jvmarg value="-Xmx512M"/>
-         <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
          <formatter type="xml" usefile="${junit.formatter.usefile}"/>
          <batchtest fork="${junit.batchtest.fork}"
                     todir="${junit.batchtest.todir}"
@@ -778,36 +796,30 @@
 
    </target>
 
-   <target name="messagetests"
-              depends="tests-jar, prepare-testdirs, clear-test-logs"
-              description="Runs the jms tests only">
+   <target name="messagetests" depends="tests-jar, prepare-testdirs, clear-test-logs"
+           description="Runs the jms tests only">
 
-      <antcall target="print-testclasspath"/>
+      <display-path path="test.execution.classpath"/>
 
-      <echo message="${junit.timeout2}"/>
-
       <junit printsummary="${junit.printsummary}"
-         fork="${junit.fork}"
-         includeantruntime="${junit.includeantruntime}"
-         haltonerror="${junit.haltonerror}"
-         haltonfailure="${junit.haltonfailure}"
-         showoutput="${junit.showoutput}"
-         timeout="${junit.timeout2}">
+             fork="${junit.fork}"
+             includeantruntime="${junit.includeantruntime}"
+             haltonerror="${junit.haltonerror}"
+             haltonfailure="${junit.haltonfailure}"
+             showoutput="${junit.showoutput}"
+             timeout="${junit.timeout2}">
          <sysproperty key="remote" value="${build.tests.remote}"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
          <jvmarg value="-Xmx512M"/>
-         <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
          <formatter type="xml" usefile="${junit.formatter.usefile}"/>
          <batchtest fork="${junit.batchtest.fork}"
-            todir="${junit.batchtest.todir}"
-            haltonfailure="${junit.batchtest.haltonfailure}"
-            haltonerror="${junit.batchtest.haltonerror}">
+                    todir="${junit.batchtest.todir}"
+                    haltonfailure="${junit.batchtest.haltonfailure}"
+                    haltonerror="${junit.batchtest.haltonerror}">
             <formatter type="plain" usefile="${junit.formatter.usefile}"/>
             <fileset dir="${build.tests.classes}">
                <include name="**/messaging/jms/message/**/*Test.class"/>
@@ -819,11 +831,10 @@
 
    </target>
 
-   <target name="coretests"
-           depends="tests-jar, prepare-testdirs, clear-test-logs"
+   <target name="coretests" depends="tests-jar, prepare-testdirs, clear-test-logs"
            description="Runs the jms tests only">
 
-      <antcall target="print-testclasspath"/>
+      <display-path path="test.execution.classpath"/>
 
       <junit printsummary="${junit.printsummary}"
              fork="${junit.fork}"
@@ -833,15 +844,12 @@
              showoutput="${junit.showoutput}"
              timeout="${junit.timeout2}">
          <sysproperty key="remote" value="${build.tests.remote}"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
          <jvmarg value="-Xmx512M"/>
-         <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
          <formatter type="xml" usefile="${junit.formatter.usefile}"/>
          <batchtest fork="${junit.batchtest.fork}"
                     todir="${junit.batchtest.todir}"
@@ -854,21 +862,17 @@
             </fileset>
          </batchtest>
       </junit>
-
       <antcall target="stop-rmi-server"/>
-
    </target>
 
-   <target name="test"
-           depends="tests-jar, prepare-testdirs, clear-test-logs"
+   <target name="test" depends="tests-jar, prepare-testdirs, clear-test-logs"
            description="Runs a single test, specified by its FQ class name via 'test.classname'">
 
       <fail unless="test.classname"
             message="To run a single test, use: ./build.sh test -Dtest.classname=org.package.MyTest"/>
-
-            <echo>Module root is:${module.root}</echo>
-
+      <echo>Module root is:${module.root}</echo>
       <antcall target="start-rmi-server"/>
+      <property name="test.classname" value="dummy"/>
 
       <junit printsummary="${junit.printsummary}"
              fork="${junit.fork}"
@@ -878,7 +882,7 @@
              showoutput="${junit.showoutput}"
              timeout="${junit.timeout2}">
          <sysproperty key="remote" value="${build.tests.remote}"/>
-         <sysproperty key="module.output" value="${module.output}"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>
          <sysproperty key="test.database" value="${functional.tests.database}"/>
          <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
@@ -886,22 +890,22 @@
             <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y"/>
          -->
          <jvmarg value="-Xmx1024M"/>
-         <classpath>
-            <path refid="test.classpath"/>
-            <pathelement location="${build.tests.lib}/${build.tests.archive}"/>
-         </classpath>
+         <classpath refid="test.execution.classpath"/>
          <formatter type="xml" usefile="${junit.formatter.usefile}"/>
          <test name="${test.classname}"
-                    fork="false"
-                    todir="${junit.batchtest.todir}"
-                    haltonfailure="${junit.test.haltonfailure}"
-                    haltonerror="${junit.test.haltonerror}">
+               fork="false"
+               todir="${junit.batchtest.todir}"
+               haltonfailure="${junit.test.haltonfailure}"
+               haltonerror="${junit.test.haltonerror}">
          </test>
       </junit>
-
       <antcall target="stop-rmi-server"/>
    </target>
 
+   <!-- ======================================================================================== -->
+   <!-- Report Tasks                                                                             -->
+   <!-- ======================================================================================== -->
+
    <target name="copy-stylesheets">
       <mkdir dir="${build.tests.stylesheets}"/>
       <copy todir="${build.tests.stylesheets}" filtering="yes">
@@ -918,8 +922,8 @@
             <include name="TEST-*.xml"/>
          </fileset>
          <report format="frames"
-            todir="${build.tests.reports}/html"
-            styledir="${build.tests.stylesheets}"/>
+                 todir="${build.tests.reports}/html"
+                 styledir="${build.tests.stylesheets}"/>
       </junitreport>
    </target>
 
@@ -937,32 +941,46 @@
 
    <target name="functional-tests" depends="tests"/>
 
-   <!-- Clean up all build output -->
-   <target name="clean"
-      description="Cleans up most generated files.">
-      <delete dir="${module.output}"/>
+   <!-- ======================================================================================== -->
+   <!-- Cleaning Tasks                                                                           -->
+   <!-- ======================================================================================== -->
+
+   <target name="clean">
+      <delete dir="${tests.output}"/>
+      <delete file="./bin/.test.execution.classpath"/>
    </target>
 
-   <target name="clobber" depends="clean"/>
+   <!-- ======================================================================================== -->
+   <!-- Tasks required by bin/runtest                                                            -->
+   <!-- ======================================================================================== -->
 
-   <target name="display-path">
-      <pathconvert refid="dependentmodule.classpath" targetos="unix" property="path.representation"/>
-      <echo message="${path.representation}"/>
+   <property name="test.execution.classpath.file" value=".test.execution.classpath"/>
+
+   <target name="get-test-execution-classpath">
+      <echo message="${test.execution.classpath.file}"/>
+      <!--
+      <pathconvert refid="test.execution.classpath" targetos="unix" pathsep=";"
+                   property="test.execution.classpath.unix"/>
+                   -->
+      <pathconvert refid="test.execution.classpath" targetos="windows"
+                   property="test.execution.classpath.unix"/>
+      <echo message="${test.execution.classpath.unix}" file="${test.execution.classpath.file}"/>
    </target>
 
+   <!-- ======================================================================================== -->
+   <!-- Miscellaneous                                                                            -->
+   <!-- ======================================================================================== -->
 
-  <target name="tests-ejb-jar"
+   <target name="tests-ejb-jar"
            depends="compile"
            description="Creates the ejb jar file containing the test ejb and mdb for testing jms from within a managed environment">
 
       <mkdir dir="${build.tests.lib}"/>
       <mkdir dir="${build.tests.classes}/META-INF"/>
-
       <copy file="${source.tests.java}/org/jboss/test/messaging/jms/managed/META-INF/jboss.xml"
-         tofile="${build.tests.classes}/META-INF/jboss.xml"/>
+            tofile="${build.tests.classes}/META-INF/jboss.xml"/>
       <copy file="${source.tests.java}/org/jboss/test/messaging/jms/managed/META-INF/ejb-jar.xml"
-         tofile="${build.tests.classes}/META-INF/ejb-jar.xml"/>
-
+            tofile="${build.tests.classes}/META-INF/ejb-jar.xml"/>
       <!-- Build the tests ejb jar -->
       <jar jarfile="${build.tests.lib}/${build.tests.ejbarchive}">
          <fileset dir="${build.tests.classes}">
@@ -974,26 +992,20 @@
       </jar>
    </target>
 
-
-  <target name="deployejb" depends="tests-ejb-jar">
-         <copy file="${build.tests.lib}/${build.tests.ejbarchive}"
+   <target name="deployejb" depends="tests-ejb-jar">
+      <copy file="${build.tests.lib}/${build.tests.ejbarchive}"
             todir="${ENV.JBOSS_HOME}/server/default/deploy"/>
-      </target>
-
-      <target name="undeployejb">
-         <delete file="${ENV.JBOSS_HOME}/server/default/deploy/${build.tests.ejbarchive}"/>
    </target>
 
-   <target name="print-testclasspath">
-      <pathconvert targetos="unix" property="test.classpath.property" refid="test.classpath"/>
-      <echo message="${test.classpath.property}"/>
+   <target name="undeployejb">
+      <delete file="${ENV.JBOSS_HOME}/server/default/deploy/${build.tests.ejbarchive}"/>
    </target>
 
-   <target name="print-stresstest-classpath">
-      <pathconvert targetos="unix" property="stresstest.classpath.property" refid="stress.test.classpath"/>
-      <echo message="${stresstest.classpath.property}"/>
+   <target name="x">
+       <display-path path="test.execution.classpath"/>
    </target>
 
 
+
 </project>
 

Added: trunk/tests/lib/jboss-common-jdbc-wrapper.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tests/lib/jboss-common-jdbc-wrapper.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/tests/lib/jboss-jca.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tests/lib/jboss-jca.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/tests/lib/jboss-local-jdbc.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tests/lib/jboss-local-jdbc.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/tests/lib/jboss-mbeans.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tests/lib/jboss-mbeans.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/tests/lib/jms-ra.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tests/lib/jms-ra.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/tests/lib/mysql-connector-java-3.1.13-bin.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tests/lib/mysql-connector-java-3.1.13-bin.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/tools/etc/buildmagic/aliases.ent
===================================================================
--- trunk/tools/etc/buildmagic/aliases.ent	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tools/etc/buildmagic/aliases.ent	2006-08-01 18:12:23 UTC (rev 1028)
@@ -0,0 +1,97 @@
+<!-- list of aliases used to bridge gap between buildmagic defs and jbossbuild -->
+
+
+<path id="apache.commons.classpath">
+  <pathelement path="${apache.collections.lib}/commons-collections.jar"/>
+  <pathelement path="${apache.logging.lib}/commons-logging.jar"/>
+  <pathelement path="${apache.httpclient.lib}/commons-httpclient.jar"/>
+  <pathelement path="${apache.pool.lib}/commons-pool.jar"/>
+  <pathelement path="${apache.discovery.lib}/commons-discovery.jar"/>
+  <pathelement path="${apache.fileupload.lib}/commons-fileupload.jar"/>
+  <pathelement path="${apache.lang.lib}/commons-lang-2.0.jar"/>  
+</path>
+
+<path id="sax.classpath">
+  <pathelement path="${xml-sax.classpath}"/>
+</path>
+ 
+<property name="xdoclet-xdoclet.lib" value="${xdoclet.xdoclet.lib}"/>
+<path id="xdoclet.task.classpath">
+  <path refid="xdoclet.xdoclet.classpath"/>
+</path>
+   
+<property name="gjt.jpl-util.lib" value="${gjt.jpl.util.lib}"/>   
+<path id="gjt.jpl-util.classpath">
+   <path refid="gjt.jpl.util.classpath"/>
+</path>   
+
+<property name="opennms.joesnmp.lib" value="${joesnmp.joesnmp.lib}"/>   
+<path id="opennms.joesnmp.classpath">
+   <path refid="joesnmp.joesnmp.classpath"/>
+</path>   
+
+<path id="jacorb.idl.classpath">
+   <path refid="apache.avalon.logkit.classpath"/>
+   <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
+</path>
+
+<property name="jacorb.idl.include" value="${jacorb.jacorb.resources}"/>
+<property name="jacorb.jacorb.properties" value="${jacorb.jacorb.resources}"/>
+  
+<property name="sleepycat.lib" value="${sleepycat.sleepycat.lib}"/>
+<path id="sleepycat.classpath">
+   <path refid="sleepycat.sleepycat.classpath"/>
+</path>
+  
+<property name="apache.tomcat55.root" value="${apache.tomcat.root}"/>
+<property name="apache.tomcat55.lib" value="${apache.tomcat.lib}"/>
+<path id="apache.tomcat55.classpath">
+   <path refid="apache.tomcat.classpath"/>
+</path>
+  
+<property name="trove.lib" value="${trove.trove.lib}"/>  
+<path id="trove.classpath">
+   <path refid="trove.trove.classpath"/>
+</path>
+  
+<path id="qdox.classpath">
+   <path refid="qdox.qdox.classpath"/>
+</path>
+  
+<property name="javassist.lib" value="${javassist.javassist.lib}"/>
+<path id="javassist.classpath">
+  <path refid="javassist.javassist.classpath"/>
+</path>
+  
+<property name="hibernate.lib" value="${hibernate.hibernate.lib}"/>  
+<path id="hibernate3.classpath">
+  <path refid="hibernate.hibernate.classpath"/>
+</path>
+
+<property name="odmg.lib" value="${odmg.odmg.lib}"/>
+<path id="odmg.classpath">
+  <path refid="odmg.odmg.classpath"/>
+</path>
+
+<property name="cglib.lib" value="${cglib.cglib.lib}"/>
+<path id="cglib.classpath">
+  <path refid="cglib.cglib.classpath"/>  
+</path>
+
+<path id="ejb3-persistence.classpath">
+   <path refid="hibernate.annotations.classpath"/>
+   <path refid="hibernate.entitymanager.classpath"/>
+</path>
+
+<property name="spring.lib" value="${spring.spring.lib}"/>
+<path id="spring.classpath">
+  <path refid="spring.spring.classpath"/>  
+</path>
+
+<!-- Ant -->
+<property name="apache.ant.root" value="${project.tools}"/>
+<property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
+<path id="apache.ant.classpath">
+  <pathelement path="${apache.ant.lib}/ant.jar"/>
+</path>
+  
\ No newline at end of file

Added: trunk/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-01 18:12:23 UTC (rev 1028)
@@ -0,0 +1,9 @@
+
+# The location of the thirdparty (prebuilt artifacts) directory relative to the project root
+jbossbuild.thirdparty.dir=thirdparty
+
+# The name of the component info file
+jbossbuild.component.info=component-info.xml
+
+# The targetdefs to use
+jbossbuild.targetdefs.refid=targets
\ No newline at end of file

Added: trunk/tools/etc/jbossbuild/tasks.xml
===================================================================
--- trunk/tools/etc/jbossbuild/tasks.xml	2006-08-01 15:22:26 UTC (rev 1027)
+++ trunk/tools/etc/jbossbuild/tasks.xml	2006-08-01 18:12:23 UTC (rev 1028)
@@ -0,0 +1,1023 @@
+<?xml version="1.0"?>
+
+<!--
+ JBoss, the OpenSource J2EE webOS
+ 
+ Distributable under LGPL license.
+ See terms of license at gnu.org.
+-->
+<project name="jboss.ant.tasks"
+         default="help-fragment"
+>
+<!-- ================================================================== -->
+<!-- Properties                                                         -->
+<!-- ================================================================== -->
+
+   <!-- because this file may be imported from various locations
+     locations must be referenced in an absolute fashion   -->
+   <dirname property="imported.basedir" file="${ant.file.jboss.ant.tasks}"/>
+
+
+   <property file="${imported.basedir}/jbossbuild.properties"/>
+
+   <property name="jboss.tasks.path" 
+      value="${imported.basedir}/../../../tools/lib/jbossbuild.jar"   />
+
+   <!-- items required for javcc task --> 
+   <property name="sun.javacc.lib"
+      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/sun-javacc/lib/"/>
+             
+   <property name="jacorb.root"
+      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/jacorb"/> 
+
+   <property name="apache.logkit.lib"
+      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/apache-avalon-logkit/lib"/>              
+
+      
+    <path id="jacorb.idl.classpath">
+       <pathelement path="${jacorb.root}/lib/idl.jar"/>
+       <pathelement path="${apache.logkit.lib}/logkit.jar"/>
+    </path>
+
+
+<!-- ================================================================== -->
+<!-- Type Definitions                                                   -->
+<!-- ================================================================== -->
+
+   <!-- The generate type -->
+   <typedef name="generate"
+            classname="org.jboss.ant.types.Generate" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- The build type -->
+   <typedef name="build"
+            classname="org.jboss.ant.types.build.Build" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- The artifact type definition type -->
+   <typedef name="artifacttype"
+            classname="org.jboss.ant.types.build.ArtifactType" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- The component definition type -->
+   <typedef name="componentdef"
+            classname="org.jboss.ant.types.component.ComponentDefinition" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- The component type -->
+   <typedef name="component"
+            classname="org.jboss.ant.types.build.Component" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- The includes type -->
+   <typedef name="includes"
+            classname="org.jboss.ant.types.Includes" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- The build targets type -->
+   <typedef name="targets"
+            classname="org.jboss.ant.types.target.TargetDefinitions" 
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+<!-- ================================================================== -->
+<!-- Task Definitions                                                   -->
+<!-- ================================================================== -->
+
+   <!-- Update ide info for the main build -->
+   <taskdef name="idemain"
+            classname="org.jboss.ant.tasks.build.IDETask"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+
+   <!-- Update ide info for the component -->
+   <taskdef name="idecomponent"
+            classname="org.jboss.ant.tasks.component.IDETask"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+   
+   <!-- Generate a componentref graph and resolve the dependencies -->
+   <taskdef name="synchronizeinfo"
+            classname="org.jboss.ant.tasks.build.SynchronizeComponentsTask"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />
+   
+   <!-- A task which allows a visitor to visit the graph -->
+   <taskdef name="visit-componentref-graph"
+            classname="org.jboss.ant.tasks.build.VisitComponentRefGraphTask"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />   
+   
+   <!-- Generate libraries.ent with version number in paths -->
+   <taskdef name="gen-lib-file"
+            classname="org.jboss.ant.tasks.build.GenerateLibrariesFile"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />  
+     
+   <!-- RMIC compilation logic -->
+   <taskdef name="rmic-helper"
+            classname="org.jboss.ant.tasks.build.RMICHelper"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />     
+
+   <!-- Executes a given target without reparsing the project file -->
+   <taskdef name="execute-target"
+            classname="org.jboss.ant.tasks.build.TargetExecutor"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   /> 
+  
+   <!-- Copy with support for zipfile sets -->
+   <taskdef name="copy-zfs"
+            classname="org.jboss.ant.tasks.build.CopyWithZipFileSetSupport"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   /> 
+   
+   <!-- File release task -->
+   <taskdef name="copy-release"
+            classname="org.jboss.ant.tasks.build.CopyRelease"
+            loaderRef="jboss.tasks.path"
+            classpath="${jboss.tasks.path}"
+   />  
+   
+  
+   
+
+   
+
+<!-- ================================================================== -->
+<!-- Artifact Definitions                                               -->
+<!-- ================================================================== -->
+
+   <artifacttype type="jar" outputtype="lib"/>
+   <artifacttype type="zip" outputtype="lib"/>
+   <artifacttype type="sar" outputtype="lib"/>
+   <artifacttype type="rar" outputtype="lib"/>
+   <artifacttype type="war" outputtype="lib"/>
+   <artifacttype type="deployer" outputtype="lib"/>   
+   <artifacttype type="api" outputtype="api"/>
+   <artifacttype type="xml" outputtype="resource"/>
+   <artifacttype type="policy" outputtype="resource"/>
+   <artifacttype type="properties" outputtype="resource"/>
+   <artifacttype type="sh" outputtype="bin"/>
+   <artifacttype type="bat" outputtype="bin"/>
+   <artifacttype type="conf" outputtype="bin"/>
+   <artifacttype type="dtd" outputtype="dtd"/>
+   <artifacttype type="xsd" outputtype="schema"/>
+   <artifacttype type="aop" outputtype="resource"/>
+   <artifacttype type="idl" outputtype="resource"/>   
+   <artifacttype type="md5" outputtype="bin"/>      
+   <artifacttype type="dir" outputtype="lib"/>
+   <artifacttype type="ddl" outputtype="resource"/>
+   
+<!-- ================================================================== -->
+<!-- Target Definitions                                                 -->
+<!-- ================================================================== -->
+
+   <targets id="targets">
+
+      <!-- ============================================================ -->
+      <!-- Build All                                                    -->
+      <!-- Builds everything (build, docs, tests and release archives)  -->
+      <!-- ============================================================ -->
+
+      <targetdef target="all" description="Build All">
+         <main depends="build, doc, test, archives" components="none"/>
+         <component depends="build, doc, test"/>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!--  Init                                                        -->
+      <!--  Basic initilization tasks and property setup                -->
+      <!-- ============================================================ -->      
+      <targetdef target="build.init" description="initilization tasks and property setup">
+
+         <!-- for each componentdef in jbossbuild file, setup properties 
+              in case a use wishes to access them    
+         -->
+         <component>
+            <property name="build.module" value="@{parentDir}"/>
+            <property name="build.module.src" value="${build.module}/src"/>
+            <property name="build.module.resources" value="${build.module}/src/resources"/>
+            <property name="build.module.etc" value="${build.module}/src/etc"/>
+            <property name="build.module.output" value="@{output}"/>
+            <property name="build.module.output.gen-src" value="${build.module.output}/gen-src"/>            
+            <property name="build.module.dir" value="@{output}"/>
+            <property name="build.module.output.resources" value="${build.module.output}/resources"/>                        
+            <property name="build.module.output.lib" value="${build.module.output}/lib"/>                                    
+            <property name="build.module.output.classes" value="${build.module.output}/classes"/> 
+         </component>
+      </targetdef>      
+
+      <!-- ============================================================ -->
+      <!-- Build                                                        -->
+      <!-- Builds the artifacts and compiles all source                 -->
+      <!-- ============================================================ -->
+
+      <targetdef target="build" description="Build" >
+
+         <!-- Build the main release
+              Creates the main release directory and copies artifacts
+              to the specified location
+         -->
+         <main>
+            <mkdir dir="@{releaseDir}"/>
+            <antCall target="release"/>
+         </main>
+
+
+         <!-- 
+         Build the component
+              Just makes the output folder
+         -->         
+         <component depends="build.init, build.etc">
+            <mkdir dir="@{output}/etc"/>
+            <copy todir="@{output}/etc" filtering="yes">
+               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
+            </copy>
+         </component>
+
+         <!-- Build resources if the component has a 
+              resource node -->
+         <resource depends="build.resources"/>
+         
+         <!-- JTREE-JAVACC source generation  -->
+         <generatedsource when="@{jtree-javacc}">
+
+            <dirname file="/@{jtree-javacc}" property="@{id}.path"/>
+            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
+
+            <mkdir dir="${@{id}.output.path}"/>
+            <jjtree
+               target="src/@{srcdir}/@{jtree-javacc}"
+               outputdirectory="${@{id}.output.path}"
+               javacchome="${sun.javacc.lib}"/>
+
+            <basename file="@{jtree-javacc}" 
+               property="@{id}.basename"
+               suffix="jjt"/>
+
+            <javacc
+               target="${@{id}.output.path}/${@{id}.basename}.jj"
+               javacchome="${sun.javacc.lib}"/>
+
+         </generatedsource>
+
+         <!-- JAVACC source generation -->
+         <generatedsource when="@{javacc}">
+
+            <dirname file="/@{javacc}" property="@{id}.path"/>
+            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
+
+            <mkdir dir="${@{id}.output.path}"/>
+
+            <javacc
+               target="src/@{srcdir}/@{javacc}"
+               javacchome="${sun.javacc.lib}"
+               static="@{static}"
+               outputdirectory="${@{id}.output.path}"/>
+
+         </generatedsource>
+
+         <!-- IDL compilation -->         
+         <generatedsource when="@{idl}">
+
+            <!-- Task to compile idl files required by jacorb -->
+            <taskdef name="jacidl"
+               classname="org.jacorb.idl.JacIDL"
+               classpathref="jacorb.idl.classpath"
+            />             
+            
+            <property name="@{id}.output.path" value="@{output}/@{id}"/>
+
+            <mkdir dir="${@{id}.output.path}"/>
+
+            <jacidl
+               srcdir ="src/@{idl}"
+               destdir="${@{id}.output.path}"
+               includes="*.idl"
+               includepath="${jacorb.root}/resources/"
+             />
+         
+         </generatedsource> 
+         
+ 
+         <!-- Compile the source
+              Runs depend on the source output then compiles the source
+         -->
+         <source if="@{compileable}">
+             
+            <mkdir dir="@{output}"/>
+            <depend srcdir="@{sourcePath}"
+                    destdir="@{output}"
+            >
+               <classpath>
+                  <buildpathelements/>
+               </classpath>
+            </depend>
+            <javac srcdir="@{sourcePath}" 
+                   destdir="@{output}"
+                   debug="true"
+                   deprecation="true"
+                   excludes="@{excludes}"
+                   target="@{jvmTarget}"
+                   source="@{jvmSource}"
+                   fork="true"
+                   memoryMaximumSize="512M"
+            >
+               <classpath>
+                  <buildpathelements/>
+               </classpath>
+               <src path="@{sourcePath}"/>
+               <!-- allow multiple sources to be compiled at once to handle circular references -->
+               <srcelements/>
+            </javac>
+
+           <copy toDir="@{output}">
+               <fileset dir="@{sourcePath}">
+                <include name="**/*.properties"/>
+              </fileset>
+           </copy>
+         </source>
+         
+        <source when="@{stubversion}">
+	    <property name="jb.stubversion" value="@{stubversion}"/>
+        </source>         
+         
+
+         <!-- Remote method call compilation.   -->
+         <source when="@{rmic}">
+            <rmic-helper
+                  base="@{output}"
+                  includes="@{rmic}"
+                  verify="true"
+                  debug="false"
+                  iiop="@{iiop}"
+                  idl="false"
+                  external="@{external}"
+                  stubversion="${jb.stubversion}"
+                  
+            >
+               <classpath>
+                  <buildpathelements/>
+               </classpath>
+               </rmic-helper>
+         </source>
+
+         <!-- Create a jar archive
+              Jars the inputs of the jar artifact
+         -->
+         <jar null="@{manifest}" if="@{buildable}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}">
+               <manifest>
+                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
+                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
+                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
+                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
+                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
+                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
+                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
+                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
+                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
+                  <attribute name="Class-Path"               value="@{classpath}"/>
+               </manifest>
+               <filesets/>
+            </jar>
+         </jar>
+
+         <!-- Create an aop archive
+              Jars the inputs of the aop artifact
+         -->
+         <aop  if="@{buildable}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}">
+                <filesets/>
+            </jar>
+         </aop>         
+
+         <jar when="@{manifest}" if="@{buildable}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}"
+                 manifest="@{component.output}/etc/manifest/@{manifest}">
+               <filesets/>
+            </jar>
+         </jar>
+         
+         
+
+         <!-- Create a sar archive
+              Jars the inputs of the sar artifact
+         -->
+         <sar null="@{manifest}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}">
+               <manifest>
+                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
+                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
+                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
+                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
+                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
+                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
+                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
+                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
+                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
+                  <attribute name="Class-Path"               value="@{classpath}"/>
+               </manifest>
+               <filesets/>
+            </jar>
+         </sar>
+
+
+         <!-- Create a rar archive
+              Jars the inputs of the rar artifact
+         -->
+         <rar null="@{manifest}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}">
+               <manifest>
+                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
+                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
+                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
+                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
+                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
+                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
+                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
+                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
+                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
+                  <attribute name="Class-Path"               value="@{classpath}"/>
+               </manifest>
+               <filesets/>
+            </jar>
+         </rar>
+
+         <!-- Create a war archive
+              Jars the inputs of the war artifact
+         -->
+         <war null="@{manifest}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}">
+               <manifest>
+                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
+                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
+                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
+                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
+                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
+                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
+                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
+                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
+                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
+                  <attribute name="Class-Path"               value="@{classpath}"/>
+               </manifest>
+               <filesets/>
+            </jar>
+         </war>
+         
+         <!-- Create a deployer archive
+              Jars the inputs of the war artifact
+         -->
+         <deployer null="@{manifest}" if="@{buildable}">
+            <mkdir dir="@{parentDir}"/>
+            <jar destfile="@{output}">
+               <manifest>
+                  <attribute name="Created-by" value="@{component.VMVersion} @{component.VMVendor}"/>
+                  <attribute name="Specification-Title" value="@{component.specTitle}"/>
+                  <attribute name="Specification-Version" value="@{component.specVersion}"/>
+                  <attribute name="Specification-Vendor" value="@{component.specVendor}"/>
+                  <attribute name="Implementation-Title" value="@{component.implTitle}"/>
+                  <attribute name="Implementation-URL" value="@{component.implURL}"/>
+                  <attribute name="Implementation-Version" value="@{component.implVersion}"/>
+                  <attribute name="Implementation-Vendor" value="@{component.implVendor}"/>
+                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
+                  <attribute name="Class-Path" value="@{classpath}"/>
+               </manifest>
+               <filesets/>
+            </jar>
+         </deployer>       
+         
+         <!-- Create a md5 checksumarchive  -->
+         <md5 null="@{manifest}">
+            <mkdir dir="@{parentDir}"/>
+            <checksum>
+              <filesets/>
+            </checksum>
+         </md5>         
+         
+         <!-- create a directory and copy into it all of the filesets or zipfilesets -->
+         <dir if="@{buildable}">
+            <mkdir dir="@{output}"/>
+            <copy-zfs todir="@{output}">
+               <filesets/>
+            </copy-zfs>
+         </dir>
+         
+         
+         <!-- this is a hack.  jbbuild will not allow artifacts with same id
+            varia requires a dir to be created called kernel, but cannot be created
+            because kernel already exists as a component.  Only option is to create the dir
+            and rename it to kernel -->
+         <dir if="@{buildable}" when="@{rename}">
+            <mkdir dir="@{parentDir}/@{rename}"/>
+            <copy-zfs todir="@{parentDir}/@{rename}">
+               <filesets/>
+            </copy-zfs>
+         </dir>     
+      
+         <!-- copying of artifacts to new name -->         
+         <artifactdef when="@{toname}">
+            <mkdir dir="@{parentDir}"/>
+            <copy toFile="@{parentDir}/@{toname}">
+               <filesets/>
+            </copy>
+         </artifactdef>
+         
+         <sh depends="build.bin"/>
+         <bat depends="build.bin"/>
+      </targetdef>
+
+      <!-- Copy the etc -->
+      <targetdef target="build.etc">
+
+         <component>
+              
+            <mkdir dir="@{output}/etc"/>
+            <mkdir dir="@{component.dir}/src/etc/"/>
+            <copy todir="@{output}/etc" filtering="yes">
+               
+               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
+               <filterset>
+                  <filter token="java.vm.version"           value="@{component.VMVersion}"/>
+                  <filter token="java.vm.vendor"            value="@{component.VMVendor}"/>
+                  <filter token="specification.title"       value="@{component.specTitle}"/>
+                  <filter token="specification.version"     value="@{component.specVersion}"/>
+                  <filter token="specification.vendor"      value="@{component.specVendor}"/>
+                  <filter token="implementation.title"      value="@{component.implTitle}"/>
+                  <filter token="implementation.url"        value="@{component.implURL}"/>
+                  <filter token="implementation.version"    value="@{component.implVersion}"/>
+                  <filter token="implementation.vendor"     value="@{component.implVendor}"/>
+                  <filter token="implementation.vendor.id"  value="@{component.implURL}"/>
+               </filterset>
+            </copy>
+         </component>
+
+      </targetdef>
+
+      <targetdef target="build.resources">
+     
+         <component>
+            <mkdir dir="@{output}/resources"/>
+            <copy todir="@{output}" filtering="yes">
+               <fileset dir="@{component.dir}/src" includes="resources/**"/>
+            </copy>
+         </component>
+      </targetdef>
+      
+
+
+      <targetdef target="build.bin">
+         <component>
+            <mkdir dir="@{output}/bin"/>
+            <copy todir="@{output}/bin" filtering="yes">
+              <fileset dir="@{component.dir}/src/bin">
+                <include name="**/*"/>
+              </fileset>
+            </copy>
+
+            <fixcrlf srcdir="@{output}/bin"
+              eol="lf" eof="remove"
+              includes="**/*.sh"/>
+
+            <fixcrlf srcdir="@{output}/bin"
+              eol="crlf" eof="remove"
+              includes="**/*.bat, **/*.cmd"/>
+
+            <chmod perm="+x">
+              <fileset dir="@{output}/bin">
+                <include name="**/*.sh"/>
+              </fileset>
+            </chmod>
+
+         </component>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Release                                                      -->
+      <!-- Create the release by copying all artifacts that have a      -->
+      <!-- release tag to that specified location.                      -->
+      <!-- ============================================================ -->
+
+      <targetdef target="release">
+      
+
+          <!-- Copy the artifact into the release -->
+         <artifact when="@{tofile}">
+             <copy-release release="@{release}" tofile="@{tofile}" requiredJDK="@{requiredJDK}"
+             exploded="@{exploded}" overwrite="@{overwrite}">
+                <output/>
+             </copy-release>
+         </artifact>
+         
+       <artifact null="@{tofile}" when="@{release}" >
+            <copy-release release="@{release}"
+              exploded="@{exploded}"
+              requiredJDK="@{requiredJDK}"
+              overwrite="@{overwrite}"
+              >
+               <output/>
+            </copy-release>
+         </artifact>         
+
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Publish                                                      -->
+      <!-- Copy an artifact to the location specified by                -->
+      <!-- ${jbossbuild.repository.root}                                -->
+      <!-- Used by the continous build to publish to the repository.    -->
+      <!-- ============================================================ -->
+
+      <targetdef target="publish" if="@{local}">
+
+         <!-- copy the component-info.xml into the repository -->
+         <componentmain if="@{local}">
+            <fail unless="repository.root">
+              The publish target requires repository.root to be set.
+            </fail>
+            <mkdir dir="${repository.root}/@{relativePath}"/>
+            <copy failonerror="false" file="@{dir}/${jbossbuild.component.info}"
+                  todir="${repository.root}/@{relativePath}"
+            />
+
+         </componentmain>
+
+         <!-- Copy the artifact into the release -->
+         <artifact if="@{component.local}">
+            <fail unless="repository.root">
+              The publish target requires repository.root to be set.
+            </fail>
+            <mkdir dir="${repository.root}/@{relativePath}"/>
+            <copy todir="${repository.root}/@{relativePath}">
+               <output/>
+            </copy>
+         </artifact>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Archives                                                     -->
+      <!-- Builds the release archive(s)                                -->
+      <!-- ============================================================ -->
+
+      <!-- Build the release archives -->
+      <targetdef target="archives" description="Build the release archives">
+
+         <!-- Make the archives -->
+         <main>
+         
+            <!-- Create the zip file -->
+            <zip destfile="@{output}/@{releaseName}.zip"
+                 basedir="@{releaseDir}"
+            />
+         </main>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Doc                                                          -->
+      <!-- Creates the documentation.                                   -->
+      <!-- ============================================================ -->
+
+      <targetdef target="doc" description="Documentation">
+
+         <!-- Generate the documentation -->
+         <component depends="api"/>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- API                                                          -->
+      <!-- Creates the javadoc                                          -->
+      <!-- ============================================================ -->
+
+      <targetdef target="api" description="Javadoc">
+
+         <!-- Generate the javadoc -->
+         <component/>
+         <api>
+            <mkdir dir="@{output}"/>
+            <javadoc packagenames="*"
+                     destdir="@{output}"
+            >
+               <doctitle>
+                  <![CDATA[<h1>@{description} API Documentation</h1>]]>
+               </doctitle>
+               <bottom>
+                  <![CDATA[
+                     <i>
+                        <div align="center">
+                           <font size="-1">
+                              Copyright &#169; 2005 JBoss Inc. All Rights Reservered.
+                           </font>
+                        </div>
+                     </i>
+                  ]]>
+               </bottom>
+               <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
+               <sourcepath>
+                  <sourcepaths/>
+               </sourcepath>
+               <classpath>
+                  <sourcepathelements/>
+               </classpath>
+            </javadoc>
+         </api>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Clean                                                        -->
+      <!-- Deletes the output folder                                    -->
+      <!-- ============================================================ -->
+
+      <targetdef target="clean" description="Clean">
+         <common>
+            <delete dir="@{output}" failonerror="false"/>
+         </common>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Clobber                                                      -->
+      <!-- Deletes the output folder and removes thirdparty             -->
+      <!-- ============================================================ -->
+
+      <targetdef target="clobber" description="Clobber">
+         <main depends="clean">
+            <delete dir="@{thirdparty}"/>
+         </main>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Synchronize                                                  -->
+      <!-- Resynchronizes the project with cvs                          -->
+      <!-- ============================================================ -->
+
+      <targetdef target="synchronize" description="Synchronize">
+
+         <!-- Update the main build folder and tools from cvs
+              then do the same for the components before running
+              the after synchronization processing
+              NOTE: Does not automatically invoke component builds
+              as the list of components maybe out-of-date at this point
+              and we need to conditionally do cvs co/update
+         -->
+         <main components="none">
+            <!-- cvs command="update -dP" failonerror="true"/-->
+            <!--invoke target="synchronize" dir="../tools"/-->
+            <execute-target target="synchronize.components" />
+            <!-- execant target="synchronize.after.main"/-->
+         </main>
+
+         <componentmain unless="@{local}">
+            <mkdir dir="@{thirdpartyDir}"/>
+            <get src="@{location}/${jbossbuild.component.info}"
+                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
+                 useTimestamp="false"
+                 verbose="true"
+            />
+         </componentmain>
+
+         <!-- If the component exists we just do a cvs update -->
+         <componentmain if="@{exists}">
+           <cvs dest="@{dir}" command="update"/>
+            <!-- NOTE: unable to delegate to component until JBBUILD-62 is resolved -->
+            <!--invoke target="synchronize" dir="@{dir}"/--> 
+            <!--execant target="synchronize.after" dir="@{dir}"/--> 
+         </componentmain>
+
+         <!-- If the component doesn't exist and we want to
+              get the source build check it out from cvs
+         -->
+         <componentmain unless="@{exists}" if="@{local}">
+            <cvs dest="@{dir.parent}">
+               <commandline>
+                  <argument value="-d"/>
+                  <argument value="@{build.cvsroot}"/>
+                  <argument value="co"/>
+                  <argument value="-d"/>
+                  <argument value="@{id}"/>
+                  <argument value="@{module}"/>
+               </commandline>
+            </cvs>
+            <!-- execant target="synchronize.after" dir="@{dir}"/--> 
+         </componentmain>
+
+         <!-- The component already exists do a cvs update
+              and run the after synchronization
+         -->
+         <component nomain="true">
+            <cvs command="update -dP" failonerror="true"/>
+            <!--execant target="synchronize.after"/-->
+         </component>
+
+         <!-- If we are not doing a source checkout of this
+              component, download the artifacts to thirdparty
+         -->
+         <artifact unless="@{component.local}">
+            <mkdir dir="@{parentDir}"/>
+            <get src="@{location}" 
+                 dest="@{output}" 
+                 useTimestamp="false"
+                 verbose="true"
+            />
+         </artifact>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Commit                                                       -->
+      <!-- Commits the changes to cvs                                   -->
+      <!-- ============================================================ -->
+
+      <targetdef target="commit" description="Commit">
+         <!-- Commit the main build and tools -->
+         <main>
+            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
+            <cvs failonerror="true">
+               <commandline>
+                  <argument value="commit"/>
+                  <argument value="-m"/>
+                  <argument value="${m}"/>
+               </commandline>
+            </cvs>
+            <invoke target="commit" dir="../tools"/>
+         </main>
+         <!-- Commit the component -->
+         <component>
+            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
+            <cvs failonerror="true">
+               <commandline>
+                  <argument value="commit"/>
+                  <argument value="-m"/>
+                  <argument value="${m}"/>
+               </commandline>
+            </cvs>
+         </component>
+      </targetdef>
+      
+      <!-- ============================================================ -->
+      <!-- Test                                                         -->
+      <!-- Builds and runs the tests                                    -->
+      <!-- ============================================================ -->
+
+      <targetdef target="test" description="Build and run the tests">
+         <component depends="build, runtest"/>
+      </targetdef>
+      
+      <!-- ============================================================ -->
+      <!-- RunTest                                                      -->
+      <!-- Runs the tests for sources marked with a test attribute      -->
+      <!-- ============================================================ -->
+      
+      <!-- Run the Test -->
+      <targetdef target="runtest" description="Run tests">
+         <component/>
+         <source when="@{test}">
+            <mkdir dir="@{testDir}"/>
+            <delete file="@{testDir}/test.log"/>
+            <junit fork="true"
+                   printSummary="true">
+               <sysproperty key="org.jboss.test.logfile" value="@{testDir}/test.log"/>
+               <formatter type="plain"/>
+               <classpath>
+                  <pathElements/>
+               </classpath>
+               <batchtest todir="@{testDir}">
+                  <fileset dir="@{sourceDir}" includes="@{test}"/>
+               </batchtest>
+            </junit>
+         </source>
+      </targetdef>
+      
+      <!-- ============================================================ -->
+      <!-- Rebuild                                                      -->
+      <!-- Synchronizes then builds                                     -->
+      <!-- ============================================================ -->
+      
+      <!-- Rebuild -->
+      <targetdef target="rebuild" description="Synchronize then build">
+         <common depends="synchronize">
+            <execant target="build"/>
+         </common>
+      </targetdef>
+      
+      <!-- ============================================================ -->
+      <!-- RebuildAll                                                   -->
+      <!-- Synchronizes then builds all                                 -->
+      <!-- ============================================================ -->
+      
+      <!-- Rebuild all -->
+      <targetdef target="rebuildall" description="Synchronize then build all">
+         <common depends="synchronize">
+            <execant target="all"/>
+         </common>
+      </targetdef>
+
+      <!-- ============================================================ -->
+      <!-- Synchronize.After                                            -->
+      <!-- After synchronization processing                             -->
+      <!-- ============================================================ -->
+
+      <!-- After synchronization processing -->
+      <targetdef target="synchronize.after" description="After synchronization processing">
+              <main>
+                 <idemain/>
+              </main>
+              <component>
+                 <idecomponent/>
+              </component>
+      </targetdef>
+      
+
+      
+ </targets>   
+
+<!-- ================================================================== -->
+<!-- Macro Definitions                                                  -->
+<!-- ================================================================== -->
+
+   <condition property="execant-executable" value="cmd.exe">
+     <os family="windows"/>
+   </condition>
+   <property name="execant-executable" value="ant"/>
+   <condition property="execant-prefix" value="/c ant">
+     <os family="windows"/>
+   </condition>
+   <property name="execant-prefix" value=""/>
+   <!-- Set the execant.args to empty unless it already exists -->
+   <condition property="execant.args" value="">
+      <not><isset property="execant.args"/></not>
+   </condition>
+
+   <!-- The execant macro -->
+   <macrodef name="execant">
+      <attribute name="dir"
+                 default="${basedir}"
+                 description="The directory"
+      />
+      <attribute name="target"
+                 description="The target"
+      />
+      <attribute name="filename"
+                 default="jbossbuild.xml"
+                 description="The ant file to execute"
+      />
+      <sequential>
+         <!-- Invoke using a new ant -->
+         <exec dir="@{dir}" 
+               executable="${execant-executable}"
+         >
+            <arg line="${execant-prefix} ${execant.args} -f @{filename} @{target}"/>
+         </exec>
+      </sequential>
+   </macrodef>
+
+   <!-- The invoke macro -->
+   <macrodef name="invoke">
+      <attribute name="dir"
+                 default="${basedir}"
+                 description="The directory"
+      />
+      <attribute name="target"
+                 description="The target"
+      />
+      <sequential>
+         <!-- Invoke using a new ant -->
+         <ant antfile="jbossbuild.xml" dir="@{dir}" target="@{target}"/>
+      </sequential>
+   </macrodef>
+
+<!-- ================================================================== -->
+<!-- Targets                                                            -->
+<!-- ================================================================== -->
+
+   <target name="help-fragment">
+      <fail message="Do not execute this build fragment directly!"/>
+   </target>
+   
+</project>
+

Added: trunk/tools/lib/jbossbuild.jar
===================================================================
(Binary files differ)


Property changes on: trunk/tools/lib/jbossbuild.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream




More information about the jboss-cvs-commits mailing list