[Jboss-cvs] JBossAS SVN: r56669 - in trunk/security: . lib src/main/org/jboss/security src/main/org/jboss/security/plugins src/main/org/jboss/security/propertyeditor tools tools/bin tools/etc tools/etc/buildmagic tools/etc/jbossbuild tools/lib

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 8 15:48:03 EDT 2006


Author: anil.saldhana at jboss.com
Date: 2006-09-08 15:43:32 -0400 (Fri, 08 Sep 2006)
New Revision: 56669

Added:
   trunk/security/build-compile.xml
   trunk/security/build-thirdparty.xml
   trunk/security/lib/
   trunk/security/lib/jboss-auth.jar
   trunk/security/lib/jboss-j2ee.jar
   trunk/security/lib/jboss-j2se.jar
   trunk/security/lib/jboss-jaxrpc.jar
   trunk/security/lib/jboss-jmx-compliance.jar
   trunk/security/lib/jboss-mbeans.jar
   trunk/security/lib/jboss-saaj.jar
   trunk/security/lib/jboss-system.jar
   trunk/security/lib/jboss-transaction.jar
   trunk/security/lib/jnpserver.jar
   trunk/security/tools/
   trunk/security/tools/.project
   trunk/security/tools/bin/
   trunk/security/tools/bin/ant
   trunk/security/tools/bin/ant.bat
   trunk/security/tools/bin/antRun
   trunk/security/tools/bin/antRun.bat
   trunk/security/tools/bin/antx.bat
   trunk/security/tools/bin/lcp.bat
   trunk/security/tools/etc/
   trunk/security/tools/etc/buildfragments/
   trunk/security/tools/etc/buildmagic/
   trunk/security/tools/etc/buildmagic/aliases.ent
   trunk/security/tools/etc/buildmagic/autoload.properties
   trunk/security/tools/etc/buildmagic/build-common.xml
   trunk/security/tools/etc/buildmagic/buildmagic.ent
   trunk/security/tools/etc/buildmagic/common.properties
   trunk/security/tools/etc/buildmagic/common.xml
   trunk/security/tools/etc/buildmagic/libraries.ent
   trunk/security/tools/etc/buildmagic/modules.ent
   trunk/security/tools/etc/buildmagic/targets.ent
   trunk/security/tools/etc/buildmagic/task.properties
   trunk/security/tools/etc/buildmagic/version-info.xml
   trunk/security/tools/etc/jbossbuild/
   trunk/security/tools/etc/jbossbuild/jbossbuild.properties
   trunk/security/tools/etc/jbossbuild/release.xml
   trunk/security/tools/etc/jbossbuild/tasks.xml
   trunk/security/tools/lib/
   trunk/security/tools/lib/README
   trunk/security/tools/lib/ant-javamail.jar
   trunk/security/tools/lib/ant-junit.jar
   trunk/security/tools/lib/ant-launcher.jar
   trunk/security/tools/lib/ant-nodeps.jar
   trunk/security/tools/lib/ant-trax.jar
   trunk/security/tools/lib/ant-xslp.jar
   trunk/security/tools/lib/ant.jar
   trunk/security/tools/lib/bsf.jar
   trunk/security/tools/lib/buildmagic-tasks.jar
   trunk/security/tools/lib/jbossbuild.jar
   trunk/security/tools/lib/jdtCompilerAdapter.jar
   trunk/security/tools/lib/junit.jar
   trunk/security/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   trunk/security/tools/lib/pretty.jar
   trunk/security/tools/lib/resolver.jar
   trunk/security/tools/lib/xalan.jar
   trunk/security/tools/lib/xercesImpl.jar
   trunk/security/tools/lib/xml-apis.jar
Modified:
   trunk/security/build.xml
   trunk/security/src/main/org/jboss/security/AuthenticationManager.java
   trunk/security/src/main/org/jboss/security/AuthorizationManager.java
   trunk/security/src/main/org/jboss/security/SecurityAssociation.java
   trunk/security/src/main/org/jboss/security/SecurityConstants.java
   trunk/security/src/main/org/jboss/security/SecurityContext.java
   trunk/security/src/main/org/jboss/security/Util.java
   trunk/security/src/main/org/jboss/security/plugins/AuthorizationManagerService.java
   trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManager.java
   trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManagerService.java
   trunk/security/src/main/org/jboss/security/plugins/JBossAuthorizationManager.java
   trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManager.java
   trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManagerService.java
   trunk/security/src/main/org/jboss/security/plugins/NoAccessSecurityManager.java
   trunk/security/src/main/org/jboss/security/plugins/NullSecurityManager.java
   trunk/security/src/main/org/jboss/security/plugins/SubjectActions.java
   trunk/security/src/main/org/jboss/security/propertyeditor/SecurityDomainEditor.java
Log:
SECURITY-1:repo move   JBAS-3576: SecurityContext changes  Remove jboss authorization manager cache

Added: trunk/security/build-compile.xml
===================================================================
--- trunk/security/build-compile.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/build-compile.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,414 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
+   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
+   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
+   <!ENTITY modules SYSTEM "tools/etc/buildmagic/modules.ent">
+]>
+
+<project default="main" basedir="." name="JBoss/Build">
+
+  &buildmagic;
+  &libraries;
+  &modules;
+  &targets;
+   <!-- The combined library classpath -->
+      <path id="library.classpath">
+         <path refid="apache.log4j.classpath"/>
+         <path refid="apache.xerces.classpath"/>
+         <path refid="dom4j.dom4j.classpath"/>
+         <path refid="hsqldb.hsqldb.classpath"/>
+         <path refid="javassist.classpath"/>
+         <path refid="jboss.jbossxb.classpath"/>
+         <path refid="junit.junit.classpath"/>
+         <path refid="oswego.concurrent.classpath"/>
+         <path refid="sun.xacml.classpath"/>
+         <path refid="sun.javamail.classpath"/>
+      </path>
+
+    <!-- The combined dependent module classpath -->
+    <path id="dependentmodule.classpath">
+      <path refid="jboss.j2ee.classpath"/>
+      <path refid="jboss.j2ee.ext.classpath"/>
+      <path refid="jboss.common.classpath"/>
+      <path refid="jboss.system.classpath"/>
+      <path refid="jboss.naming.classpath"/>
+      <path refid="jboss.transaction.classpath"/>
+      <path refid="jboss.j2se.classpath"/>
+      <path refid="jboss.mbeans.classpath"/>
+    </path>
+      
+  
+   <!-- ================================================================== -->
+  <!-- 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"
+    depends="compile-parsers, compile-classes, compile-rmi, compile-etc, compile-resources"
+    description="Compile all source files."/>
+
+  <!-- Compile parsers -->
+  <target name="compile-parsers" depends="init">
+    <mkdir dir="${build.parsers}/org/jboss/security/auth/login"/>
+
+     <echo>BASE=${basedir}</echo>
+     <echo>PROJECTROOT=${project.root}</echo>
+
+    <!-- Sun JAAS config file parser -->
+    <javacc target="${source.java}/org/jboss/security/auth/login/SunConfigParser.jj"
+      outputdirectory="${build.parsers}/org/jboss/security/auth/login"
+      javacchome="${sun.javacc.lib}"
+      static="false"/>
+  </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}"
+      includes="${javac.includes}"
+      excludes="${javac.excludes}"
+      failonerror="${javac.fail.onerror}">
+      <src path="${source.java}"/>
+      <src path="${build.parsers}"/>
+      <classpath refid="javac.classpath"/>
+    </javac>
+  </target>
+
+  <!-- Compile RMI stubs -->
+  <target name="compile-rmi" depends="compile-classes">
+    <rmic base="${build.classes}"
+      verify="${rmic.verify}"
+      iiop="${rmic.iiop}"
+      iiopopts="${rmic.iiopops}"
+      idl="${rmic.idl}"
+      idlopts="${rmic.idlops}"
+      debug="${rmic.debug}"
+      stubVersion="${rmic.stubVersion}">
+      <classpath refid="javac.classpath"/>
+      <include name="${rmic.includes}"/>
+      <exclude name="${rmic.excludes}"/>
+
+      <include name="org/jboss/security/srp/SRPRemoteServer.class"/>
+    </rmic>
+  </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>
+    </copy>
+
+    <copy todir="${build.classes}">
+      <fileset dir="${source.java}">
+        <include name="org/jboss/security/jacc/*.xml"/>
+      </fileset>
+    </copy>
+  </target>
+
+  <!-- Compile resource files -->
+  <target name="compile-resources" depends="init">
+    <mkdir dir="${build.resources}"/>
+    <copy todir="${build.resources}" filtering="yes">
+      <fileset dir="${source.resources}">
+        <include name="**/*"/>
+      </fileset>
+    </copy>
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Archives                                                           -->
+  <!-- ================================================================== -->
+
+  <!-- 
+     |  Build all jar files.
+    -->
+  <target name="run-jars" description="Builds all jar files.">
+
+    <call target="compile"/>
+
+    <mkdir dir="${build.lib}"/>
+
+    <!-- Define the pattern sets for the spi and the jbosssx impl -->
+    <patternset id="spi-includes">
+      <include name="org/jboss/security/**"/>
+      <exclude name="org/jboss/crypto/**"/>
+      <exclude name="org/jboss/security/audit/providers/**"/>
+      <exclude name="org/jboss/security/auth/**"/>
+      <exclude name="org/jboss/security/authorization/config/**"/>
+      <exclude name="org/jboss/security/authorization/modules/**"/>
+      <exclude name="org/jboss/security/authorization/sunxacml/**"/>
+      <exclude name="org/jboss/security/config/**"/>
+      <exclude name="org/jboss/security/jce/**"/>
+      <exclude name="org/jboss/security/jndi/**"/>
+      <exclude name="org/jboss/security/mapping/config/**"/>
+      <exclude name="org/jboss/security/mapping/providers/**"/>
+      <exclude name="org/jboss/security/jacc/**"/>
+      <exclude name="org/jboss/security/plugins/**"/>
+      <exclude name="org/jboss/security/propertyeditor/**"/>
+      <exclude name="org/jboss/security/ssl/**"/>
+    </patternset>
+
+    <patternset id="jbosssx-includes">
+      <include name="org/jboss/crypto/**"/>
+      <include name="org/jboss/security/audit/providers/**"/>
+      <include name="org/jboss/security/auth/**"/>
+      <include name="org/jboss/security/authorization/config/**"/>
+      <include name="org/jboss/security/authorization/modules/**"/>
+      <include name="org/jboss/security/authorization/sunxacml/**"/>
+      <include name="org/jboss/security/config/**"/>
+      <include name="org/jboss/security/jce/**"/>
+      <include name="org/jboss/security/jndi/**"/>
+      <include name="org/jboss/security/mapping/config/**"/>
+      <include name="org/jboss/security/mapping/providers/**"/>
+      <include name="org/jboss/security/jacc/**"/>
+      <include name="org/jboss/security/plugins/**"/>
+      <include name="org/jboss/security/propertyeditor/**"/>
+      <include name="org/jboss/security/ssl/**"/>
+    </patternset>
+
+    <!-- Build the Security SPI -->
+    <jar jarfile="${build.lib}/jboss-security-spi.jar"
+      manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}">
+        <patternset refid="spi-includes" />
+      </fileset>
+    </jar>
+
+    <!-- Build jbosssx.jar -->
+    <jar jarfile="${build.lib}/jbosssx.jar"
+      manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}">
+        <patternset refid="jbosssx-includes" />
+      </fileset>
+      <fileset dir="${source.resources}">
+        <include name="dtd/security-policy.dtd"/>
+      </fileset>
+    </jar>
+
+    <!-- Build jbosssx-client.jar -->
+    <jar jarfile="${build.lib}/jbosssx-client.jar"
+      manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}">
+        <exclude name="META-INF/MANIFEST.MF"/> <!-- HACK -->
+        <include name="org/jboss/crypto/JBossSXProvider.class"/>
+        <include name="org/jboss/crypto/digest/*"/>
+        <include name="org/jboss/security/*"/>
+        <include name="org/jboss/security/auth/callback/*"/>
+        <include name="org/jboss/security/auth/login/*"/>
+        <exclude name="org/jboss/security/auth/login/XMLLoginConfig.class"/>
+        <exclude name="org/jboss/security/auth/login/XMLLoginConfigMBean.class"/>
+        <include name="org/jboss/security/jndi/LoginInitialContextFactory.class"/>
+        <include name="org/jboss/security/jndi/JndiLoginInitialContextFactory.class"/>
+        <include name="org/jboss/security/plugins/PBEUtils.class"/>
+        <include name="org/jboss/security/ssl/ClientSocketFactory.class"/>
+        <include name="org/jboss/security/ssl/RMISSLClientSocketFactory.class"/>
+      </fileset>
+    </jar>
+
+    <!-- Build jbosssx-tests.jar -->
+    <mkdir dir="${build.tests}"/>
+    <jar jarfile="${build.tests}/jbosssx-tests.jar"
+      manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}">
+        <include name="org/jboss/test/TestLoginModule.class"/>
+      </fileset>
+    </jar>
+
+    <!-- Update the build marker to allow bypassing -->
+    <touch file="${build-bypass.marker}"/>
+
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Tests                                                              -->
+  <!-- ================================================================== -->
+
+  <!--
+     | Run all tests.
+   -->
+
+  <target name="tests" depends="init, tests-junit, tests-reports"
+    description="Execute all tests.">
+  </target>
+
+  <!--
+     | Run JUnit tests.
+   -->
+
+  <target name="tests-junit" depends="jars">
+    <mkdir dir="${build.reports}"/>
+    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
+    <junit dir="${module.output}"
+      printsummary="${junit.printsummary}"
+      haltonerror="${junit.haltonerror}"
+      haltonfailure="${junit.haltonfailure}"
+      fork="${junit.fork}"
+      timeout="${junit.timeout}"
+      jvm="${junit.jvm}">
+
+      <sysproperty key="output.dir" file="${module.output}"/>
+      <sysproperty key="jboss.home" file="${project.root}"/>
+      <jvmarg value="${junit.jvm.options}"/>
+      <jvmarg value="-Djava.security.debug=access,failure"/>
+      <jvmarg value="-Djava.security.manager"/>
+      <jvmarg value="-Djava.security.policy=${conf.dir}/tst.policy"/>
+
+      <classpath>
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${module.source}/main/org/jboss/test"/>
+        <path refid="javac.classpath"/>
+      </classpath>
+
+      <formatter type="${junit.formatter.type}"
+        usefile="${junit.formatter.usefile}"/>
+
+      <batchtest todir="${build.reports}"
+        haltonerror="${junit.batchtest.haltonerror}"
+        haltonfailure="${junit.batchtest.haltonfailure}"
+        fork="${junit.batchtest.fork}">
+
+        <fileset dir="${build.classes}">
+          <include name="**/*TestCase.class"/>
+          <include name="**/*TestSuite.class"/>
+        </fileset>
+      </batchtest>
+    </junit>
+  </target>
+
+  <target name="test-jaas10-junit" depends="compile">
+    <mkdir dir="${build.reports}"/>
+    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
+    <junit dir="${module.output}"
+      printsummary="${junit.printsummary}"
+      haltonerror="${junit.haltonerror}"
+      haltonfailure="${junit.haltonfailure}"
+      fork="${junit.fork}"
+      timeout="${junit.timeout}"
+      jvm="${junit.jvm}">
+
+      <sysproperty key="conf.dir" value="${conf.dir}"/>
+      <sysproperty key="output.dir" file="${module.output}"/>
+      <sysproperty key="jboss.home" file="${project.root}"/>
+      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+      <jvmarg value="${junit.jvm.options}"/>
+      <jvmarg value="-Djava.security.debug=access,failure"/>
+      <jvmarg value="-Djava.security.manager"/>
+      <jvmarg value="-Djava.security.policy=${conf.dir}/tst.policy"/>
+
+      <classpath>
+        <pathelement location="${build.lib}/jbosssx.jar"/>
+        <pathelement location="${build.tests}/jbosssx-tests.jar"/>
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${conf.dir}"/>
+        <path refid="javac.classpath"/>
+      </classpath>
+
+      <formatter type="${junit.formatter.type}"
+        usefile="${junit.formatter.usefile}"/>
+
+      <test todir="${build.reports}" name="org.jboss.test.LoginContextTestCase"/>
+    </junit>
+  </target>
+
+  <target name="test-jbossjaas-junit" depends="compile">
+    <mkdir dir="${build.reports}"/>
+    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
+    <junit dir="${module.output}"
+      printsummary="${junit.printsummary}"
+      haltonerror="${junit.haltonerror}"
+      haltonfailure="${junit.haltonfailure}"
+      fork="${junit.fork}"
+      timeout="${junit.timeout}"
+      jvm="${junit.jvm}">
+
+      <sysproperty key="output.dir" file="${module.output}"/>
+      <sysproperty key="jboss.home" file="${project.root}"/>
+      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+      <jvmarg value="${junit.jvm.options}"/>
+      <jvmarg value="-Djava.security.debug=access,failure"/>
+      <jvmarg value="-Djava.security.manager"/>
+      <jvmarg value="-Djava.security.policy=${conf.dir}/tst.policy"/>
+      <sysproperty key="conf.dir" value="${conf.dir}"/>
+      <sysproperty key="jboss.home" value="${jboss.home}"/>
+      <sysproperty key="output.dir" value="${output.dir}"/>
+      <sysproperty key="jbosstest.deploy.dir" value="${build.lib}"/>
+
+      <classpath>
+        <pathelement location="${build.lib}/jboss-jaas.jar"/>
+        <pathelement location="${build.lib}/jbosssx.jar"/>
+        <pathelement location="${build.tests}/jbosssx-tests.jar"/>
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${conf.dir}"/>
+        <path refid="javac.classpath"/>
+      </classpath>
+
+      <formatter type="${junit.formatter.type}"
+        usefile="${junit.formatter.usefile}"/>
+
+      <test todir="${build.reports}" name="org.jboss.test.LoginContextTestCase"/>
+    </junit>
+  </target>
+
+  <target name="test-parser-junit" depends="compile">
+    <mkdir dir="${build.reports}"/>
+    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
+    <junit dir="${module.output}"
+      printsummary="${junit.printsummary}"
+      haltonerror="${junit.haltonerror}"
+      haltonfailure="${junit.haltonfailure}"
+      fork="${junit.fork}"
+      timeout="${junit.timeout}"
+      jvm="${junit.jvm}">
+
+      <jvmarg value="${junit.jvm.options}"/>
+      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+
+      <classpath>
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${module.source}/main/org/jboss/test"/>
+        <path refid="javac.classpath"/>
+      </classpath>
+
+      <formatter type="${junit.formatter.type}"
+        usefile="${junit.formatter.usefile}"/>
+
+      <test todir="${build.reports}" name="org.jboss.test.SunConfigParserTestCase"/>
+    </junit>
+  </target>
+
+  <target name="reports" depends="tests-reports"
+    description="Generates all reports."/>
+
+  <target name="tests-reports" depends="tests-reports-html"/>
+
+  <target name="tests-reports-html" depends="compile">
+    <mkdir dir="${build.reports}/html"/>
+
+    <junitreport todir="${build.reports}">
+      <fileset dir="${build.reports}">
+        <include name="TEST-*.xml"/>
+      </fileset>
+      <report format="frames" todir="${build.reports}/html"/>
+    </junitreport>
+  </target>
+ 
+</project>

Added: trunk/security/build-thirdparty.xml
===================================================================
--- trunk/security/build-thirdparty.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/build-thirdparty.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
+<project name="main.build"
+          default="synchronize"
+          basedir=".">
+
+   <!-- Property File definitions -->
+   <property file="local.properties"/>
+   <property file="synchronize.properties"/>
+   <property environment="env"/>
+
+   <!-- Property Definitions -->
+   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
+
+   <!-- Allow jbossbuild.repository to be set from (in order or priority)
+      + Command line -Djbossbuild.repository=...
+      + synchronize.properties jbossbuild.repository setting
+      + 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"/>
+
+   <!-- File Imports -->
+   <import file="tools/etc/jbossbuild/tasks.xml"/>
+
+
+   <!-- Main Definition of dependencies -->
+   <build id="jbossas-thirdparty"
+          impltitle="JBossAS"
+          implversion="jboss-head"
+          implvendor="JBoss Inc."
+          implurl="http://www.jboss.org"
+          description="JBoss Application Server"
+          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
+          thirdpartypath="thirdparty/"
+          location="${jbossbuild.repository}"
+          targetdefs="targets">
+
+      <!--
+        The repository is in CVS under the module repository.jboss.com whose contents
+        are pushed to the http://repository.jboss.com site.
+      -->
+      <componentref name="apache-log4j" version="1.2.8"/> 
+      <componentref name="apache-xerces" version="2.7.1"/>
+      <componentref name="dom4j" version="1.5"/>
+      <componentref name="hsqldb" version="1.8.0.2"/>
+      <componentref name="javassist" version="snapshot"/>
+      <componentref name="jboss/common" version="1.0.2"/>
+      <componentref name="jboss/jbossxb" version="1.0.0.CR6"/>
+      <componentref name="junit" version="3.8.1"/>
+      <componentref name="oswego-concurrent" version="1.3.4"/>
+      <componentref name="sun-javacc" version="3.2"/>
+      <componentref name="sun-javamail" version="1.4"/>
+      <componentref name="sun-xacml" version="2.0"/>
+   </build>
+
+   <synchronizeinfo/>
+
+   <!-- Generate the targets -->
+   <generate generate="jbossas-thirdparty"/>
+
+
+   <target name="generate-lib-file"
+      description="generate libraries.ent and thirdparty license info"
+      depends="synchronize">
+         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
+      <visit-componentref-graph
+         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
+   </target>
+
+</project>

Modified: trunk/security/build.xml
===================================================================
--- trunk/security/build.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/build.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -1,8 +1,7 @@
 <?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">
+   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent"> 
+   <!ENTITY modules SYSTEM "tools/etc/buildmagic/modules.ent">
 ]>
 
 <!-- ====================================================================== -->
@@ -16,7 +15,7 @@
 
 <!-- $Id$ -->
 
-<project default="main" name="JBoss/Security">
+<project default="main" basedir="." name="JBoss/Security">
 
   <!-- ================================================================== -->
   <!-- Setup                                                              -->
@@ -50,7 +49,8 @@
      | should contain module specific configuration elements.
    -->
 
-  <target name="configure" unless="configure.disable">
+  <target name="configure" unless="configure.disable"
+          depends="createthirdparty" >
 
     <!-- =================== -->
     <!-- Basic Configuration -->
@@ -61,40 +61,6 @@
     <property name="module.Name" value="JBoss Security(JBossSX)"/>
     <property name="module.version" value="1.0"/>
 
-    <!-- ========= -->
-    <!-- Libraries -->
-    <!-- ========= -->
-    &libraries;
-    <!-- The combined library classpath -->
-    <path id="library.classpath">
-      <path refid="apache.log4j.classpath"/>
-      <path refid="apache.xerces.classpath"/>
-      <path refid="dom4j.dom4j.classpath"/>
-      <path refid="junit.junit.classpath"/>
-      <path refid="hsqldb.hsqldb.classpath"/>
-      <path refid="oswego.concurrent.classpath"/>
-      <path refid="javassist.classpath"/>
-      <path refid="sun.xacml.classpath"/>
-      <path refid="jboss.jbossxb.classpath"/>
-      <path refid="sun.javamail.classpath"/>
-    </path>
-
-    <!-- ======= -->
-    <!-- Modules -->
-    <!-- ======= -->
-    &modules;
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-      <path refid="jboss.j2ee.classpath"/>
-      <path refid="jboss.j2ee.ext.classpath"/>
-      <path refid="jboss.common.classpath"/>
-      <path refid="jboss.system.classpath"/>
-      <path refid="jboss.naming.classpath"/>
-      <path refid="jboss.transaction.classpath"/>
-      <path refid="jboss.j2se.classpath"/>
-      <path refid="jboss.mbeans.classpath"/>
-    </path>
-
     <!-- ===== -->
     <!-- Tasks -->
     <!-- ===== -->
@@ -140,188 +106,98 @@
      <call target="_default:task-init"/>
   </target>
 
-
   <!-- ================================================================== -->
-  <!-- Compile                                                            -->
+  <!-- Create Thirdparty                                                  -->
   <!-- ================================================================== -->
+   <!-- create the thirdparty folder from items in the repository -->
+   <!-- then generate a new libraries.ent file and include it in  -->
+   <!-- the build                                                 -->
+   <target name="createthirdparty" unless="inhibit.downloads"
+      depends="check.inhibit.downloads, set.proxy">
+      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
+   </target>
 
-  <!-- 
-     |  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"
-    depends="compile-parsers, compile-classes, compile-rmi, compile-etc, compile-resources"
-    description="Compile all source files."/>
-
-  <!-- Compile parsers -->
-  <target name="compile-parsers" depends="init">
-    <mkdir dir="${build.parsers}/org/jboss/security/auth/login"/>
-
-    <!-- Sun JAAS config file parser -->
-    <javacc target="${source.java}/org/jboss/security/auth/login/SunConfigParser.jj"
-      outputdirectory="${build.parsers}/org/jboss/security/auth/login"
-      javacchome="${sun.javacc.lib}"
-      static="false"/>
+   <!-- check if thirdparty libraries are to be downloaded -->
+   <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>
 
-  <!-- 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}"
-      includes="${javac.includes}"
-      excludes="${javac.excludes}"
-      failonerror="${javac.fail.onerror}">
-      <src path="${source.java}"/>
-      <src path="${build.parsers}"/>
-      <classpath refid="javac.classpath"/>
-    </javac>
+  <!-- check if the the user has specied proxy settings -->
+  <target name="check.proxy">
+    <condition property="hasproxy">
+        <and>
+            <isset property="proxy.host"/>
+            <isset property="proxy.port"/>
+            <not>
+                <equals arg1="" arg2="${proxy.host}" trim="true"/>
+            </not>
+            <not>
+                <equals arg1="" arg2="${proxy.port}" trim="true"/>
+            </not>
+        </and>
+    </condition>
   </target>
 
-  <!-- Compile RMI stubs -->
-  <target name="compile-rmi" depends="compile-classes">
-    <rmic base="${build.classes}"
-      verify="${rmic.verify}"
-      iiop="${rmic.iiop}"
-      iiopopts="${rmic.iiopops}"
-      idl="${rmic.idl}"
-      idlopts="${rmic.idlops}"
-      debug="${rmic.debug}"
-      stubVersion="${rmic.stubVersion}">
-      <classpath refid="javac.classpath"/>
-      <include name="${rmic.includes}"/>
-      <exclude name="${rmic.excludes}"/>
+  <!-- set proxy settings -->
+  <condition property="hasproxyauth">
+        <and>
+            <isset property="hasproxy"/>
+            <isset property="proxy.username"/>
+            <isset property="proxy.password"/>
+            <not>
+                <equals arg1="" arg2="${proxy.username}" trim="true"/>
+            </not>
+            <not>
+                <equals arg1="" arg2="${proxy.password}" trim="true"/>
+            </not>
+        </and>
+    </condition>
+  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
 
-      <include name="org/jboss/security/srp/SRPRemoteServer.class"/>
-    </rmic>
+  <!-- set proxy settings without auth -->
+  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
+    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
+    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
   </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>
-    </copy>
+  <!-- set proxy settings using auth -->
+  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
+    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
+    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
+  </target>  
 
-    <copy todir="${build.classes}">
-      <fileset dir="${source.java}">
-        <include name="org/jboss/security/jacc/*.xml"/>
-      </fileset>
-    </copy>
-  </target>
-
-  <!-- Compile resource files -->
-  <target name="compile-resources" depends="init">
-    <mkdir dir="${build.resources}"/>
-    <copy todir="${build.resources}" filtering="yes">
-      <fileset dir="${source.resources}">
-        <include name="**/*"/>
-      </fileset>
-    </copy>
-  </target>
-
   <!-- ================================================================== -->
-  <!-- Archives                                                           -->
+  <!-- Compile                                                            -->
   <!-- ================================================================== -->
 
-  <!-- 
-     |  Build all jar files.
-    -->
-  <target name="jars" description="Builds all jar files."
-    depends="_buildmagic:build-bypass-check"
-    unless="build-bypass.on">
+  <!--
+     | 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.
+   -->
 
-    <call target="compile"/>
+  <target name="compile" depends="_default:compile-etc"
+    description="Compile all source files.">
+    <echo>PROJECTROOT=${project.root}</echo>
+    <ant antfile="build-compile.xml" target="compile-classes"/>
+  </target>
 
-    <mkdir dir="${build.lib}"/>
-
-    <!-- Build jbosssx.jar -->
-    <jar jarfile="${build.lib}/jbosssx.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/crypto/**"/>
-        <include name="org/jboss/security/**"/>
-      </fileset>
-      <fileset dir="${source.resources}">
-        <include name="dtd/security-policy.dtd"/>
-      </fileset>
-    </jar>
-
-    <!-- Build jbosssx-client.jar -->
-    <jar jarfile="${build.lib}/jbosssx-client.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <exclude name="META-INF/MANIFEST.MF"/> <!-- HACK -->
-        <include name="org/jboss/crypto/JBossSXProvider.class"/>
-        <include name="org/jboss/crypto/digest/*"/>
-        <include name="org/jboss/security/*"/>
-        <include name="org/jboss/security/auth/callback/*"/>
-        <include name="org/jboss/security/auth/login/*"/>
-        <exclude name="org/jboss/security/auth/login/XMLLoginConfig.class"/>
-        <exclude name="org/jboss/security/auth/login/XMLLoginConfigMBean.class"/>
-        <include name="org/jboss/security/jndi/LoginInitialContextFactory.class"/>
-        <include name="org/jboss/security/jndi/JndiLoginInitialContextFactory.class"/>
-        <include name="org/jboss/security/plugins/PBEUtils.class"/>
-        <include name="org/jboss/security/ssl/ClientSocketFactory.class"/>
-        <include name="org/jboss/security/ssl/RMISSLClientSocketFactory.class"/>
-      </fileset>
-    </jar>
-
-    <!-- Build jbosssx-tests.jar -->
-    <mkdir dir="${build.tests}"/>
-    <jar jarfile="${build.tests}/jbosssx-tests.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/test/TestLoginModule.class"/>
-      </fileset>
-    </jar>
-
-    <!-- Update the build marker to allow bypassing -->
-    <touch file="${build-bypass.marker}"/>
-
+ <target name="jars" description="Builds all jar files."
+    depends="_buildmagic:build-bypass-check"
+    unless="build-bypass.on">
+    <ant antfile="build-compile.xml" target="run-jars"/>
   </target>
 
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="install"
-    description="Install the structure for a release."
-    depends="all, _buildmagic:install:default"/>
-
-  <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                                                           -->
   <!-- ================================================================== -->
 
@@ -335,9 +211,8 @@
   <target name="clobber"
     description="Cleans up all generated files."
     depends="_buildmagic:clobber, clean">
-  </target>
+  </target> 
 
-
   <!-- ================================================================== -->
   <!-- Misc.                                                              -->
   <!-- ================================================================== -->
@@ -360,176 +235,30 @@
 
 
   <!-- ================================================================== -->
-  <!-- Tests                                                              -->
+  <!-- Install & Release                                                  -->
   <!-- ================================================================== -->
 
-  <!--
-     | Run all tests.
-   -->
+  <target name="install"
+    description="Install the structure for a release."
+    depends="all, _buildmagic:install:default"/>
 
-  <target name="tests" depends="init, tests-junit, tests-reports"
-    description="Execute all tests.">
-  </target>
+  <target name="release" depends="install"/>
 
-  <!--
-     | Run JUnit tests.
-   -->
+  <target name="release-zip"
+    description="Builds a ZIP distribution."
+    depends="release, _buildmagic:release:zip"/>
 
-  <target name="tests-junit" depends="jars">
-    <mkdir dir="${build.reports}"/>
-    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
-    <junit dir="${module.output}"
-      printsummary="${junit.printsummary}"
-      haltonerror="${junit.haltonerror}"
-      haltonfailure="${junit.haltonfailure}"
-      fork="${junit.fork}"
-      timeout="${junit.timeout}"
-      jvm="${junit.jvm}">
+  <target name="release-tar"
+    description="Builds a TAR distribution."
+    depends="release, _buildmagic:release:tar"/>
 
-      <sysproperty key="output.dir" file="${module.output}"/>
-      <sysproperty key="jboss.home" file="${project.root}"/>
-      <jvmarg value="${junit.jvm.options}"/>
-      <jvmarg value="-Djava.security.debug=access,failure"/>
-      <jvmarg value="-Djava.security.manager"/>
-      <jvmarg value="-Djava.security.policy=${conf.dir}/tst.policy"/>
+  <target name="release-tgz"
+    description="Builds a TAR-GZ distribution."
+    depends="release, _buildmagic:release:tgz"/>
 
-      <classpath>
-        <pathelement location="${build.classes}"/>
-        <pathelement location="${module.source}/main/org/jboss/test"/>
-        <path refid="javac.classpath"/>
-      </classpath>
+  <target name="release-all"
+    description="Builds a distribution for each archive type."
+    depends="release-zip, release-tgz"/> 
 
-      <formatter type="${junit.formatter.type}"
-        usefile="${junit.formatter.usefile}"/>
 
-      <batchtest todir="${build.reports}"
-        haltonerror="${junit.batchtest.haltonerror}"
-        haltonfailure="${junit.batchtest.haltonfailure}"
-        fork="${junit.batchtest.fork}">
-
-        <fileset dir="${build.classes}">
-          <include name="**/*TestCase.class"/>
-          <include name="**/*TestSuite.class"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-  <target name="test-jaas10-junit" depends="compile">
-    <mkdir dir="${build.reports}"/>
-    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
-    <junit dir="${module.output}"
-      printsummary="${junit.printsummary}"
-      haltonerror="${junit.haltonerror}"
-      haltonfailure="${junit.haltonfailure}"
-      fork="${junit.fork}"
-      timeout="${junit.timeout}"
-      jvm="${junit.jvm}">
-
-      <sysproperty key="conf.dir" value="${conf.dir}"/>
-      <sysproperty key="output.dir" file="${module.output}"/>
-      <sysproperty key="jboss.home" file="${project.root}"/>
-      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
-      <jvmarg value="${junit.jvm.options}"/>
-      <jvmarg value="-Djava.security.debug=access,failure"/>
-      <jvmarg value="-Djava.security.manager"/>
-      <jvmarg value="-Djava.security.policy=${conf.dir}/tst.policy"/>
-
-      <classpath>
-        <pathelement location="${build.lib}/jbosssx.jar"/>
-        <pathelement location="${build.tests}/jbosssx-tests.jar"/>
-        <pathelement location="${build.classes}"/>
-        <pathelement location="${conf.dir}"/>
-        <path refid="javac.classpath"/>
-      </classpath>
-
-      <formatter type="${junit.formatter.type}"
-        usefile="${junit.formatter.usefile}"/>
-
-      <test todir="${build.reports}" name="org.jboss.test.LoginContextTestCase"/>
-    </junit>
-  </target>
-
-  <target name="test-jbossjaas-junit" depends="compile">
-    <mkdir dir="${build.reports}"/>
-    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
-    <junit dir="${module.output}"
-      printsummary="${junit.printsummary}"
-      haltonerror="${junit.haltonerror}"
-      haltonfailure="${junit.haltonfailure}"
-      fork="${junit.fork}"
-      timeout="${junit.timeout}"
-      jvm="${junit.jvm}">
-
-      <sysproperty key="output.dir" file="${module.output}"/>
-      <sysproperty key="jboss.home" file="${project.root}"/>
-      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
-      <jvmarg value="${junit.jvm.options}"/>
-      <jvmarg value="-Djava.security.debug=access,failure"/>
-      <jvmarg value="-Djava.security.manager"/>
-      <jvmarg value="-Djava.security.policy=${conf.dir}/tst.policy"/>
-      <sysproperty key="conf.dir" value="${conf.dir}"/>
-      <sysproperty key="jboss.home" value="${jboss.home}"/>
-      <sysproperty key="output.dir" value="${output.dir}"/>
-      <sysproperty key="jbosstest.deploy.dir" value="${build.lib}"/>
-
-      <classpath>
-        <pathelement location="${build.lib}/jboss-jaas.jar"/>
-        <pathelement location="${build.lib}/jbosssx.jar"/>
-        <pathelement location="${build.tests}/jbosssx-tests.jar"/>
-        <pathelement location="${build.classes}"/>
-        <pathelement location="${conf.dir}"/>
-        <path refid="javac.classpath"/>
-      </classpath>
-
-      <formatter type="${junit.formatter.type}"
-        usefile="${junit.formatter.usefile}"/>
-
-      <test todir="${build.reports}" name="org.jboss.test.LoginContextTestCase"/>
-    </junit>
-  </target>
-
-  <target name="test-parser-junit" depends="compile">
-    <mkdir dir="${build.reports}"/>
-    <property name="conf.dir" value="${source.java}/org/jboss/test"/>
-    <junit dir="${module.output}"
-      printsummary="${junit.printsummary}"
-      haltonerror="${junit.haltonerror}"
-      haltonfailure="${junit.haltonfailure}"
-      fork="${junit.fork}"
-      timeout="${junit.timeout}"
-      jvm="${junit.jvm}">
-
-      <jvmarg value="${junit.jvm.options}"/>
-      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
-
-      <classpath>
-        <pathelement location="${build.classes}"/>
-        <pathelement location="${module.source}/main/org/jboss/test"/>
-        <path refid="javac.classpath"/>
-      </classpath>
-
-      <formatter type="${junit.formatter.type}"
-        usefile="${junit.formatter.usefile}"/>
-
-      <test todir="${build.reports}" name="org.jboss.test.SunConfigParserTestCase"/>
-    </junit>
-  </target>
-
-  <target name="reports" depends="tests-reports"
-    description="Generates all reports."/>
-
-  <target name="tests-reports" depends="tests-reports-html"/>
-
-  <target name="tests-reports-html" depends="compile">
-    <mkdir dir="${build.reports}/html"/>
-
-    <junitreport todir="${build.reports}">
-      <fileset dir="${build.reports}">
-        <include name="TEST-*.xml"/>
-      </fileset>
-      <report format="frames" todir="${build.reports}/html"/>
-    </junitreport>
-  </target>
-
 </project>

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Modified: trunk/security/src/main/org/jboss/security/AuthenticationManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/AuthenticationManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/AuthenticationManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -22,6 +22,8 @@
 package org.jboss.security;
 
 import java.security.Principal;
+import java.util.Map;
+
 import javax.security.auth.Subject;
 
 /** The AuthenticationManager is responsible for validating credentials
@@ -85,4 +87,19 @@
         isValid failed or has not been called for the active thread.
     */
    Subject getActiveSubject();
+   
+   /**
+    * Trust related usecases may require translation of a principal from another domain
+    * to the current domain
+    * An implementation of this interface may need to do a backdoor contact of the external
+    * trust provider in deriving the target principal 
+    * @param anotherDomainPrincipal Principal that is applicable in the other domain 
+    *                              (Can be null - in which case the contextMap is used
+    *                               solely to derive the target principal)
+    * @param contextMap Any context information (including information on the other domain 
+    *                   that may be relevant in deriving the target principal). Any SAML 
+    *                   assertions that may be relevant can be passed here.
+    * @return
+    */
+   Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap);
 }

Modified: trunk/security/src/main/org/jboss/security/AuthorizationManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/AuthorizationManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/AuthorizationManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -21,6 +21,11 @@
  */
 package org.jboss.security; 
 
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.Map;
+import java.util.Set;
+
 import org.jboss.security.authorization.AuthorizationException;
 import org.jboss.security.authorization.Resource;
 
@@ -35,14 +40,8 @@
  *  @since  Jan 2, 2006 
  *  @version $Revision$
  */
-public interface AuthorizationManager extends RealmMapping
-{  
-   /**
-    * Checks whether the authenticated Principal has the role
-    * @param roleName the role to check for the caller/user principal
-    * @return Whether the authenticated principal has the role
-    */
-   public boolean doesUserHaveRole(String roleName);  
+public interface AuthorizationManager 
+{ 
    
    /**
     * Authorize a resource
@@ -50,5 +49,36 @@
     * @return
     * @throws AuthorizationException
     */
-   public int authorize(Resource resource) throws AuthorizationException;
-}
+   public int authorize(Resource resource) throws AuthorizationException; 
+  
+   
+   /** Validates the application domain roles to which the operational
+   environment Principal belongs.
+   @param principal the caller principal as known in the operation environment.
+   @param roles The Set<Principal> for the application domain roles that the
+    principal is to be validated against.
+   @return true if the principal has at least one of the roles in the roles set,
+       false otherwise.
+    */
+   public boolean doesUserHaveRole(Principal principal, Set roles); 
+   
+   
+   /** Return the set of domain roles the principal has been assigned.
+   @return The Set<Principal> for the application domain roles that the
+    principal has been assigned.
+    */
+   public Set getUserRoles(Principal principal); 
+   
+   /**
+    * Trust usecases may have a need to determine the roles of the target
+    * principal which has been derived via a principal from another domain
+    * by the Authentication Manager
+    * An implementation of this interface may have to contact a trust provider
+    * for additional information about the principal
+    * @param targetPrincipal Principal applicable in current domain
+    * @param contextMap Contextual Information that may be useful for the
+    *             implementation in determining the roles. 
+    * @return
+    */
+   public Group getTargetRoles(Principal targetPrincipal, Map contextMap);
+ }

Modified: trunk/security/src/main/org/jboss/security/SecurityAssociation.java
===================================================================
--- trunk/security/src/main/org/jboss/security/SecurityAssociation.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/SecurityAssociation.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -23,7 +23,8 @@
 
 import java.security.Principal;
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.HashMap; 
+
 import javax.security.auth.Subject;
 
 import org.jboss.logging.Logger;
@@ -97,9 +98,7 @@
     * Thread local stacks of authenticated subject used to control the current
     * caller security context
     */ 
-   private static SubjectThreadLocalStack threadSubjectStacks;
-   
-   private static InheritableThreadLocal securityContextLocal = new InheritableThreadLocal();
+   private static SubjectThreadLocalStack threadSubjectStacks; 
 
    /**
     * The permission required to access getPrincpal, getCredential
@@ -192,24 +191,7 @@
          log.trace("getPrincipal, principal="+thePrincipal);
          
       return thePrincipal;
-   }
-   
-   public static SecurityContext getSecurityContext()
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPermission(getPrincipalInfoPermission);
- 
-      SecurityContext sc = null;
-       
-      if (server)
-         sc = (SecurityContext)securityContextLocal.get();
-      
-      if( trace )
-         log.trace("getSecurityContext, SecurityContext="+sc);
-         
-      return sc;
-   }
+   } 
 
    /**
     * Get the caller's principal. If a security manager is present,
@@ -326,22 +308,8 @@
       sc.setPrincipal(principal);
       if (trace)
          log.trace("setPrincipal, sc="+sc);
-   }
-   
-   public static void setSecurityContext(SecurityContext sc)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPermission(setPrincipalInfoPermission);
+   } 
 
-      if (trace)
-         log.trace("setSecurityContext, SecurityContext=" + sc );
-      if (server)
-      {
-         securityContextLocal.set(sc);
-      } 
-   }
-
    /**
     * Set the current principal credential information. This can be of any type
     * including: a String password, a char[] password, an X509 cert, etc.

Modified: trunk/security/src/main/org/jboss/security/SecurityConstants.java
===================================================================
--- trunk/security/src/main/org/jboss/security/SecurityConstants.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/SecurityConstants.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -96,4 +96,6 @@
    String WEB_REQUEST_KEY = "javax.servlet.http.HttpServletRequest";
    
    String ROLES_IDENTIFIER = "Roles";
+   
+   String SECURITY_CONTEXT = "SecurityContext";
 }

Modified: trunk/security/src/main/org/jboss/security/SecurityContext.java
===================================================================
--- trunk/security/src/main/org/jboss/security/SecurityContext.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/SecurityContext.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -7,20 +7,12 @@
 package org.jboss.security;
 
 import java.security.Principal;
-import java.security.acl.Group;
-import java.util.ArrayList;
-import java.util.Enumeration; 
-import java.util.HashMap;
 import java.util.Map;
 
-import org.jboss.logging.Logger; 
-import org.jboss.security.config.ApplicationPolicy;
-import org.jboss.security.config.MappingInfo;
-import org.jboss.security.mapping.MappingContext;
-import org.jboss.security.mapping.MappingProvider;
-import org.jboss.security.mapping.config.MappingModuleEntry;
+import javax.security.auth.Subject;
 
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
+import org.jboss.security.audit.AuditContext;
+import org.jboss.security.mapping.MappingContext;
  
 
 /**
@@ -29,109 +21,81 @@
  *  @version $Revision$
  *  @since  Aug 24, 2006
  */
-public class SecurityContext
-{
-   private static final Logger log = Logger.getLogger(SecurityContext.class);
+public abstract class SecurityContext
+{/*
+   protected static final Logger log = Logger.getLogger(SecurityContext.class);
    
-   private boolean trace = log.isTraceEnabled();
-   
+   protected boolean trace = log.isTraceEnabled(); 
+   */
    /**
     * A map of roles (as a Group) keyed in by securityDomain
     */
-   private ConcurrentHashMap rolesMap = new ConcurrentHashMap();
+  /* private ConcurrentHashMap rolesMap = new ConcurrentHashMap();*/
    
-   public SecurityContext()
-   { 
-   } 
-   
-   /**
-    * Get the authorization manager for the security domain
-    * @param securityDomain
-    * @return
-    */
-   public AuthorizationManager getAuthorizationManager(String securityDomain)
+   public class SubjectInfo
    {
-     return Util.getAuthorizationManager(securityDomain);   
-   }
-   
-   /**
-    * Get the roles 
-    * @param securityDomain Security Domain under which the roles were derived
-    * @return
-    */
-   public Group getRoles(String securityDomain)
-   {
-      return (Group)rolesMap.get(securityDomain);
-   }
-
-   /**
-    * Set the roles for the security domain
-    * @param roles
-    * @param securityDomain
-    */
-   public void setRoles(Group roles, String securityDomain)
-   {
-      Group grp = (Group)rolesMap.get(securityDomain);
-      if(grp == null)
-         grp = new SimpleGroup(SecurityConstants.ROLES_IDENTIFIER);
-      Enumeration principals = roles.members();
-      while(principals.hasMoreElements())
+      private Principal authenticationPrincipal;
+      private Object authenticationCredential;
+      private Subject authenticatedSubject;
+      
+      public Principal getAuthenticationPrincipal()
       {
-         grp.addMember((Principal)principals.nextElement());
+         return authenticationPrincipal;
       }
-      rolesMap.put(securityDomain, grp);
       
-      //Apply Mapping Logic  
-      ApplicationPolicy aPolicy = Util.getApplicationPolicy(securityDomain);
+      public void setAuthenticationPrincipal(Principal authenticationPrincipal)
+      {
+         this.authenticationPrincipal = authenticationPrincipal;
+      }
       
-      if(aPolicy == null)
+      public Object getAuthenticationCredential()
       {
-         String defaultDomain = SecurityConstants.DEFAULT_APPLICATION_POLICY;
-         if(trace)
-            log.trace("Application Policy not found for domain=" + securityDomain +
-                  ".Mapping framework will use the default domain:" + defaultDomain);
-         aPolicy = Util.getApplicationPolicy(defaultDomain);
-      } 
-      MappingInfo rmi = aPolicy.getRoleMappingInfo();
-      if(rmi != null)
+         return authenticationCredential;
+      }
+      
+      public void setAuthenticationCredential(Object authenticationCredential)
       {
-         MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
-         ArrayList al = new ArrayList();
-         
-         for(int i = 0 ; i < mpe.length; i++)
-         { 
-            MappingProvider mp = getMappingProvider(mpe[i]);
-            if(mp != null)
-               al.add(mp); 
-         }
-         MappingContext mc = new MappingContext(al);
-         Map contextMap = new HashMap();
-         contextMap.put(SecurityConstants.ROLES_IDENTIFIER, roles);
-         
-         if(trace)
-            log.trace("Roles before mapping:"+ roles);
-         roles = (Group)mc.performMapping(contextMap); 
-         if(trace)
-            log.trace("Roles after mapping:"+ roles);
-         this.rolesMap.put(securityDomain, roles);
+         this.authenticationCredential = authenticationCredential;
       }
-   }  
-
-   private MappingProvider getMappingProvider(MappingModuleEntry mme)
-   {
-      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      MappingProvider mp = null;
-      try
+      
+      public Subject getAuthenticatedSubject()
       {
-         Class cl = tcl.loadClass(mme.getMappingModuleName());
-         mp = (MappingProvider)cl.newInstance();
-         mp.init(mme.getOptions());
+         return authenticatedSubject;
       }
-      catch(Exception e)
+      
+      public void setAuthenticatedSubject(Subject authenticatedSubject)
       {
-         if(trace)
-            log.trace("Error in getting Mapping Provider",e);
+         this.authenticatedSubject = authenticatedSubject;
       } 
-      return mp; 
+   } 
+   
+   public interface MappingKeyInfo
+   {
+      public final static String ROLE_MAPPING = "RoleMapping";
+      public final static String IDENTITY_MAPPING = "IdentityMapping";
+      public final static String CERTIFICATE_MAPPING = "CertMapping";
    }
+   
+   public abstract AuthenticationManager getAuthenticationManager();
+    
+   public abstract AuthorizationManager getAuthorizationManager();
+   
+   public abstract Map getData();
+   
+   /**
+    * @see MappingKeyInfo
+    * @param Key Key of the form MappingKeyInfo
+    * @return A Mapping Context configured with providers
+    */
+   public abstract MappingContext getMappingContext(String Key);
+   
+   /**
+    * Return the AuditContext configured for the security domain
+    * @return
+    */
+   public abstract AuditContext getAuditContext();
+   
+   public abstract String getSecurityDomain();
+   
+   public abstract SubjectInfo getSubjectInfo(); 
 }

Modified: trunk/security/src/main/org/jboss/security/Util.java
===================================================================
--- trunk/security/src/main/org/jboss/security/Util.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/Util.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -652,6 +652,29 @@
      return SecurityConfiguration.getApplicationPolicy(domainName); 
    }
    
+   public static AuthenticationManager getAuthenticationManager(String securityDomain)
+   {
+      String securityMgrURL = "/securityMgr";
+      String lookupURL = null;
+      if(securityDomain.startsWith(SecurityConstants.JAAS_CONTEXT_ROOT))
+         lookupURL = securityDomain + securityMgrURL;
+      else
+         lookupURL = SecurityConstants.JAAS_CONTEXT_ROOT + "/" 
+                                  + securityDomain + securityMgrURL; 
+      AuthenticationManager am = null;
+      try
+      {
+         InitialContext ic = new InitialContext();
+         am = (AuthenticationManager)ic.lookup(lookupURL);
+      }
+      catch(Exception e)
+      {
+         if(log.isTraceEnabled())
+            log.trace("Error in obtaining AuthenticationManager",e);
+      }
+      return am;
+   }
+   
    /**
     * Do a JNDI lookup to obtain the authorization manager
     * @param securityDomain

Modified: trunk/security/src/main/org/jboss/security/plugins/AuthorizationManagerService.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/AuthorizationManagerService.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/AuthorizationManagerService.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -24,7 +24,9 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method; 
 import java.security.Principal;
+import java.security.acl.Group;
 import java.util.Hashtable;
+import java.util.Map;
 import java.util.Set; 
   
 import javax.naming.Context;
@@ -38,8 +40,7 @@
 import org.jboss.security.auth.callback.SecurityAssociationHandler;
 import org.jboss.security.authorization.Resource;
 import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.util.CachePolicy;
-import org.jboss.util.TimedCachePolicy;
+import org.jboss.util.CachePolicy; 
 
 //$Id$
 
@@ -209,10 +210,13 @@
          Object[] args = {securityDomain, handler}; 
          securityMgr = (AuthorizationManager) ctor.newInstance(args); 
          log.debug("Created AuthorizationManager="+securityMgr); 
-         TimedCachePolicy cachePolicy = new TimedCachePolicy(defaultCacheTimeout,
+         
+         CachePolicy cachePolicy = JaasSecurityManagerService.lookupCachePolicy(securityDomain);
+         log.debug("Found Cache Policy="+cachePolicy);
+         /*TimedCachePolicy cachePolicy = new TimedCachePolicy(defaultCacheTimeout,
                true, defaultCacheResolution);
          cachePolicy.create();
-         cachePolicy.start(); 
+         cachePolicy.start(); */
          // See if the security mgr supports an externalized cache policy
          setSecurityDomainCache(securityMgr, cachePolicy); 
       }
@@ -246,5 +250,10 @@
          if(log.isTraceEnabled())
             log.trace("setCachePolicy failed", e2);
       }
+   }
+
+   public Group getTargetRoles(Principal targetPrincipal, Map contextMap)
+   {
+      throw new RuntimeException("Not implemented"); 
    }  
 }

Modified: trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -246,6 +246,14 @@
       return status;
    }  
    
+   /**
+    * @see AuthenticationManager#getTargetPrincipal(Principal,Map)
+    */
+   public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap)
+   {
+      throw new RuntimeException("Not implemented yet");
+   }
+   
    // ********************************************************
    // Custom Methods
    //********************************************************  

Modified: trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManagerService.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManagerService.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/JASPISecurityManagerService.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -211,6 +211,14 @@
       throw new IllegalStateException("Please call getSecurityManager to obtain"+
             " a security manager and call getActiveSubject");
    } 
+   
+   /**
+    * @see AuthenticationManager#getTargetPrincipal(Principal,Map)
+    */
+   public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap)
+   {
+      throw new RuntimeException("Not implemented yet");
+   }
 
    public void cleanSubject(Subject subject, Map sharedState) throws AuthException
    { 

Modified: trunk/security/src/main/org/jboss/security/plugins/JBossAuthorizationManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/JBossAuthorizationManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/JBossAuthorizationManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -40,16 +40,15 @@
 import org.jboss.logging.Logger;
 import org.jboss.security.AnybodyPrincipal;
 import org.jboss.security.AuthorizationManager;
-import org.jboss.security.NobodyPrincipal;
-import org.jboss.security.SecurityAssociation;
+import org.jboss.security.NobodyPrincipal;  
+import org.jboss.security.SecurityConstants;
 import org.jboss.security.SecurityContext;
 import org.jboss.security.Util;
 import org.jboss.security.authorization.AuthorizationContext;
 import org.jboss.security.authorization.AuthorizationException;
 import org.jboss.security.authorization.PolicyRegistration;
 import org.jboss.security.authorization.Resource;
-import org.jboss.util.CachePolicy;
-import org.jboss.util.TimedCachePolicy;
+import org.jboss.security.mapping.MappingContext; 
 import org.jboss.util.xml.DOMUtils;
 import org.w3c.dom.Element;
 
@@ -65,123 +64,7 @@
  */
 public class JBossAuthorizationManager 
 implements AuthorizationManager,PolicyRegistration
-{
-   /** The authentication cache object.
-    */
-   public static class AuthorizationCacheEntry implements TimedCachePolicy.TimedEntry
-   {
-      private static Logger log = Logger.getLogger(AuthorizationCacheEntry.class);
-      private static boolean trace = log.isTraceEnabled(); 
-      private Subject subject; 
-      private Principal callerPrincipal;
-      private long expirationTime; 
-      /** Is there an active authentication in process */
-      private boolean needsDestroy;
-      /** The number of users sharing this DomainInfo */
-      private int activeUsers;
-      
-      /**
-       Create a cache entry with the given lifetime in seconds. Since this comes
-       from the TimedCachePolicy, its expected to be <= Integer.MAX_VALUE.
-       
-       @param lifetime - lifetime in seconds. A lifetime <= 0 means no caching
-       with the exception of -1 which indicates that the cache entry never
-       expires.
-       */
-      public AuthorizationCacheEntry(long lifetime)
-      {
-         expirationTime = lifetime;
-         if( expirationTime != -1 )
-            expirationTime *= 1000;
-      } 
-      synchronized int acquire()
-      {
-         return activeUsers ++;
-      }
-      synchronized int release()
-      {
-         int users = activeUsers --;
-         if( needsDestroy == true && users == 0 )
-         {
-            if( trace )
-               log.trace("needsDestroy is true, doing logout");
-            logout();
-         }
-         return users;
-      }
-      synchronized void logout()
-      {
-         if( trace )
-            log.trace("logout, subject="+subject+", this="+this);
-         try
-         {
-            subject = null;
-         }
-         catch(Throwable e)
-         {
-            if( trace )
-               log.trace("Cache entry logout failed", e);
-         }
-      }
-      public void init(long now)
-      {
-         expirationTime += now;
-      }
-      public boolean isCurrent(long now)
-      {
-         boolean isCurrent = expirationTime == -1;
-         if( isCurrent == false )
-            isCurrent = expirationTime > now;
-            return isCurrent;
-      }
-      public boolean refresh()
-      {
-         return false;
-      } 
-      public void destroy()
-      {
-         if( trace )
-         {
-            log.trace("destroy, subject="+subject+", this="+this
-                  +", activeUsers="+activeUsers);
-         }
-         
-         synchronized( this )
-         {
-            if( activeUsers == 0 )
-               this.callerPrincipal = null;
-            else
-            {
-               if( trace )
-                  log.trace("destroy saw activeUsers="+activeUsers);
-               needsDestroy = true;
-            }
-         }
-      }
-      public Object getValue()
-      {
-         return this;
-      }
-      public String toString()
-      {
-         StringBuffer tmp = new StringBuffer(super.toString());
-         tmp.append('[');
-         tmp.append(SubjectActions.toString(subject)); 
-         tmp.append(",callerPrincipal=");
-         tmp.append(callerPrincipal);
-         tmp.append(",expirationTime=");
-         tmp.append(expirationTime);
-         tmp.append(']');
-         
-         return tmp.toString();
-      }
-   }
-   
-   /** A cache of DomainInfo objects keyd by Principal. This is now
-    always set externally by our security manager service.
-    */
-   private CachePolicy domainCache;
-   
+{  
    private String securityDomain; 
    
    private Map contextIdToPolicy = new HashMap(); 
@@ -274,15 +157,7 @@
       Group roles = this.getCurrentRoles();
       hasRole = doesRoleGroupHaveRole(role, roles); 
       return hasRole;
-   }
- 
-   /**
-    * @see AuthorizationManager#doesUserHaveRole(String)
-    */ 
-   public boolean doesUserHaveRole(String roleName)
-   {
-      throw new IllegalStateException("Not implemented: doesUserHaveRole");
-   }
+   } 
    
    /** Return the set of domain roles the current active Subject 'Roles' group
     found in the subject Principals set.
@@ -296,147 +171,9 @@
    { 
       Group userRoles = getCurrentRoles();
       return this.getRolesAsSet(userRoles); 
-   }
-
+   }  
+     
    
-   
-   /**
-    * @see AuthorizationManager#getPrincipal(Principal)
-    */
-   public Principal getPrincipal(Principal principal)
-   {
-      //Lets update the cache if needed
-      updateCache(principal);
-      Principal result = principal;
-      // Get the CallerPrincipal group member
-      synchronized( domainCache )
-      {
-         AuthorizationCacheEntry info = getCacheInfo(principal, false);
-         if( trace )
-            log.trace("getPrincipal, cache info: "+info);
-         if( info != null )
-         {
-            result = info.callerPrincipal;
-            // If the mapping did not have a callerPrincipal just use principal
-            if( result == null )
-               result = principal;
-            info.release();
-         }
-      }
-      
-      return result;
-   } 
-   
-   /** The domainCache is typically a shared object that is populated
-    by the login code(LoginModule, etc.) and read by this class in the
-    isValid() method.
-    @see #isValid(Principal, Object, Subject)
-    */
-   public void setCachePolicy(CachePolicy domainCache)
-   {
-      this.domainCache = domainCache;
-      log.debug("CachePolicy set to: "+domainCache);
-   } 
-   
-   /** An accessor method that synchronizes access on the domainCache
-    to avoid a race condition that can occur when the cache entry expires
-    in the presence of multi-threaded access. The allowRefresh flag should
-    be true for authentication accesses and false for other accesses.
-    Previously the other accesses included authorization and caller principal
-    mapping. Now the only use of the 
-    
-    @param principal - the caller identity whose cached credentials are to
-    be accessed.
-    @param allowRefresh - a flag indicating if the cache access should flush
-    any expired entries.
-    */
-   protected AuthorizationCacheEntry getCacheInfo(Principal principal, boolean allowRefresh)
-   {
-      if( domainCache == null )
-         return null;
-      
-      AuthorizationCacheEntry cacheInfo = null;
-      synchronized( domainCache )
-      {
-         if( allowRefresh == true )
-            cacheInfo = (AuthorizationCacheEntry) domainCache.get(principal);
-         else
-            cacheInfo = (AuthorizationCacheEntry) domainCache.peek(principal);
-         if( cacheInfo != null )
-            cacheInfo.acquire();
-      }
-      return cacheInfo;
-   }
-   
-   private void updateCache(Principal principal)
-   {
-      Subject theSubject = SubjectActions.getActiveSubject();
-      if(theSubject == null)
-      {
-         if(trace)
-            log.trace("updateCache:Subject on the SecurityAssociation is null");
-         return;
-      }
-      
-      long lifetime = 0;
-      if( domainCache instanceof TimedCachePolicy )
-      {
-         TimedCachePolicy cache = (TimedCachePolicy) domainCache;
-         lifetime = cache.getDefaultLifetime();
-      }
-      AuthorizationCacheEntry info = new AuthorizationCacheEntry(lifetime);
-      info.subject = theSubject;
-      
-      /* Get the Subject callerPrincipal by looking for a Group called
-       'CallerPrincipal'
-       */
-      Set subjectGroups = theSubject.getPrincipals(Group.class);
-      Iterator iter = subjectGroups.iterator();
-      while( iter.hasNext() )
-      {
-         Group grp = (Group) iter.next();
-         String name = grp.getName();
-         if( name.equals("CallerPrincipal") )
-         {
-            Enumeration members = grp.members();
-            if( members.hasMoreElements() )
-               info.callerPrincipal = (Principal) members.nextElement();
-         }
-      }
-      
-      /* Handle null principals with no callerPrincipal. This is an indication
-       of an user that has not provided any authentication info, but
-       has been authenticated by the domain login module stack. Here we look
-       for the first non-Group Principal and use that.
-       */
-      if( principal == null && info.callerPrincipal == null )
-      {
-         Set subjectPrincipals = theSubject.getPrincipals(Principal.class);
-         iter = subjectPrincipals.iterator();
-         while( iter.hasNext() )
-         {
-            Principal p = (Principal) iter.next();
-            if( (p instanceof Group) == false )
-               info.callerPrincipal = p;
-         }
-      }
-      
-      /* If the user already exists another login is active. Currently
-       only one is allowed so remove the old and insert the new. Synchronize
-       on the domainCache to ensure the removal and addition are an atomic
-       operation so that getCacheInfo cannot see stale data.
-       */
-      synchronized( domainCache )
-      {
-         if( domainCache.peek(principal) != null )
-            domainCache.remove(principal);
-         if(info.callerPrincipal != null)
-         domainCache.insert(principal, info);
-         if( trace )
-            log.trace("Inserted cache info: "+info);
-      }
-   }
-   
    /** Check that the indicated application domain role is a member of the
     user's assigned roles. This handles the special AnybodyPrincipal and
     NobodyPrincipal independent of the Group implementation.
@@ -562,14 +299,14 @@
       Group subjectRoles = Util.getSubjectRoles(subject);
       
       //Deal with the security context
-      SecurityContext sc = SecurityAssociation.getSecurityContext(); 
+      SecurityContext sc = SubjectActions.getSecurityContext(securityDomain); 
       if(sc == null)
       {
-         sc = new SecurityContext(); 
-         SecurityAssociation.setSecurityContext(sc); 
-      }
+         sc = new JBossSecurityContext(securityDomain); 
+         SubjectActions.setSecurityContext(sc, securityDomain);   
+      } 
 
-      Group userRoles = sc.getRoles(securityDomain);
+      Group userRoles = (Group)sc.getData().get(JBossSecurityContext.ROLES);
       if(userRoles == null)
          emptyContextRoles = true;
       userRoles = copyGroups(userRoles, subjectRoles); 
@@ -580,10 +317,23 @@
        * and the subject roles are not the same
        */
       if(subjectRoles != userRoles || emptyContextRoles)
-        sc.setRoles(userRoles, securityDomain); 
+      {
+         MappingContext mc = sc.getMappingContext(SecurityContext.MappingKeyInfo.ROLE_MAPPING);
+         if(mc != null)
+         {
+            Map contextMap = new HashMap();
+            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
+            if(trace)
+               log.trace("Roles before mapping:"+ userRoles);
+            userRoles = (Group)mc.performMapping(contextMap);
+            if(trace)
+               log.trace("Roles after mapping:"+ userRoles);
+         } 
+         sc.getData().put(JBossSecurityContext.ROLES, userRoles); 
+      } 
 
       //Send the final processed (mapping applied) roles
-      return sc.getRoles(securityDomain);
+      return (Group)sc.getData().get(JBossSecurityContext.ROLES);
    } 
    
    /**
@@ -609,4 +359,9 @@
       } 
       return source;
    }
+
+   public Group getTargetRoles(Principal targetPrincipal, Map contextMap)
+   {
+      throw new RuntimeException("Not implemented");
+   }
 }

Modified: trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -28,6 +28,7 @@
 import java.util.Arrays;
 import java.util.Enumeration;  
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Set;
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
@@ -357,8 +358,24 @@
     */
    public Principal getPrincipal(Principal principal)
    {
-      AuthorizationManager am = Util.getAuthorizationManager(securityDomain);
-      return am.getPrincipal(principal); 
+      Principal result = principal;
+      // Get the CallerPrincipal group member
+      synchronized( domainCache )
+      {
+         DomainInfo info = getCacheInfo(principal, false);
+         if( trace )
+            log.trace("getPrincipal, cache info: "+info);
+         if( info != null )
+         {
+            result = info.callerPrincipal;
+            // If the mapping did not have a callerPrincipal just use principal
+            if( result == null )
+               result = principal;
+            info.release();
+         }
+      }
+
+      return result;
    }
 
    /** Does the current Subject have a role(a Principal) that equates to one
@@ -397,6 +414,14 @@
       AuthorizationManager am = Util.getAuthorizationManager(securityDomain);
       return am.getUserRoles(principal);
    } 
+   
+   /**
+    * @see AuthenticationManager#getTargetPrincipal(Principal,Map)
+    */
+   public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap)
+   {
+      throw new RuntimeException("Not implemented yet");
+   }
 
    /** Currently this simply calls defaultLogin() to do a JAAS login using the
     security domain name as the login module configuration name.

Modified: trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManagerService.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManagerService.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/JaasSecurityManagerService.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -534,7 +534,7 @@
     looking up the CachePolicy for a domain. If this fails then the cacheJndiName
     location is treated as a single CachePolicy for all security domains.
     */
-   private static CachePolicy lookupCachePolicy(String securityDomain)
+   static CachePolicy lookupCachePolicy(String securityDomain)
    {
       CachePolicy authCache = null;
       String domainCachePath = cacheJndiName + '/' + securityDomain;

Modified: trunk/security/src/main/org/jboss/security/plugins/NoAccessSecurityManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/NoAccessSecurityManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/NoAccessSecurityManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -23,6 +23,7 @@
 
 import java.io.Serializable;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 import java.security.Principal;
 import javax.security.auth.Subject;
@@ -88,6 +89,14 @@
     {
        return false;
     }
+    
+    /**
+     * @see AuthenticationManager#getTargetPrincipal(Principal,Map)
+     */
+    public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap)
+    {
+       return anotherDomainPrincipal;
+    }
 
     /** Always returns the argument principal.
     @return The argument principal

Modified: trunk/security/src/main/org/jboss/security/plugins/NullSecurityManager.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/NullSecurityManager.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/NullSecurityManager.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -23,6 +23,7 @@
 
 import java.io.Serializable;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 import java.security.Principal;
 import javax.security.auth.Subject;
@@ -89,6 +90,14 @@
     {
        return true;
     }
+    
+    /**
+     * @see AuthenticationManager#getTargetPrincipal(Principal,Map)
+     */
+    public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap)
+    {
+       return anotherDomainPrincipal;
+    }
 
     /** Always returns the argument principal.
     @return The argument principal

Modified: trunk/security/src/main/org/jboss/security/plugins/SubjectActions.java
===================================================================
--- trunk/security/src/main/org/jboss/security/plugins/SubjectActions.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/plugins/SubjectActions.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -27,14 +27,17 @@
 import java.security.PrivilegedExceptionAction;
 import java.security.PrivilegedActionException;
 import java.security.Principal;
+import java.util.HashMap;
 import java.util.Set;
 import java.util.Iterator;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
 import javax.security.auth.callback.CallbackHandler;
-
+ 
 import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SecurityConstants;
+import org.jboss.security.SecurityContext;
 
 /** Common PrivilegedAction used by classes in this package.
  * 
@@ -287,6 +290,52 @@
       }
    }
 
+   static class GetSecurityContextAction implements PrivilegedAction
+   { 
+      private String securityDomain;
+      GetSecurityContextAction(String sd)
+      {
+         this.securityDomain = sd;
+      }
+      public Object run()
+      {
+         String sc = SecurityConstants.SECURITY_CONTEXT;
+         HashMap map = (HashMap)SecurityAssociation.getContextInfo(sc);
+         if(map == null)
+         {
+            map = new HashMap();
+            SecurityAssociation.setContextInfo(sc, map);
+         }
+         SecurityAssociation.setContextInfo(sc, map);  
+         return map.get(this.securityDomain); 
+      }
+   }
+   
+   static class SetSecurityContextAction implements PrivilegedAction
+   { 
+      private SecurityContext securityContext;
+      private String securityDomain;
+      SetSecurityContextAction(SecurityContext sc, String sd)
+      {
+         this.securityContext = sc;
+         this.securityDomain = sd;
+      }
+      
+      public Object run()
+      {
+         String sc = SecurityConstants.SECURITY_CONTEXT;
+         HashMap map = (HashMap)SecurityAssociation.getContextInfo(sc);
+         if(map == null)
+         {
+            map = new HashMap();
+            SecurityAssociation.setContextInfo(sc, map);
+         }
+         map.put(securityDomain, securityContext); 
+         SecurityAssociation.setContextInfo(sc, map); 
+         return null;
+      }
+   }
+   
    static ClassLoader getContextClassLoader()
    {
       ClassLoader loader = (ClassLoader) AccessController.doPrivileged(GetTCLAction.ACTION);
@@ -331,4 +380,16 @@
       String info = (String) AccessController.doPrivileged(action);
       return info;
    }
+   
+   static SecurityContext getSecurityContext(String securityDomain)
+   {
+      GetSecurityContextAction action = new GetSecurityContextAction(securityDomain);
+      return (SecurityContext)AccessController.doPrivileged(action);
+   }
+   
+   static void setSecurityContext(SecurityContext sc, String securityDomain)
+   {
+      SetSecurityContextAction action = new SetSecurityContextAction(sc,securityDomain);
+      AccessController.doPrivileged(action);
+   }
 }

Modified: trunk/security/src/main/org/jboss/security/propertyeditor/SecurityDomainEditor.java
===================================================================
--- trunk/security/src/main/org/jboss/security/propertyeditor/SecurityDomainEditor.java	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/src/main/org/jboss/security/propertyeditor/SecurityDomainEditor.java	2006-09-08 19:43:32 UTC (rev 56669)
@@ -24,6 +24,7 @@
 import java.beans.PropertyEditorSupport;
 import java.security.KeyStore;
 import java.security.Principal;
+import java.util.Map;
 import java.util.Set;
 
 import javax.naming.InitialContext;
@@ -178,6 +179,14 @@
          initDelegate();
          return delegate.getPrincipal(principal);
       }
+      
+      /**
+       * @see AuthenticationManager#getTargetPrincipal(Principal,Map)
+       */
+      public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map contextMap)
+      {
+         throw new RuntimeException("Not implemented yet");
+      }
 
       public boolean doesUserHaveRole(Principal principal, Set roles)
       {

Added: trunk/security/tools/.project
===================================================================
--- trunk/security/tools/.project	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/.project	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>tools</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

Added: trunk/security/tools/bin/ant
===================================================================
--- trunk/security/tools/bin/ant	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/bin/ant	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,299 @@
+#! /bin/sh
+
+#   Copyright 2001-2005 The Apache Software Foundation
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+# Extract launch and ant arguments, (see details below).
+ant_exec_args=
+no_config=false
+use_jikes_default=false
+ant_exec_debug=false
+show_help=false
+for arg in "$@" ; do
+  if [ "$arg" = "--noconfig" ] ; then
+    no_config=true
+  elif [ "$arg" = "--usejikes" ] ; then
+    use_jikes_default=true
+  elif [ "$arg" = "--execdebug" ] ; then
+    ant_exec_debug=true
+  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
+    show_help=true
+    ant_exec_args="$ant_exec_args -h"
+  else
+    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
+      show_help=true
+    fi
+    ant_exec_args="$ant_exec_args \"$arg\""
+  fi
+done
+
+# Source/default ant configuration
+if $no_config ; then
+  rpm_mode=false
+  usejikes=$use_jikes_default
+else
+  # load system-wide ant configuration
+  if [ -f "/etc/ant.conf" ] ; then
+    . /etc/ant.conf
+  fi
+
+  # load user ant configuration
+  if [ -f "$HOME/.ant/ant.conf" ] ; then
+    . $HOME/.ant/ant.conf
+  fi
+  if [ -f "$HOME/.antrc" ] ; then
+    . "$HOME/.antrc"
+  fi
+
+  # provide default configuration values
+  if [ -z "$rpm_mode" ] ; then
+    rpm_mode=false
+  fi
+  if [ -z "$usejikes" ] ; then
+    usejikes=$use_jikes_default
+  fi
+fi
+
+# Setup Java environment in rpm mode
+if $rpm_mode ; then
+  if [ -f /usr/share/java-utils/java-functions ] ; then
+    . /usr/share/java-utils/java-functions
+    set_jvm
+    set_javacmd
+  fi
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+           fi
+           ;;
+esac
+
+if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
+  ## resolve links - $0 may be a link to ant's home
+  PRG="$0"
+  progname=`basename "$0"`
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+    else
+    PRG=`dirname "$PRG"`"/$link"
+    fi
+  done
+
+  ANT_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  ANT_HOME=`cd "$ANT_HOME" && pwd`
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$ANT_HOME" ] &&
+    ANT_HOME=`cygpath --unix "$ANT_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# set ANT_LIB location
+ANT_LIB="${ANT_HOME}/lib"
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then
+        JAVACMD=java
+    fi
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+# Build local classpath using just the launcher in non-rpm mode or
+# use the Jpackage helper in rpm mode with basic and default jars
+# specified in the ant.conf configuration. Because the launcher is
+# used, libraries linked in ANT_HOME will also be include, but this
+# is discouraged as it is not java-version safe. A user should
+# request optional jars and their dependencies via the OPT_JAR_LIST
+# variable
+if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
+  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
+  # If the user requested to try to add some other jars to the classpath
+  if [ -n "$OPT_JAR_LIST" ] ; then
+    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
+    if [ -n "$_OPTCLASSPATH" ] ; then 
+      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
+    fi
+  fi
+
+  # Explicitly add javac path to classpath, assume JAVA_HOME set
+  # properly in rpm mode
+  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
+    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
+  fi
+  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
+    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
+  fi
+
+  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
+  # user CLASSPATH first and ant-found jars after.
+  # In that case, the user CLASSPATH will override ant-found jars
+  #
+  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
+  # with ant-found jars first and user CLASSPATH after
+  if [ -n "$CLASSPATH" ] ; then
+    # merge local and specified classpath 
+    if [ -z "$LOCALCLASSPATH" ] ; then 
+      LOCALCLASSPATH="$CLASSPATH"
+    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
+      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
+    else
+      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
+    fi
+
+    # remove class path from launcher -cp option
+    CLASSPATH=""
+  fi
+else
+  # not using rpm_mode; use launcher to determine classpaths
+  if [ -z "$LOCALCLASSPATH" ] ; then
+      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
+  else
+      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
+  fi
+fi
+
+if [ -n "$JAVA_HOME" ] ; then
+  # OSX hack to make Ant work with jikes
+  if $darwin ; then
+    OSXHACK="${JAVA_HOME}/../Classes"
+    if [ -d "${OSXHACK}" ] ; then
+      for i in "${OSXHACK}"/*.jar
+      do
+        JIKESPATH="$JIKESPATH:$i"
+      done
+    fi
+  fi
+fi
+
+# Allow Jikes support (off by default)
+if $usejikes; then
+  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
+fi
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+    format=mixed
+  else
+    format=windows
+  fi
+  ANT_HOME=`cygpath --$format "$ANT_HOME"`
+  ANT_LIB=`cygpath --$format "$ANT_LIB"`
+  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+  if [ -n "$CLASSPATH" ] ; then
+    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+  fi
+  CYGHOME=`cygpath --$format "$HOME"`
+fi
+
+# Show script help if requested
+if $show_help ; then
+  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
+  echo 'Script Options:'
+  echo '  --help, --h            print this message and ant help'
+  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
+  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
+  echo '                         configuration files'
+  echo '  --usejikes             enable use of jikes by default, unless'
+  echo '                         set explicitly in configuration files'
+  echo '  --execdebug            print ant exec line generated by this'
+  echo '                         launch script'
+  echo '  '
+fi
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+  case "$ANT_HOME" in
+    *\\ )
+    ANT_HOME="$ANT_HOME\\"
+    ;;
+  esac
+  case "$CYGHOME" in
+    *\\ )
+    CYGHOME="$CYGHOME\\"
+    ;;
+  esac
+  case "$JIKESPATH" in
+    *\\ )
+    JIKESPATH="$JIKESPATH\\"
+    ;;
+  esac
+  case "$LOCALCLASSPATH" in
+    *\\ )
+    LOCALCLASSPATH="$LOCALCLASSPATH\\"
+    ;;
+  esac
+  case "$CLASSPATH" in
+    *\\ )
+    CLASSPATH="$CLASSPATH\\"
+    ;;
+  esac
+fi
+# Execute ant using eval/exec to preserve spaces in paths,
+# java options, and ant args
+ant_sys_opts=
+if [ -n "$CYGHOME" ]; then
+  if [ -n "$JIKESPATH" ]; then
+    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
+  else
+    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
+  fi
+else
+  if [ -n "$JIKESPATH" ]; then
+    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
+  fi
+fi
+ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
+if $ant_exec_debug ; then
+    echo $ant_exec_command
+fi
+eval $ant_exec_command

Added: trunk/security/tools/bin/ant.bat
===================================================================
--- trunk/security/tools/bin/ant.bat	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/bin/ant.bat	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,126 @@
+ at echo off
+
+REM  Copyright 2001,2004-2005 The Apache Software Foundation
+REM
+REM  Licensed under the Apache License, Version 2.0 (the "License");
+REM  you may not use this file except in compliance with the License.
+REM  You may obtain a copy of the License at
+REM
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM  Unless required by applicable law or agreed to in writing, software
+REM  distributed under the License is distributed on an "AS IS" BASIS,
+REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM  See the License for the specific language governing permissions and
+REM  limitations under the License.
+
+if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
+
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+rem %~dp0 is expanded pathname of the current script under NT
+set DEFAULT_ANT_HOME=%~dp0..
+
+if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
+set DEFAULT_ANT_HOME=
+
+set _USE_CLASSPATH=yes
+
+rem Slurp the command line arguments. This loop allows for an unlimited number
+rem of arguments (up to the command line limit, anyway).
+set ANT_CMD_LINE_ARGS=%1
+if ""%1""=="""" goto doneStart
+shift
+:setupArgs
+if ""%1""=="""" goto doneStart
+if ""%1""==""-noclasspath"" goto clearclasspath
+set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
+shift
+goto setupArgs
+
+rem here is there is a -noclasspath in the options
+:clearclasspath
+set _USE_CLASSPATH=no
+shift
+goto setupArgs
+
+rem This label provides a place for the argument list loop to break out
+rem and for NT handling to skip to.
+
+:doneStart
+rem find ANT_HOME if it does not exist due to either an invalid value passed
+rem by the user or the %0 problem on Windows 9x
+if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
+
+rem check for ant in Program Files
+if not exist "%ProgramFiles%\ant" goto checkSystemDrive
+set ANT_HOME=%ProgramFiles%\ant
+goto checkJava
+
+:checkSystemDrive
+rem check for ant in root directory of system drive
+if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
+set ANT_HOME=%SystemDrive%\ant
+goto checkJava
+
+:checkCDrive
+rem check for ant in C:\ant for Win9X users
+if not exist C:\ant\lib\ant.jar goto noAntHome
+set ANT_HOME=C:\ant
+goto checkJava
+
+:noAntHome
+echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
+goto end
+
+:checkJava
+set _JAVACMD=%JAVACMD%
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
+goto checkJikes
+
+:noJavaHome
+if "%_JAVACMD%" == "" set _JAVACMD=java.exe
+
+:checkJikes
+if not "%JIKESPATH%"=="" goto runAntWithJikes
+
+:runAnt
+if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
+if not "%CLASSPATH%"=="" goto runAntWithClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+goto end
+
+:runAntNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+goto end
+
+:runAntWithClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+goto end
+
+:runAntWithJikes
+if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
+if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
+
+:runAntWithJikesNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+goto end
+
+:runAntWithJikesAndClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+goto end
+
+:end
+set _JAVACMD=
+set ANT_CMD_LINE_ARGS=
+
+if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
+
+:mainEnd
+if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
+

Added: trunk/security/tools/bin/antRun
===================================================================
--- trunk/security/tools/bin/antRun	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/bin/antRun	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+#
+#  Copyright  2001-2002,2004 The Apache Software Foundation
+# 
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+# 
+#       http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+# 
+#
+
+# Args: DIR command
+cd "$1"
+CMD="$2"
+shift
+shift
+
+exec "$CMD" "$@"

Added: trunk/security/tools/bin/antRun.bat
===================================================================
--- trunk/security/tools/bin/antRun.bat	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/bin/antRun.bat	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,47 @@
+ at echo off
+
+REM
+REM Copyright  2001-2002,2004-2005 The Apache Software Foundation
+REM
+REM  Licensed under the Apache License, Version 2.0 (the "License");
+REM  you may not use this file except in compliance with the License.
+REM  You may obtain a copy of the License at
+REM
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM  Unless required by applicable law or agreed to in writing, software
+REM  distributed under the License is distributed on an "AS IS" BASIS,
+REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM  See the License for the specific language governing permissions and
+REM  limitations under the License.
+REM
+REM
+
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+if ""%1""=="""" goto runCommand
+
+rem Change drive and directory to %1
+if "%OS%"=="Windows_NT" cd /d ""%1""
+if not "%OS%"=="Windows_NT" cd ""%1""
+shift
+
+rem Slurp the command line arguments. This loop allows for an unlimited number
+rem of agruments (up to the command line limit, anyway).
+set ANT_RUN_CMD=%1
+if ""%1""=="""" goto runCommand
+shift
+:loop
+if ""%1""=="""" goto runCommand
+set ANT_RUN_CMD=%ANT_RUN_CMD% %1
+shift
+goto loop
+
+:runCommand
+rem echo %ANT_RUN_CMD%
+%ANT_RUN_CMD%
+
+if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
+

Added: trunk/security/tools/bin/antx.bat
===================================================================
--- trunk/security/tools/bin/antx.bat	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/bin/antx.bat	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,6 @@
+ at echo off
+ at setlocal
+set CLASSPATH=%~dp0..\lib\ant.jar;%CLASSPATH%
+java org.apache.tools.ant.Launcher %*
+rem java -jar %ANT_HOME%\lib\ant.jar org.apache.tools.ant.Launcher
+ at endlocal

Added: trunk/security/tools/bin/lcp.bat
===================================================================
--- trunk/security/tools/bin/lcp.bat	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/bin/lcp.bat	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,30 @@
+REM
+REM Copyright  2001-2004 The Apache Software Foundation
+REM
+REM  Licensed under the Apache License, Version 2.0 (the "License");
+REM  you may not use this file except in compliance with the License.
+REM  You may obtain a copy of the License at
+REM
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM  Unless required by applicable law or agreed to in writing, software
+REM  distributed under the License is distributed on an "AS IS" BASIS,
+REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM  See the License for the specific language governing permissions and
+REM  limitations under the License.
+REM
+REM
+
+set _CLASSPATHCOMPONENT=%1
+if ""%1""=="""" goto gotAllArgs
+shift
+
+:argCheck
+if ""%1""=="""" goto gotAllArgs
+set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
+shift
+goto argCheck
+
+:gotAllArgs
+set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
+

Added: trunk/security/tools/etc/buildmagic/aliases.ent
===================================================================
--- trunk/security/tools/etc/buildmagic/aliases.ent	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/aliases.ent	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,99 @@
+<!-- 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/security/tools/etc/buildmagic/autoload.properties
===================================================================
--- trunk/security/tools/etc/buildmagic/autoload.properties	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/autoload.properties	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,42 @@
+### ====================================================================== ###
+##                                                                          ##
+##  BuildMagic tasks which will be autoloaded.                              ##
+##                                                                          ##
+### ====================================================================== ###
+
+###  $Id: autoload.properties,v 1.8 2004/11/24 02:07:35 starksm Exp $ ###
+
+### Stuff that glues things together  ###
+
+resolveproperties=org.jboss.tools.buildmagic.task.ResolveProperties
+resolver=org.jboss.tools.buildmagic.task.ResolveProperties
+propertyfilter=org.jboss.tools.buildmagic.task.PropertyFilter
+require=org.jboss.tools.buildmagic.task.Require
+call=org.jboss.tools.buildmagic.task.CallTarget
+Ant=org.jboss.tools.buildmagic.task.Ant
+
+### Project/Module tasks ###
+
+execmodules=org.jboss.tools.buildmagic.task.module.ExecuteModules
+projectinfo=org.jboss.tools.buildmagic.task.module.ProjectInfo
+moduleinfo=org.jboss.tools.buildmagic.task.module.ModuleInfo
+moduleconfig=org.jboss.tools.buildmagic.task.module.ModuleConfig
+moduleinit=org.jboss.tools.buildmagic.task.module.ModuleInit
+
+### Configuration Helpers ###
+library=org.jboss.tools.buildmagic.task.config.Library
+modulelibrary=org.jboss.tools.buildmagic.task.config.ModuleLibrary
+libraryset=org.jboss.tools.buildmagic.task.config.LibrarySet
+
+### Misc ###
+
+projecthelp=org.jboss.tools.buildmagic.task.ProjectHelp
+_puke=org.jboss.tools.buildmagic.task.util.Puke
+_dump=org.jboss.tools.buildmagic.task.util.Dump
+
+### Unused ??? ###
+
+#set=org.jboss.tools.buildmagic.task.Set
+#unset=org.jboss.tools.buildmagic.task.Unset
+#appendpath=org.jboss.tools.buildmagic.task.AppendPath
+#findroot=org.jboss.tools.buildmagic.task.FindRoot

Added: trunk/security/tools/etc/buildmagic/build-common.xml
===================================================================
--- trunk/security/tools/etc/buildmagic/build-common.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/build-common.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,905 @@
+<project name="common tasks">
+
+  <!-- Make sure we have the right version of Ant -->
+  <property name="buildmagic.ant16.baseversion" value="1.6"/>
+
+  <!--
+     | Add new conditions for other supported Ant versions when they
+     | become avaialble.
+   -->
+
+  <condition property="buildmagic.ant.compatible">
+    <or>
+      <contains string="${ant.version}" 
+	        substring="Ant version ${buildmagic.ant16.baseversion}"/>
+    </or>
+  </condition>
+
+  <fail unless="buildmagic.ant.compatible">
+  Unsupported Ant version:
+    ${ant.version}
+  Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}.
+  </fail>
+
+  <!-- JDK Detection -->
+  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
+  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
+  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+
+  <fail unless="HAVE_JDK_1.4">
+  Unsupported Java version: You need at least JDK1.4 to build JBoss5
+  </fail>
+
+  <!-- Define the environment varaible. This needs to be first. -->
+  <property environment="env"/>
+
+  <!-- Setup the project environment. -->
+  <dirname property="project.root" file="${basedir}"/>
+  <property name="project.build" value="${project.root}/build"/>
+  <property name="project.tools" value="${project.root}/tools"/>
+  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
+
+  <!-- Setup the module environment. -->
+  <property name="module.root" value="${basedir}"/>
+  <property file="${module.root}/local.properties"/>
+  <property name="module.source" value="${module.root}/src"/>
+  <property name="module.output" value="${module.root}/output"/>
+  <property name="module.tools" value="${module.root}/tools"/>
+  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
+
+  <!-- Load Buildmagic extention tasks. -->
+  <property name="buildmagic.local.classpath" value="."/>
+  <path id="buildmagic.task.classpath">
+    <fileset dir="${project.tools}/lib">
+      <include name="*"/>
+    </fileset>
+    <pathelement location="${project.tools}/lib"/>
+    <pathelement location="${project.tools}/etc"/>
+    <pathelement location="${project.tools}"/>
+    <pathelement path="${buildmagic.local.classpath}"/>
+  </path>
+
+  <!-- Include user and project property overrides. -->
+  <import file="version-info.xml" />
+  <property file="${project.build}/local.properties"/>
+
+    <available file="${module.root}/etc/local.properties-example"
+	       property="init.have-local-properties"/>
+
+  <!-- Load common properties -->
+  <property file="${project.tools}/etc/buildmagic/common.properties"/>
+
+  <!-- Load common task properties -->
+  <property file="${project.tools}/etc/buildmagic/task.properties"/>
+
+  <!-- Marker to disable build -->
+  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
+
+  <!-- Marker to disable mbeans -->
+  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
+
+
+<!-- Initialize the build.log -->
+<target name="_buildmagic:init:buildlog">
+  <property name="buildlog.level" value="info"/>
+  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
+  <property name="init-buildlog.disable" value="true" system="true"/>
+</target>
+
+<!-- Show the running environment if -Dinit.verbose=true -->
+<target name="_buildmagic:init:show-environment">
+  <echo><![CDATA[
+project.root:    ${project.root}
+module.root:     ${module.root}
+user.home:       ${user.home}
+build.compiler:  ${build.compiler}
+java.home:       ${java.home}
+java.class.path: ${java.class.path}
+java.version:    ${java.version}
+java.vendor:     ${java.vendor}
+java.vm.version: ${java.vm.version}
+java.vm.name:    ${java.vm.name}
+java.vm.info:    ${java.vm.info}
+os.name:         ${os.name}
+os.arch:         ${os.arch}
+os.version:      ${os.version}
+]]></echo>
+</target>
+
+<!-- ================================================================== -->
+<!-- Build Bypass                                                       -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:build-bypass-checker" unless="build-bypass.disabled">
+
+   <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
+      <srcfiles dir="${module.source}" includes="**/*"/>
+      <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
+      <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
+      <srcfiles dir="${project.thirdparty}" includes="**/*"/>
+      <srcfiles dir="${project.tools}" includes="**/*"/>
+   </uptodate>
+
+</target>
+
+<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
+   <echo>
+Build disabled because module is already built. To force the module
+to build define build-bypass.disabled=true.
+   </echo>
+</target>
+
+<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
+
+
+<!-- ================================================================== -->
+<!-- Cleaning                                                           -->
+<!-- ================================================================== -->
+
+<!-- Clean up all build output -->
+<target name="_buildmagic:clean">
+   <available file="${module.output}" property="module.output.present"/>  
+   <antcall target="_buildmagic:clean-internal"/>
+</target>
+
+<!-- Actuall cleanup, fails if ${module.output} is missing -->
+<target name="_buildmagic:clean-internal" if="module.output.present">
+   <delete includeEmptyDirs="true">
+      <fileset dir="${module.output}">
+         <exclude name="eclipse-classes/**"/>
+      </fileset>
+    </delete>
+</target>
+
+<!-- Clean up all generated files -->
+<target name="_buildmagic:clobber">
+  <delete file="${module.root}/local.properties"/>
+  <delete dir="${module.output}"/>
+
+  <!-- Try to stop the build log before we delete the file. -->
+  <record name="${module.root}/build.log" action="stop"/>
+
+  <!-- 
+     | This file may be opened still due and fail to be removed on win32
+     | systems, so lets just ignore those errors for now.
+   -->
+  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Help                                                               -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:help:standard">
+  <projecthelp taskname="help">
+    <header><![CDATA[
+  The ${module.Name} module.
+]]></header>
+      <footer><![CDATA[
+    -projecthelp for all targets
+    -help for full options
+]]></footer>
+  </projecthelp>
+</target>
+
+<target name="_buildmagic:help:build">
+  <projecthelp taskname="help">
+      <header><![CDATA[
+  The ${module.Name} module.
+]]></header>
+      <footer><![CDATA[
+    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
+    -Dmodules=<module>[(,<module>)*]   Specify the modules.
+                                       (overrides groups).
+    -projecthelp for all targets
+    -help for full options
+]]></footer>
+  </projecthelp>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Release                                                            -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:release:zip">
+  <zip zipfile="${module.output}/${release.id}.zip">
+    <fileset dir="${module.output}">
+      <include name="${release.id}/**"/>
+    </fileset>
+  </zip>
+</target>
+
+<target name="_buildmagic:release:tar">
+  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
+       basedir="${module.output}"
+       includes="${release.id}/**">
+  </tar>
+</target>
+
+<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
+  <gzip src="${module.output}/${release.id}.tar"
+	zipfile="${module.output}/${release.id}.tgz"/>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Install                                                            -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:install:default">
+  <!-- Copy the output directory to the install directory -->
+  <mkdir dir="${install.root}"/>
+  <copy todir="${install.root}" filtering="no">
+    <fileset dir="${module.output}">
+       <include name="**/*"/>
+       <exclude name="${install.id}/**"/>
+    </fileset>
+  </copy>
+</target>
+
+<!-- ================================================================== -->
+<!-- Initialization                                                     -->
+<!-- ================================================================== -->
+
+<!-- ================================================================== -->
+<!-- Tasks                                                              -->
+<!-- ================================================================== -->
+
+<target name="_default:task-init">
+
+    <!-- Where source files live -->
+    <property name="source.java" value="${module.source}/main"/>
+    <property name="source.etc" value="${module.source}/etc"/>
+    <property name="source.bin" value="${module.source}/bin"/>
+    <property name="source.docs" value="${module.source}/docs"/>
+    <property name="source.resources" value="${module.source}/resources"/>
+    <property name="source.examples" value="${module.source}/examples"/>
+
+    <!-- Where build generated files will go -->
+    <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.bin" value="${module.output}/bin"/>
+    <property name="build.docs" value="${module.output}/docs"/>
+    <property name="build.parsers" value="${module.output}/gen-parsers"/>
+    <property name="build.resources" value="${module.output}/resources"/>
+    <property name="build.examples" value="${module.output}/examples"/>
+    <property name="build.reports" value="${module.output}/reports"/>
+    <property name="build.gen" value="${module.output}/gen"/>
+    <property name="build.gen-src" value="${module.output}/gen-src"/>
+    <property name="build.todo" value="${module.output}/todo"/>
+
+    <!-- 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}"/>
+
+    <!-- The combined thirdparty classpath -->
+    <path id="thirdparty.classpath">
+      <path refid="library.classpath"/>
+      <path refid="dependentmodule.classpath"/>
+    </path>
+
+    <!-- This module is based on Java 1.4 -->
+    <property name="javac.target" value="1.4"/>
+    <property name="javac.source" value="1.4"/>
+
+    <!-- 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>
+
+    <!-- The classpath required to build javadocs. -->
+    <path id="javadoc.classpath">
+      <path refid="javac.classpath"/>
+    </path>
+
+    <!-- The default prefix -->
+    <property name="jar.prefix" value="jboss-${module.name}"/>
+
+    <!-- The default server and client jar name -->
+    <property name="jar.server.name" value="${jar.prefix}.jar"/>
+    <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
+
+    <!-- Packages to include when generating api documentation -->
+    <property name="javadoc.packages" value="org.jboss.*"/>
+</target>
+
+<!-- ================================================================== -->
+<!-- Compile                                                            -->
+<!-- ================================================================== -->
+
+<!-- Compile all class files -->
+<target name="_default:compile-classes" unless="compile.disable">
+  <mkdir dir="${build.classes}"/>
+
+  <!-- Hack, required to avoid duplicate javac targets -->
+  <mkdir dir="${build.gen-src}"/>
+
+  <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}:${build.gen-src}"/>
+     <classpath refid="javac.classpath"/>
+     <include name="${javac.includes}"/>
+     <exclude name="${javac.excludes}"/>
+  </javac>
+</target>
+
+<!--
+   | Compile mbeans
+ -->
+
+<target name="_buildmagic:mbean-bypass-checker" unless="mbean-bypass.disabled">
+
+   <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
+      <srcfiles dir="${module.source}" includes="${mbean.includes}"/>
+   </uptodate>
+
+</target>
+<target name="_default:compile-mbean-sources"
+        depends="_buildmagic:mbean-bypass-checker" 
+        unless="mbean-bypass.on">
+
+    <taskdef name="jmxdoclet"
+             classname="xdoclet.modules.jmx.JMXDocletTask"
+             classpathref="xdoclet.task.classpath"/>
+
+    <mkdir dir="${build.gen-src}"/>
+    
+    <jmxdoclet destdir="${build.gen-src}"
+               excludedtags="@version, at author">
+      <fileset dir="${source.java}" 
+               includes="${mbean.includes}"/>
+      <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
+    </jmxdoclet>
+    
+    <touch file="${mbean-bypass.marker}"/>
+</target>
+
+<!-- Compile all module test class files -->
+<target name="_default:compile-test-classes" unless="compile.disable">
+
+  <mkdir dir="${build.test}"/>
+
+  <!-- Hack, required to avoid duplicate javac targets -->
+  <mkdir dir="${build.gen.test}"/>
+
+  <javac destdir="${build.test}"
+         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.test}:${build.gen.test}"/>
+     <classpath>
+       <path refid="javac.classpath"/>
+       <pathelement location="${build.classes}"/>
+     </classpath>
+     <include name="${javac.includes}"/>
+     <exclude name="${javac.excludes}"/>
+  </javac>
+</target>
+
+<!-- Compile manifests -->
+<target name="_default:compile-etc" unless="compile.disable">
+  <mkdir dir="${build.etc}"/>
+  <copy todir="${build.etc}" filtering="yes">
+    <fileset dir="${source.etc}">
+       <include name="**"/>
+    </fileset>
+  </copy>
+</target>
+
+<!-- Compile resource files -->
+<target name="_default:compile-resources" unless="compile.disable">
+  <mkdir dir="${build.resources}"/>
+  <copy todir="${build.resources}" filtering="yes">
+    <fileset dir="${source.resources}">
+      <patternset refid="compile-resources.filter.pattern"/>
+    </fileset>
+  </copy>
+  <copy todir="${build.resources}" filtering="no">
+    <fileset dir="${source.resources}">
+      <patternset refid="compile-resources.pattern"/>
+    </fileset>
+  </copy>
+</target>
+
+<patternset id="compile-resources.filter.pattern">
+  <include name="**/*"/>
+</patternset>
+
+<patternset id="compile-resources.pattern">
+  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
+</patternset>
+
+<!-- Compile stylesheets files -->
+<target name="_default:compile-stylesheets" unless="compile.disable">
+  <mkdir dir="${build.stylesheets}"/>
+  <copy todir="${build.stylesheets}" filtering="yes">
+    <fileset dir="${source.stylesheets}">
+       <include name="**/*"/>
+    </fileset>
+  </copy>
+</target>
+
+<!-- Compile bin scripts -->
+<target name="_default:compile-bin" unless="compile.disable">
+  <mkdir dir="${build.bin}"/>
+  <copy todir="${build.bin}" filtering="yes">
+    <fileset dir="${source.bin}">
+       <include name="**/*"/>
+    </fileset>
+  </copy>
+
+</target>
+
+<target name="_default:fix-bin">
+  <fixcrlf srcdir="${build.bin}"
+        eol="lf" eof="remove"
+        includes="**/*.sh, **/*.conf"/>
+
+  <fixcrlf srcdir="${build.bin}" 
+        eol="crlf" eof="remove"
+        includes="**/*.bat, **/*.cmd"/>
+
+  <chmod perm="+x">
+    <fileset dir="${build.bin}">
+       <include name="**/*.sh"/>
+    </fileset>
+  </chmod>
+</target>
+
+<target name="_default:compile-web" unless="compile.disable">
+  <mkdir dir="${build.web}"/>
+  <copy todir="${build.web}" filtering="yes">
+    <fileset dir="${source.web}">
+      <patternset refid="compile-web.filter.pattern"/>
+    </fileset>
+  </copy>
+  <copy todir="${build.web}" filtering="no">
+    <fileset dir="${source.web}">
+      <patternset refid="compile-web.pattern"/>
+    </fileset>
+  </copy>
+</target>
+
+<patternset id="compile-web.pattern">
+  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
+</patternset>
+
+<patternset id="compile-web.filter.pattern">
+  <include name="**/*"/>
+</patternset>
+
+<target name="_default:compile-checksums" unless="compile.disable">
+  <checksum>
+    <fileset dir="${build.lib}">
+      <include name="*.jar"/>
+      <include name="*.zip"/>
+    </fileset>
+  </checksum>
+</target>
+
+<!-- Compile RMI stubs -->
+<target name="_default:compile-rmi" unless="compile.disable">
+  <rmic base="${build.classes}"
+        verify="${rmic.verify}"
+   iiop="${rmic.iiop}"
+   iiopopts="${rmic.iiopops}"
+   idl="${rmic.idl}"
+   idlopts="${rmic.idlops}"
+   debug="${rmic.debug}"
+        stubVersion="${rmic.stubVersion}">
+    <classpath refid="javac.classpath"/>
+    <patternset refid="compile-rmi.pattern"/>
+  </rmic>
+</target>
+
+<patternset id="compile-rmi.pattern">
+  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
+</patternset>
+
+<!-- ================================================================== -->
+<!-- Jars                                                               -->
+<!-- ================================================================== -->
+
+<target name="_default:server-client-jars">
+
+    <!-- Build the server jar -->
+    <jar jarfile="${build.lib}/${jar.server.name}"
+         manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}"
+               includes="${jar.server.includes}"/>
+    </jar>
+
+    <!-- Build jbossmq-client.jar -->
+    <jar jarfile="${build.lib}/${jar.client.name}"
+         manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}"
+               includes="${jar.client.includes}"/>
+    </jar>
+
+</target>
+
+<!-- ================================================================== -->
+<!-- Documents                                                          -->
+<!-- ================================================================== -->
+
+<target name="docs" description="Builds all documentation."
+   depends="docs-api, docs-todo"/>
+
+<!-- ======== -->
+<!-- JavaDocs -->
+<!-- ======== -->
+
+
+<target name="docs-javadocs-check">
+
+  <!-- if index.html is newer than the sources we are up to date -->
+  <uptodate property="docs-javadocs.disable"
+         targetfile="${build.api}/index.html">
+    <srcfiles dir="${source.java}" includes="**/*.java"/>
+  </uptodate>
+</target>
+  <!-- Generate Javadoc if we are out of date -->
+<target name="docs-javadocs" 
+     depends="docs-javadocs-check" 
+     unless="docs-javadocs.disable">
+
+  <mkdir dir="${build.api}"/>
+  <mkdir dir="${module.output}/gen-src"/>
+  <javadoc packagenames="${javadoc.packages}"
+             sourcepath="${source.java}:${module.output}/gen-src"
+             destdir="${build.api}"
+             classpathref="javadoc.classpath"
+             windowtitle="${javadoc.windowtitle}"
+        splitindex="${javadoc.splitindex}"
+             author="${javadoc.author}"
+             version="${javadoc.version}"
+             public="${javadoc.public}"
+             package="${javadoc.package}"
+             protected="${javadoc.protected}"
+             private="${javadoc.private}"
+             use="${javadoc.use}"
+        verbose="${javadoc.verbose}"> 
+    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
+    <bottom><![CDATA[
+      <i>
+      <div align="center">
+        <font size="-1">Copyright &#169; 2002 JBoss Group, LLC. All Rights Reserved.</font>
+      </div>
+      </i>
+    ]]></bottom>
+    
+    <!--
+    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
+      -->
+      
+    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
+    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
+    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
+    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false" />
+    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false" />
+    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false" />
+    <tag name="ejb.pk" description="ejb" enabled="false" />
+    <tag name="ejb.bean" description="ejb" enabled="false" />
+    <tag name="ejb.transaction" description="ejb" enabled="false" />
+    <tag name="ejb.finder" description="ejb" enabled="false" />
+    <tag name="ejb.relation" description="ejb" enabled="false" />
+    <tag name="ejb.create-method" description="ejb" enabled="false" />
+    
+    <tag name="jboss.query" description="jboss" enabled="false" />
+    <tag name="jboss.lazy-load-group" description="jboss" enabled="false" />
+    <tag name="jboss.load-group" description="jboss" enabled="false" />
+    <tag name="jboss.persistence" description="jboss" enabled="false" />
+    <tag name="jboss.entity-command" description="jboss" enabled="false" />
+    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
+    <tag name="jboss.relation" description="jboss" enabled="false" />
+    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
+    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false" />
+    <tag name="jboss.relation-table" description="jboss" enabled="false" />
+    <tag name="jboss.table-attribute" description="jboss" enabled="false" />
+    
+    <tag name="jmx.managed-attribute" description="jmx" enabled="false" />
+    <tag name="jmx.managed-constructor" description="jmx" enabled="false" />
+    <tag name="jboss.method-attributes" description="jboss" enabled="false" />
+    
+  </javadoc>
+</target>
+
+
+<target name="docs-api" depends="docs-javadocs"/>
+
+<target name="javadocs" depends="docs-javadocs"/>
+
+<!-- ========= -->
+<!-- TODO Docs -->
+<!-- ========= -->
+<target name="xdoclet-task-classpath-check" unless="xdoclet.task.classpath">
+    <path id="xdoclet.task.classpath">
+      <path refid="xdoclet.base.classpath"/>
+      <path refid="apache.commons.classpath"/>
+      <path refid="javac.classpath" />
+    </path>
+    <property name="xdoclet.task.classpath" 
+	      refid="xdoclet.task.classpath"/>
+</target>
+
+<target name="docs-todo-check">
+      <!-- if index.html is newer than the sources we are up to date -->
+      <uptodate property="docs-todo.disable"
+         targetfile="${build.todo}/index.html">
+         <srcfiles dir="${source.java}" includes="**/*.java"/>
+      </uptodate>
+  </target>
+
+  <!-- Generate TODO list from @todo tags -->
+  <target name="docs-todo" 
+     depends="docs-todo-check" 
+     unless="docs-todo.disable">
+
+  <taskdef name="todo"
+               classname="xdoclet.modules.doc.DocumentDocletTask"
+               classpath="${xdoclet.task.classpath}"/>
+  <mkdir dir="${build.todo}"/>
+  <todo destdir="${build.todo}">
+    <fileset dir="${source.java}">
+      <include name="**/*.java"/>
+    </fileset>
+
+    <info/>
+  </todo>
+</target>
+
+<target name="todo" depends="docs-todo"/>
+
+<!-- ============== -->
+<!-- JMX MBean Docs -->
+<!-- ============== -->
+
+  <target name="jmx-docs">
+    <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
+
+    <mkdir dir="${build.jmx-doc}"/>
+    <jmxdoclet
+        destdir="${build.jmx-doc}"
+             force="false"
+        excludedtags="@version, at author">
+      <fileset dir="${source.java}">
+        <include name="**/*.java"/>
+      </fileset>
+      <jbossXmlDoc/>
+    </jmxdoclet>
+
+  </target>
+
+  <!-- Generate the plain HTML jmx docs -->
+  <target name="jmx-docs-html-plain" depends="jmx-docs">
+
+
+    <!-- Force the use of SAXON XSLT -->
+    <property system="true" 
+         name="javax.xml.transform.TransformerFactory"
+         value="com.icl.saxon.TransformerFactoryImpl"/>
+
+    <mkdir dir="${build.jmx-api}"/>
+    <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
+      processor="trax"
+      extension=".html"
+      basedir="${build.jmx-doc}"
+      destdir="${build.jmx-api}">
+       <include name="**/*.xml"/>
+       <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
+       <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
+    </style>
+
+  </target>
+
+
+<!-- ================================================================== -->
+<!-- Cleaning                                                           -->
+<!-- ================================================================== -->
+
+<!-- Clean up all build output -->
+<target name="_default:clean" 
+     depends="_buildmagic:clean">
+</target>
+
+<!-- Clean up all generated files -->
+<target name="_default:clobber" 
+     depends="_buildmagic:clobber, clean">
+</target>
+
+<!-- ================================================================== -->
+<!-- Install & Release                                                  -->
+<!-- ================================================================== -->
+
+  <!-- ================================================================== -->
+  <!-- Project (build module) Targets                                     -->
+  <!-- ================================================================== -->
+
+<target name="configure-project" unless="configure-project.disable">
+
+    <!-- Skip any missing modules and issue a warning -->
+    <property name="executemodules.skipmissing" value="true"/>
+
+    <!-- The header and footer displayed during each module execution -->
+    <property name="executemodules.header"><![CDATA[
+ ============================================================== 
+ ==
+ ==  Executing '@TARGET@' in module '@MODULE@'...
+ ==
+ ==]]></property>
+
+    <property name="executemodules.footer"><![CDATA[
+ ==
+ ==
+ ==  Finished '@TARGET@' in module '@MODULE@'.
+ ==
+ ==============================================================
+    ]]></property>
+
+    <property name="executemodules.exportproperties">
+       version.major,
+       version.minor,
+       version.revision,
+       version.tag, 
+       version.name, 
+       version.cvstag,
+
+       specification.title,
+       specification.version,
+       specification.vendor,
+
+       implementation.title,
+       implementation.version,
+       implementation.vendor,
+       implementation.vendor.id,
+       implementation.url
+    </property>
+
+    <!-- Show the module configuration -->
+    <echo>groups:  ${groups}</echo>
+    <echo>modules: ${modules}</echo>
+
+    <property name="configure-project.disable" value="true" system="true"/>
+
+</target>
+
+<!-- ================================================================== -->
+<!-- Module Pass-through Targets                                        -->
+<!-- ================================================================== -->
+
+<!-- Invoke the 'all' on all configured modules -->
+<target name="_buildmagic:modules:all">
+  <execmodules target="all" 
+       modules="${modules}" 
+       root="${project.root}/@MODULE@"
+       skipmissing="${executemodules.skipmissing}"
+                 exportproperties="${executemodules.exportproperties}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'most' on all configured modules -->
+<target name="_buildmagic:modules:most">
+  <execmodules target="most" 
+          modules="${modules}" 
+          root="${project.root}/@MODULE@"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'main' on all configured modules -->
+<target name="_buildmagic:modules:main">
+  <execmodules target="main" 
+          modules="${modules}" 
+          root="${project.root}/@MODULE@"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'release' on all configured modules -->
+<target name="_buildmagic:modules:release">
+  <execmodules target="release" 
+          modules="${modules}" 
+          root="${project.root}/@MODULE@"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'tests' on all configured modules -->
+<target name="_buildmagic:modules:tests">
+  <execmodules target="tests" 
+          modules="${modules}" 
+          root="${project.root}/@MODULE@"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'clean' on all configured modules -->
+<target name="_buildmagic:modules:clean">
+  <execmodules target="clean" 
+          modules="${modules}" 
+          root="${project.root}/@MODULE@"
+          skipmissing="${executemodules.skipmissing}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'clobber' on all configured modules -->
+<target name="_buildmagic:modules:clobber">
+  <execmodules target="clobber" 
+       modules="${modules}" 
+       root="${project.root}/@MODULE@"
+       skipmissing="${executemodules.skipmissing}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+</project>
+

Added: trunk/security/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- trunk/security/tools/etc/buildmagic/buildmagic.ent	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/buildmagic.ent	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,1134 @@
+<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
+
+<!-- ================================================================== -->
+<!-- Initialization                                                     -->
+<!-- ================================================================== -->
+
+<!-- Initialize the build system. -->
+<target name="_buildmagic:init" unless="init.disable">
+
+  <!-- Make sure we have the right version of Ant -->
+  <property name="buildmagic.ant15.baseversion" value="1.5"/>
+  <property name="buildmagic.ant16.baseversion" value="1.6"/>
+
+  <!--
+     | Add new conditions for other supported Ant versions when they
+     | become avaialble.
+   -->
+
+  <condition property="buildmagic.ant.compatible">
+    <or>
+      <contains string="${ant.version}"
+        substring="Ant version ${buildmagic.ant15.baseversion}"/>
+      <contains string="${ant.version}"
+        substring="Ant version ${buildmagic.ant16.baseversion}"/>
+    </or>
+  </condition>
+
+  <fail unless="buildmagic.ant.compatible">
+
+  Unsupported Ant version:
+
+    ${ant.version}
+
+  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
+
+  </fail>
+
+  <!-- JDK Detection -->
+  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
+  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+  <fail unless="HAVE_JDK_1.4">
+  Unsupported Java version: You need at least JDK1.4 to build JBoss5
+  </fail>
+
+  <!-- Setup the project environment. -->
+  <dirname property="project.root" file="${basedir}/build.xml"/>
+  <property name="project.build" value="${basedir}/build"/>
+  <property name="project.tools" value="${basedir}/tools"/>
+  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
+
+  <!-- Setup the module environment. -->
+  <property name="module.root" value="${basedir}"/>
+  <property file="${module.root}/local.properties"/>
+  <property name="module.source" value="${module.root}/src"/>
+  <property name="module.output" value="${module.root}/output"/>
+  <property name="module.tools" value="${module.root}/tools"/>
+  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
+
+  <!-- Load Buildmagic extention tasks. -->
+  <property name="buildmagic.local.classpath" value="."/>
+  <path id="buildmagic.task.classpath">
+    <fileset dir="${project.tools}/lib">
+      <include name="*.jar"/>
+    </fileset>
+    <pathelement location="${project.tools}/lib"/>
+    <pathelement location="${project.tools}/etc"/>
+    <pathelement location="${project.tools}"/>
+    <pathelement path="${buildmagic.local.classpath}"/>
+  </path>
+  <echo message="${project.tools}"/>
+  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
+    classpathref="buildmagic.task.classpath"/>
+  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
+    classpathref="buildmagic.task.classpath"/>
+
+  
+
+  <!-- Include user and project property overrides. -->
+  <property file="${project.build}/local.properties"/>
+  <property file="${user.home}/.buildmagic.properties"/>
+  <property file="${user.home}/.ant.properties"/>
+
+  <call target="_buildmagic:init:local-properties">
+    <available file="${module.root}/etc/local.properties-example"
+      property="init.have-local-properties"/>
+  </call>
+
+  <!-- Setup the build.log -->
+  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
+
+  <!-- Load common properties -->
+  <property file="${project.tools}/etc/buildmagic/common.properties"/>
+
+  <!-- Setup the build timestamp & build identifer properties -->
+  <tstamp>
+    <format property="build.number" pattern="yyyyMMddHHmm"/>
+    <format property="YEAR" pattern="yyyy"/>
+  </tstamp>
+  <property name="build.id" value="${build.number}"/>
+
+  <!-- Version identifiers for the server. -->
+  <property name="version.major" value="5"/>
+  <property name="version.minor" value="0"/>
+  <property name="version.revision" value="0"/>
+  <property name="version.tag" value="Alpha"/>
+  <property name="version.name" value="Morpheus"/>
+  <!-- This must be set to the CVS tag for any release -->
+  <property name="version.cvstag" value="HEAD"/>
+
+  <!-- Manifest version info -->
+  <property name="specification.title" value="JBoss"/>
+  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
+  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
+
+  <property name="implementation.title" value="JBoss [${version.name}]"/>
+  <property name="implementation.url" value="http://www.jboss.org/"/>
+  <property name="implementation.version"
+    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
+  <property name="implementation.vendor" value="JBoss.org"/>
+  <property name="implementation.vendor.id" value="${implementation.url}"/>
+
+  <!-- Invoke the configure task -->
+  <call target="configure" unless="configure.disable"/>
+
+  <!-- Load common task properties -->
+  <property file="${project.tools}/etc/buildmagic/task.properties"/>
+
+  <!-- Marker to disable build -->
+  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
+
+  <!-- Marker to disable mbeans -->
+  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
+
+  <!-- Install filters -->
+  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
+
+  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
+
+  <!-- Finish up -->
+  <property name="init.disable" value="true"/>
+</target>
+
+<!-- Install the local.properties example if it is there -->
+<target name="_buildmagic:init:local-properties">
+  <!-- Setup the local.properties file as needed -->
+  <copy file="${module.root}/etc/local.properties-example"
+    tofile="${module.root}/local.properties" filtering="yes"/>
+  <property file="${module.root}/local.properties"/>
+</target>
+
+<!-- Initialize the build.log -->
+<target name="_buildmagic:init:buildlog">
+  <property name="buildlog.level" value="info"/>
+  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
+  <property name="init-buildlog.disable" value="true" system="true"/>
+</target>
+
+<!-- Show the running environment if -Dinit.verbose=true -->
+<target name="_buildmagic:init:show-environment">
+  <echo><![CDATA[
+project.root:    ${project.root}
+module.root:     ${module.root}
+user.home:       ${user.home}
+build.compiler:  ${build.compiler}
+java.home:       ${java.home}
+java.class.path: ${java.class.path}
+java.version:    ${java.version}
+java.vendor:     ${java.vendor}
+java.vm.version: ${java.vm.version}
+java.vm.name:    ${java.vm.name}
+java.vm.info:    ${java.vm.info}
+os.name:         ${os.name}
+os.arch:         ${os.arch}
+os.version:      ${os.version}
+    ]]></echo>
+</target>
+
+<!-- ================================================================== -->
+<!-- Build Bypass                                                       -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
+
+  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
+    <srcfiles dir="${module.source}" includes="**/*"/>
+    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
+    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
+    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
+    <srcfiles dir="${project.tools}" includes="**/*"/>
+  </uptodate>
+
+</target>
+
+<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
+  <echo>
+Build disabled because module is already built. To force the module
+to build define build-bypass.disabled=true.
+  </echo>
+</target>
+
+<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
+
+
+<!-- ================================================================== -->
+<!-- Cleaning                                                           -->
+<!-- ================================================================== -->
+
+<!-- Clean up all build output -->
+<target name="_buildmagic:clean" depends="init">
+   <call target="_buildmagic:clean-internal">
+      <available file="${module.output}" property="module.output.present"/>   
+   </call>   
+</target>
+
+<!-- Actuall cleanup, fails if ${module.output} is missing -->
+<target name="_buildmagic:clean-internal">
+   <delete includeEmptyDirs="true">
+      <fileset dir="${module.output}">
+         <exclude name="eclipse-classes*/**"/>
+      </fileset>
+   </delete>
+</target>
+
+<!-- Clean up all generated files -->
+<target name="_buildmagic:clobber" depends="init">
+  <delete file="${module.root}/local.properties"/>
+  <delete dir="${module.output}"/>
+
+  <!-- Try to stop the build log before we delete the file. -->
+  <record name="${module.root}/build.log" action="stop"/>
+
+  <!--
+     | This file may be opened still due and fail to be removed on win32
+     | systems, so lets just ignore those errors for now.
+   -->
+  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Help                                                               -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:help:standard" depends="init">
+  <projecthelp taskname="help">
+    <header><![CDATA[
+  The ${module.Name} module.
+      ]]></header>
+    <footer><![CDATA[
+    -projecthelp for all targets
+    -help for full options
+      ]]></footer>
+  </projecthelp>
+</target>
+
+<target name="_buildmagic:help:build" depends="init">
+  <projecthelp taskname="help">
+    <header><![CDATA[
+  The ${module.Name} module.
+      ]]></header>
+    <footer><![CDATA[
+    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
+    -Dmodules=<module>[(,<module>)*]   Specify the modules.
+                                       (overrides groups).
+    -projecthelp for all targets
+    -help for full options
+      ]]></footer>
+  </projecthelp>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Release                                                            -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:release:zip" depends="init">
+  <zip zipfile="${module.output}/${release.id}.zip">
+    <fileset dir="${module.output}">
+      <include name="${release.id}/**"/>
+    </fileset>
+  </zip>
+</target>
+
+<target name="_buildmagic:release:tar" depends="init">
+  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
+    basedir="${module.output}"
+    includes="${release.id}/**">
+  </tar>
+</target>
+
+<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
+  <gzip src="${module.output}/${release.id}.tar"
+    zipfile="${module.output}/${release.id}.tgz"/>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Install                                                            -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:install:default" depends="init">
+  <!-- Copy the output directory to the install directory -->
+  <mkdir dir="${install.root}"/>
+  <copy todir="${install.root}" filtering="no">
+    <fileset dir="${module.output}">
+      <include name="**/*"/>
+      <exclude name="build-marker"/>
+      <exclude name="classes/**"/>
+      <exclude name="eclipse-classes*/**"/>
+      <exclude name="etc/**"/>
+      <exclude name="gen-src/**"/>
+      <exclude name="mbean-marker"/>
+      <exclude name="resources/**"/>
+      <exclude name="${install.id}/**"/>
+      <exclude name="${install.id}.zip"/>
+      <exclude name="${install.id}.tar"/>
+      <exclude name="${install.id}.tgz"/>
+    </fileset>
+  </copy>
+</target>
+
+<!-- ================================================================== -->
+<!-- Initialization                                                     -->
+<!-- ================================================================== -->
+
+<!--
+   | Initialize the build system.  Must depend on '_buildmagic:init'.
+   | Other targets should depend on 'init' or things will mysteriously fail.
+ -->
+
+<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Tasks                                                              -->
+<!-- ================================================================== -->
+
+<target name="_default:task-init">
+
+  <!-- Where source files live -->
+  <property name="source.java" value="${module.source}/main"/>
+  <property name="source.etc" value="${module.source}/etc"/>
+  <property name="source.bin" value="${module.source}/bin"/>
+  <property name="source.docs" value="${module.source}/docs"/>
+  <property name="source.resources" value="${module.source}/resources"/>
+  <property name="source.examples" value="${module.source}/examples"/>
+
+  <!-- Where build generated files will go -->
+  <property name="build.classes" value="${module.output}/classes"/>
+  <property name="build.classes.retro.src" value="${build.classes}"/>
+  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
+  <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.bin" value="${module.output}/bin"/>
+  <property name="build.docs" value="${module.output}/docs"/>
+  <property name="build.parsers" value="${module.output}/gen-parsers"/>
+  <property name="build.resources" value="${module.output}/resources"/>
+  <property name="build.examples" value="${module.output}/examples"/>
+  <property name="build.reports" value="${module.output}/reports"/>
+  <property name="build.gen" value="${module.output}/gen"/>
+  <property name="build.gen-src" value="${module.output}/gen-src"/>
+  <property name="build.todo" value="${module.output}/todo"/>
+
+  <!-- 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}"/>
+
+  <!-- The combined thirdparty classpath -->
+  <path id="thirdparty.classpath">
+    <path refid="library.classpath"/>
+    <path refid="dependentmodule.classpath"/>
+  </path>
+
+  <!-- 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"/>
+  
+  <!-- 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>
+  <!-- The bootstrap classpath used to override jdk classes -->
+  <path id="javac.bootclasspath">
+    <!-- Optional module override boot classpath -->
+    <pathelement path="${local.bootclasspath}"/>
+    <!-- The sun jdk boot classpath property -->
+    <pathelement path="${sun.boot.classpath}"/>
+  </path>
+
+  <!-- The classpath required to build javadocs. -->
+  <path id="javadoc.classpath">
+    <path refid="javac.classpath"/>
+  </path>
+
+  <!-- The default prefix -->
+  <property name="jar.prefix" value="jboss-${module.name}"/>
+
+  <!-- The default server and client jar name -->
+  <property name="jar.server.name" value="${jar.prefix}.jar"/>
+  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
+
+  <!-- Packages to include when generating api documentation -->
+  <property name="javadoc.packages" value="org.jboss.*"/>
+</target>
+
+<!-- ================================================================== -->
+<!-- Compile                                                            -->
+<!-- ================================================================== -->
+
+<!-- Compile all class files -->
+<target name="_default:compile-classes" depends="init" unless="compile.disable">
+  <mkdir dir="${build.classes}"/>
+
+  <!-- Hack, required to avoid duplicate javac targets -->
+  <mkdir dir="${build.gen-src}"/>
+
+  <!-- Remove classes which depend on changed files, so they will rebuild. -->
+  <depend srcdir="${source.java}:${build.gen-src}"
+    destdir="${build.classes}"
+    dump="${javac.depend.dump}"
+    closure="${javac.depend.closure}">
+    <include name="${javac.includes}"/>
+    <exclude name="${javac.excludes}"/>
+  </depend>
+
+  <javac destdir="${build.classes}"
+    optimize="on"
+    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}"
+    includes="${javac.includes}"
+    excludes="${javac.excludes}"
+    failonerror="${javac.fail.onerror}">
+    <bootclasspath>
+      <path refid="javac.bootclasspath"/>
+    </bootclasspath>
+    <src path="${source.java}:${build.gen-src}"/>
+    <classpath refid="javac.classpath"/>
+  </javac>
+</target>
+
+<!--
+   | Compile mbeans
+ -->
+
+<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
+  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
+    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
+  </uptodate>
+
+</target>
+<target name="_default:compile-mbean-sources"
+  depends="_buildmagic:mbean-bypass-checker"
+  unless="mbean-bypass.on">
+
+  <taskdef name="jmxdoclet"
+    classname="xdoclet.modules.jmx.JMXDocletTask"
+    classpathref="xdoclet.task.classpath"/>
+
+  <mkdir dir="${build.gen-src}"/>
+
+  <jmxdoclet destdir="${build.gen-src}"
+    excludedtags="@version, at author">
+    <fileset dir="${source.java}"
+      includes="${mbean.includes}"/>
+    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
+  </jmxdoclet>
+
+  <touch file="${mbean-bypass.marker}"/>
+</target>
+<target name="_default:compile-xmbean-sources"
+  depends="_buildmagic:mbean-bypass-checker"
+  unless="mbean-bypass.on">
+
+  <taskdef name="jmxdoclet"
+    classname="xdoclet.modules.jmx.JMXDocletTask"
+    classpathref="xdoclet.task.classpath"/>
+
+  <mkdir dir="${build.gen-src}"/>
+
+  <jmxdoclet destdir="${build.gen-src}"
+    excludedtags="@version, at author">
+    <fileset dir="${source.java}"
+      includes="${mbean.includes}"/>
+    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
+    <jbossxmbean/>
+  </jmxdoclet>
+
+  <touch file="${mbean-bypass.marker}"/>
+</target>
+
+<!-- Compile all module test class files -->
+<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
+
+  <mkdir dir="${build.test}"/>
+
+  <!-- Hack, required to avoid duplicate javac targets -->
+  <mkdir dir="${build.gen.test}"/>
+
+  <!-- Remove classes which depend on changed files, so they will rebuild. -->
+  <depend srcdir="${source.test}:${build.gen.test}"
+    destdir="${build.test}"
+    dump="${javac.depend.dump}"
+    closure="${javac.depend.closure}">
+    <include name="${javac.includes}"/>
+    <exclude name="${javac.excludes}"/>
+  </depend>
+
+  <javac destdir="${build.test}"
+    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}"
+    includes="${javac.includes}"
+    excludes="${javac.excludes}"
+    failonerror="${javac.fail.onerror}">
+    <src path="${source.test}:${build.gen.test}"/>
+    <classpath>
+      <path refid="javac.classpath"/>
+      <pathelement location="${build.classes}"/>
+    </classpath>
+  </javac>
+</target>
+
+<!-- Compile manifests -->
+<target name="_default:compile-etc" depends="init" unless="compile.disable">
+  <mkdir dir="${build.etc}"/>
+  <copy todir="${build.etc}" filtering="yes">
+    <fileset dir="${source.etc}">
+      <include name="**"/>
+    </fileset>
+  </copy>
+</target>
+
+<!-- Compile resource files -->
+<target name="_default:compile-resources" depends="init" unless="compile.disable">
+  <mkdir dir="${build.resources}"/>
+  <copy todir="${build.resources}" filtering="yes">
+    <fileset dir="${source.resources}">
+      <patternset refid="compile-resources.filter.pattern"/>
+    </fileset>
+  </copy>
+  <copy todir="${build.resources}" filtering="no">
+    <fileset dir="${source.resources}">
+      <patternset refid="compile-resources.pattern"/>
+    </fileset>
+  </copy>
+</target>
+
+<patternset id="compile-resources.filter.pattern">
+  <include name="**/*"/>
+</patternset>
+
+<patternset id="compile-resources.pattern">
+  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
+</patternset>
+
+<!-- Compile stylesheets files -->
+<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
+  <mkdir dir="${build.stylesheets}"/>
+  <copy todir="${build.stylesheets}" filtering="yes">
+    <fileset dir="${source.stylesheets}">
+      <include name="**/*"/>
+    </fileset>
+  </copy>
+</target>
+
+<!-- Compile bin scripts -->
+<target name="_default:compile-bin" depends="init" unless="compile.disable">
+  <mkdir dir="${build.bin}"/>
+  <copy todir="${build.bin}" filtering="yes">
+    <fileset dir="${source.bin}">
+      <include name="**/*"/>
+    </fileset>
+  </copy>
+
+  <call target="_default:fix-bin"/>
+</target>
+
+<target name="_default:fix-bin" depends="init">
+  <fixcrlf srcdir="${build.bin}"
+    eol="lf" eof="remove"
+    includes="**/*.sh, **/*.conf"/>
+
+  <fixcrlf srcdir="${build.bin}"
+    eol="crlf" eof="remove"
+    includes="**/*.bat, **/*.cmd"/>
+
+  <chmod perm="+x">
+    <fileset dir="${build.bin}">
+      <include name="**/*.sh"/>
+    </fileset>
+  </chmod>
+</target>
+
+<target name="_default:compile-web" depends="init" unless="compile.disable">
+  <mkdir dir="${build.web}"/>
+  <copy todir="${build.web}" filtering="yes">
+    <fileset dir="${source.web}">
+      <patternset refid="compile-web.filter.pattern"/>
+    </fileset>
+  </copy>
+  <copy todir="${build.web}" filtering="no">
+    <fileset dir="${source.web}">
+      <patternset refid="compile-web.pattern"/>
+    </fileset>
+  </copy>
+</target>
+
+<patternset id="compile-web.pattern">
+  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
+</patternset>
+
+<patternset id="compile-web.filter.pattern">
+  <include name="**/*"/>
+</patternset>
+
+<target name="_default:compile-checksums" depends="init" unless="compile.disable">
+  <checksum>
+    <fileset dir="${build.lib}">
+      <include name="*.jar"/>
+      <include name="*.zip"/>
+    </fileset>
+  </checksum>
+</target>
+
+<!-- Compile RMI stubs -->
+<target name="_default:compile-rmi" depends="init" unless="compile.disable">
+  <rmic base="${build.classes}"
+    verify="${rmic.verify}"
+    iiop="${rmic.iiop}"
+    iiopopts="${rmic.iiopops}"
+    idl="${rmic.idl}"
+    idlopts="${rmic.idlops}"
+    debug="${rmic.debug}"
+    stubVersion="${rmic.stubVersion}">
+    <classpath refid="javac.classpath"/>
+    <patternset refid="compile-rmi.pattern"/>
+  </rmic>
+</target>
+
+<patternset id="compile-rmi.pattern">
+  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
+</patternset>
+
+<!-- ================================================================== -->
+<!-- Jars                                                               -->
+<!-- ================================================================== -->
+
+<target name="_default:server-client-jars">
+
+  <!-- Build the server jar -->
+  <jar jarfile="${build.lib}/${jar.server.name}"
+    manifest="${build.etc}/default.mf">
+    <fileset dir="${build.classes}"
+      includes="${jar.server.includes}"/>
+  </jar>
+
+  <!-- Build jbossmq-client.jar -->
+  <jar jarfile="${build.lib}/${jar.client.name}"
+    manifest="${build.etc}/default.mf">
+    <fileset dir="${build.classes}"
+      includes="${jar.client.includes}"/>
+  </jar>
+
+</target>
+
+
+<!-- ================================================================== -->
+<!-- JBossRetro                                                         -->
+<!-- ================================================================== -->
+
+<target name="_default:init-jbossretro" depends="init">
+  <path id="jbossretro.classpath">
+    <path refid="apache.ant.classpath"/>
+    <path refid="javassist.classpath"/>
+    <path refid="jboss.jbossretro.classpath"/>
+  </path>
+
+  <path id="jbossretrort.classpath">
+    <path refid="jboss/backport.concurrent.classpath"/>
+    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
+  </path>
+ 
+  <mkdir dir="${build.classes.retro}"/>
+
+</target>
+
+
+<target name="_default:jbossretro" depends="_default:init-jbossretro">
+
+  <!-- Weave the build.classes to build.classes14 -->
+  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
+
+  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
+    <classpath refid="jbossretrort.classpath"/>
+    <classpath>
+      <pathelement path="${build.classes.retro.src}"/>
+    </classpath>
+    <classpath refid="javac.classpath"/>
+    <src path="${build.classes.retro.src}"/>
+  </retro>
+</target>
+
+<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
+
+  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
+  <!-- The tests must be run with jdk1.4.x -->
+  <condition property="jdk14x">
+    <equals arg1="${ant.java.version}" arg2="1.4"/>
+  </condition>
+  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
+
+  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
+
+
+  <retrocheck compilerclasspathref="jbossretro.classpath">
+    <classpath refid="jbossretro.classpath"/>
+    <src path="${build.classes.retro}"/>
+    <classpath>
+      <pathelement path="${build.classes.retro}"/>
+      <path refid="jbossretrort.classpath"/>
+      <path refid="javac.classpath"/>
+    </classpath>
+  </retrocheck>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Documents                                                          -->
+<!-- ================================================================== -->
+
+<target name="docs" description="Builds all documentation."
+  depends="docs-api"/>
+
+<!-- ======== -->
+<!-- JavaDocs -->
+<!-- ======== -->
+
+<target name="docs-javadocs-check" depends="init">
+
+  <!-- if index.html is newer than the sources we are up to date -->
+  <uptodate property="docs-javadocs.disable"
+    targetfile="${build.api}/index.html">
+    <srcfiles dir="${source.java}"> 
+       <include name="**/*.java"/>
+       <include name="**/*.html"/>
+    </srcfiles>
+  </uptodate>
+</target>
+<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
+  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
+</target>
+<!-- Generate Javadoc if we are out of date -->
+<target name="docs-javadocs_1_4"
+  depends="docs-javadocs-check"
+  unless="docs-javadocs.disable">
+
+  <mkdir dir="${build.api}"/>
+  <mkdir dir="${module.output}/gen-src"/>
+  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
+    excludepackagenames="${javadoc.excludes}"
+    sourcepath="${source.java}:${module.output}/gen-src"
+    destdir="${build.api}"
+    classpathref="javac.classpath"
+    windowtitle="${javadoc.windowtitle}"
+    splitindex="${javadoc.splitindex}"
+    author="${javadoc.author}"
+    version="${javadoc.version}"
+    public="${javadoc.public}"
+    package="${javadoc.package}"
+    protected="${javadoc.protected}"
+    private="${javadoc.private}"
+    use="${javadoc.use}"
+    verbose="${javadoc.verbose}">
+    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
+    <bottom><![CDATA[
+      <i>
+      <div align="center">
+        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
+      </div>
+      </i>
+    ]]></bottom>
+
+    <!--
+    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
+      -->
+
+    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
+    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
+    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
+    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
+    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
+    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
+    <tag name="ejb.pk" description="ejb" enabled="false"/>
+    <tag name="ejb.bean" description="ejb" enabled="false"/>
+    <tag name="ejb.transaction" description="ejb" enabled="false"/>
+    <tag name="ejb.finder" description="ejb" enabled="false"/>
+    <tag name="ejb.relation" description="ejb" enabled="false"/>
+    <tag name="ejb.create-method" description="ejb" enabled="false"/>
+
+    <tag name="jboss.query" description="jboss" enabled="false"/>
+    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
+    <tag name="jboss.load-group" description="jboss" enabled="false"/>
+    <tag name="jboss.persistence" description="jboss" enabled="false"/>
+    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
+    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
+    <tag name="jboss.relation" description="jboss" enabled="false"/>
+    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
+    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
+    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
+    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
+
+    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
+    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
+    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
+
+    <tag name="todo" description="todo" enabled="false"/>
+
+  </javadoc>
+</target>
+
+<target name="docs-api" depends="docs-javadocs"/>
+
+<target name="javadocs" depends="docs-javadocs"/>
+
+<!-- ========= -->
+<!-- TODO Docs -->
+<!-- ========= -->
+
+<target name="docs-todo-check" depends="init">
+
+  <!-- if index.html is newer than the sources we are up to date -->
+  <uptodate property="docs-todo.disable"
+    targetfile="${build.todo}/index.html">
+    <srcfiles dir="${source.java}" includes="**/*.java"/>
+  </uptodate>
+</target>
+
+<!-- Generate TODO list from @todo tags -->
+<target name="docs-todo"
+  depends="docs-todo-check"
+  unless="docs-todo.disable">
+
+  <!-- tdi: todo task not defined
+  <mkdir dir="${build.todo}"/>
+  <todo destdir="${build.todo}">
+    <fileset dir="${source.java}">
+      <include name="**/*.java"/>
+    </fileset>
+    <info/>
+  </todo>
+  -->
+</target>
+
+<target name="todo" depends="docs-todo"/>
+
+<!-- ============== -->
+<!-- JMX MBean Docs -->
+<!-- ============== -->
+
+<target name="jmx-docs" depends="init">
+  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
+
+  <mkdir dir="${build.jmx-doc}"/>
+  <jmxdoclet
+    destdir="${build.jmx-doc}"
+    force="false"
+    excludedtags="@version, at author">
+    <fileset dir="${source.java}">
+      <include name="**/*.java"/>
+    </fileset>
+    <jbossXmlDoc/>
+  </jmxdoclet>
+
+</target>
+
+<!-- Generate the plain HTML jmx docs -->
+<target name="jmx-docs-html-plain" depends="jmx-docs">
+
+
+  <!-- Force the use of SAXON XSLT -->
+  <property system="true"
+    name="javax.xml.transform.TransformerFactory"
+    value="com.icl.saxon.TransformerFactoryImpl"/>
+
+  <mkdir dir="${build.jmx-api}"/>
+  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
+    processor="trax"
+    extension=".html"
+    basedir="${build.jmx-doc}"
+    destdir="${build.jmx-api}">
+    <include name="**/*.xml"/>
+    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
+    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
+  </style>
+
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Cleaning                                                           -->
+<!-- ================================================================== -->
+
+<!-- Clean up all build output -->
+<target name="_default:clean"
+  depends="_buildmagic:clean">
+</target>
+
+<!-- Clean up all generated files -->
+<target name="_default:clobber"
+  depends="_buildmagic:clobber, clean">
+</target>
+
+<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
+
+
+<!-- ================================================================== -->
+<!-- Install & Release                                                  -->
+<!-- ================================================================== -->
+
+<!-- ================================================================== -->
+<!-- Project (build module) Targets                                     -->
+<!-- ================================================================== -->
+
+<!-- jason: this needs to be cleaned up -->
+
+<target name="configure-project" unless="configure-project.disable">
+
+  <!-- Bits for building source archives -->
+  <patternset id="source.ignore">
+    <exclude name="**/output/**"/>
+  </patternset>
+  <patternset id="source.free">
+    <exclude name="tools/**"/>
+    <exclude name="thirdparty/**"/>
+    <include name="**"/>
+  </patternset>
+  <patternset id="source.external">
+    <include name="tools/**"/>
+    <include name="thirdparty/**"/>
+  </patternset>
+
+  <!-- Skip any missing modules and issue a warning -->
+  <property name="executemodules.skipmissing" value="true"/>
+
+  <!-- The header and footer displayed during each module execution -->
+  <property name="executemodules.header"><![CDATA[
+ ==============================================================
+ ==
+ ==  Executing '@TARGET@' in module '@MODULE@'...
+ ==
+ ==]]></property>
+
+  <property name="executemodules.footer"><![CDATA[
+ ==
+ ==
+ ==  Finished '@TARGET@' in module '@MODULE@'.
+ ==
+ ==============================================================
+  ]]></property>
+
+  <property name="executemodules.exportproperties">
+       version.major,
+       version.minor,
+       version.revision,
+       version.tag,
+       version.name,
+       version.cvstag,
+
+       specification.title,
+       specification.version,
+       specification.vendor,
+
+       implementation.title,
+       implementation.version,
+       implementation.vendor,
+       implementation.vendor.id,
+       implementation.url
+  </property>
+
+  <!-- Show the module configuration -->
+  <echo>groups:  ${groups}</echo>
+  <echo>modules: ${modules}</echo>
+
+  <property name="configure-project.disable" value="true" system="true"/>
+
+</target>
+
+<!-- ================================================================== -->
+<!-- Module Pass-through Targets                                        -->
+<!-- ================================================================== -->
+
+<!-- Invoke the 'all' on all configured modules -->
+<target name="_buildmagic:modules:all" depends="init">
+  <execmodules target="all"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}"
+    exportproperties="${executemodules.exportproperties}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'most' on all configured modules -->
+<target name="_buildmagic:modules:most" depends="init">
+  <execmodules target="most"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}"
+    exportproperties="${executemodules.exportproperties}">
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'main' on all configured modules -->
+<target name="_buildmagic:modules:main" depends="init">
+  <execmodules target="main"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}"
+    exportproperties="${executemodules.exportproperties}">
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'release' on all configured modules -->
+<target name="_buildmagic:modules:release" depends="init">
+  <execmodules target="release"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}"
+    exportproperties="${executemodules.exportproperties}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'tests' on all configured modules -->
+<target name="_buildmagic:modules:tests" depends="init">
+  <execmodules target="tests"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}"
+    exportproperties="${executemodules.exportproperties}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'clean' on all configured modules -->
+<target name="_buildmagic:modules:clean" depends="init">
+  <execmodules target="clean"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'clobber' on all configured modules -->
+<target name="_buildmagic:modules:clobber" depends="init">
+  <execmodules target="clobber"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'docs' on all configured modules -->
+<target name="_buildmagic:modules:docs" depends="init">
+  <execmodules target="docs"
+    modules="${modules}"
+    root="${project.root}/@MODULE@"
+    skipmissing="${executemodules.skipmissing}">
+    <before target="_module- at MODULE@- at TARGET@-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module- at MODULE@- at TARGET@"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+

Added: trunk/security/tools/etc/buildmagic/common.properties
===================================================================
--- trunk/security/tools/etc/buildmagic/common.properties	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/common.properties	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,36 @@
+### ====================================================================== ###
+##                                                                          ##
+##  Copyright (c) 1998-2000 by Jason Dillon <jason at planet57.com>            ##
+##                                                                          ##
+##  This file is part of BuildMagic; an extension to Ant.                   ##
+##                                                                          ##
+##  This library 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 of the      ##
+##  License, or (at your option) any later version.                         ##
+##                                                                          ##
+##  This library 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.                         ##
+##                                                                          ##
+### ====================================================================== ###
+##                                                                          ##
+##  Common Properties                                                       ##
+##                                                                          ##
+### ====================================================================== ###
+
+###  $Id: common.properties,v 1.4 2004/11/24 02:07:36 starksm Exp $ ###
+
+buildmagic.resolveproperties.force=false
+buildmagic.propertyfilter.all=true
+
+### Jython Support ###
+
+true=1
+false=0
+
+### Misc ###
+
+/=${file.separator}
+sun.boot.classpath=${sun.boot.class.path}

Added: trunk/security/tools/etc/buildmagic/common.xml
===================================================================
--- trunk/security/tools/etc/buildmagic/common.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/common.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,324 @@
+<!-- $Id: common.xml,v 1.7 2004/11/24 02:07:36 starksm Exp $ -->
+
+<!-- ================================================================== -->
+<!-- Initialization                                                     -->
+<!-- ================================================================== -->
+
+<!-- Load Buildmagic extention tasks. -->
+<taskdef resource="org/jboss/tools/buildmagic/task/autoload.properties"/>
+<taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"/>
+
+<!-- Initialize the build system. -->
+<target name="_buildmagic:init">
+  <!-- fail unless we have been started from the build script -->
+  <require property="build.script">
+
+    The build system MUST be executed with one of the provided build scripts.
+
+  </require>
+
+  <!-- JDK Detection -->
+  <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
+  <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
+  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
+  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
+  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+
+  <!-- Setup the basic project roots. -->
+  <property name="_project.root" value="${basedir}"/>
+  <path id="project.root"><pathelement location="${_project.root}"/></path>
+  <property name="project.root" refid="project.root"/> 
+  <property name="project.build" value="${project.root}/build"/>
+
+  <!-- Include user and project property overrides. -->
+  <property file="${user.home}/.buildmagic.properties"/>
+  <property file="${user.home}/.ant.properties"/>
+
+  <!-- Setup the project environment. -->
+  <property file="${project.build}/local.properties"/>
+  <property name="project.tools" value="${project.root}/tools"/>
+  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
+
+  <!-- Setup the module environment. -->
+  <property name="module.root" value="${basedir}"/>
+
+  <available file="${module.root}/etc/local.properties-example"
+        property="init.have-local-properties"/>
+  <call target="_buildmagic:init:local-properties" if="init.have-local-properties"/>
+
+  <property file="${module.root}/local.properties"/>
+  <property name="module.source" value="${module.root}/src"/>
+  <property name="module.output" value="${module.root}/output"/>
+  <property name="module.tools" value="${module.root}/tools"/>
+  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
+
+  <!-- Setup the build.log -->
+  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
+
+  <!-- Load common properties -->
+  <property resource="org/jboss/tools/buildmagic/common.properties"/>
+
+  <!-- Setup the build timestamp & build identifer properties -->
+  <tstamp>
+    <format property="build.number" pattern="yyyyMMddHHmm"/>
+    <format property="YEAR" pattern="yyyy"/>
+  </tstamp>
+  <property name="build.id" value="${build.number}"/>
+
+  <!-- Invoke the configure task -->
+  <call target="configure" unless="configure.disable"/>
+
+  <!-- Load common task properties -->
+  <property resource="org/jboss/tools/buildmagic/task.properties"/>
+
+  <!-- Late bind properties & install filters -->
+  <resolver force="${buildmagic.resolveproperties.force}"/>
+  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
+
+  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
+
+  <!-- Finish up -->
+  <property name="init.disable" value="true"/>
+</target>
+
+<!-- Install the local.properties example if it is there -->
+<target name="_buildmagic:init:local-properties">
+  <!-- Setup the local.properties file as needed -->
+  <copy file="${module.root}/etc/local.properties-example"
+        tofile="${module.root}/local.properties" filtering="yes"/>
+  <property file="${module.root}/local.properties"/>
+</target>
+
+<!-- Initialize the build.log -->
+<target name="_buildmagic:init:buildlog">
+  <record name="${basedir}/build.log" append="no"/>
+  <property name="init-buildlog.disable" value="true" system="true"/>
+</target>
+
+<!-- Show the running environment if -Dinit.verbose=true -->
+<target name="_buildmagic:init:show-environment">
+  <echo><![CDATA[
+project.root:    ${project.root}
+module.root:     ${module.root}
+user.home:       ${user.home}
+build.compiler:  ${build.compiler}
+java.home:       ${java.home}
+java.class.path: ${java.class.path}
+java.version:    ${java.version}
+java.vendor:     ${java.vendor}
+java.vm.version: ${java.vm.version}
+java.vm.name:    ${java.vm.name}
+java.vm.info:    ${java.vm.info}
+os.name:         ${os.name}
+os.arch:         ${os.arch}
+os.version:      ${os.version}
+]]></echo>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Cleaning                                                           -->
+<!-- ================================================================== -->
+
+<!-- Clean up all build output -->
+<target name="_buildmagic:clean" depends="init">
+  <delete dir="${module.output}"/>
+</target>
+
+<!-- Clean up all generated files -->
+<target name="_buildmagic:clobber" depends="init">
+  <delete file="${module.root}/local.properties"/>
+
+  <!-- 
+     | Try to stop the build log before we delete the file.
+   -->
+  <record name="${module.root}/build.log" action="stop"/>
+
+  <!-- 
+     | This file may be opened still due and fail to be removed on win32
+     | systems, so lets just ignore those errors for now.
+   -->
+  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Help                                                               -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:help:standard" depends="init">
+  <projecthelp taskname="help">
+    <header><![CDATA[
+  The ${module.Name} module.
+]]></header>
+      <footer><![CDATA[
+    -projecthelp for all targets
+    -help for full options
+]]></footer>
+  </projecthelp>
+</target>
+
+<target name="_buildmagic:help:build" depends="init">
+  <projecthelp taskname="help">
+      <header><![CDATA[
+  The ${module.Name} module.
+]]></header>
+      <footer><![CDATA[
+    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
+    -Dmodules=<module>[(,<module>)*]   Specify the modules.
+                                       (overrides groups).
+    -projecthelp for all targets
+    -help for full options
+]]></footer>
+  </projecthelp>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Release                                                            -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:release:zip" depends="init">
+  <zip zipfile="${module.output}/${release.id}.zip">
+    <fileset dir="${module.output}">
+      <include name="${release.id}/**"/>
+    </fileset>
+  </zip>
+</target>
+
+<target name="_buildmagic:release:tar" depends="init">
+  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
+       basedir="${module.output}"
+       includes="${release.id}/**">
+  </tar>
+</target>
+
+<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
+  <gzip src="${module.output}/${release.id}.tar"
+   zipfile="${module.output}/${release.id}.tgz"/>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Install                                                            -->
+<!-- ================================================================== -->
+
+<target name="_buildmagic:install:default" depends="init">
+  <!-- Copy the output directory to the install directory -->
+  <mkdir dir="${install.root}"/>
+  <copy todir="${install.root}" filtering="no">
+    <fileset dir="${module.output}">
+       <include name="**/*"/>
+       <exclude name="${install.id}/**"/>
+    </fileset>
+  </copy>
+</target>
+
+
+<!-- ================================================================== -->
+<!-- Module Pass-through Targets                                        -->
+<!-- ================================================================== -->
+
+<!-- Invoke the 'all' on all configured modules -->
+<target name="_buildmagic:modules:all" depends="init">
+  <execmodules target="all" 
+       modules="${modules}" 
+       root="${project.root}/${module}"
+       skipmissing="${executemodules.skipmissing}"
+                 exportproperties="${executemodules.exportproperties}">
+    <before target="_module-${module}-${target}-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'most' on all configured modules -->
+<target name="_buildmagic:modules:most" depends="init">
+  <execmodules target="most" 
+          modules="${modules}" 
+          root="${project.root}/${module}"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <before target="_module-${module}-${target}-prepare"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'main' on all configured modules -->
+<target name="_buildmagic:modules:main" depends="init">
+  <execmodules target="main" 
+          modules="${modules}" 
+          root="${project.root}/${module}"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <before target="_module-${module}-${target}-prepare"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'release' on all configured modules -->
+<target name="_buildmagic:modules:release" depends="init">
+  <execmodules target="release" 
+          modules="${modules}" 
+          root="${project.root}/${module}"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <before target="_module-${module}-${target}-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'tests' on all configured modules -->
+<target name="_buildmagic:modules:tests" depends="init">
+  <execmodules target="tests" 
+          modules="${modules}" 
+          root="${project.root}/${module}"
+          skipmissing="${executemodules.skipmissing}"
+          exportproperties="${executemodules.exportproperties}">
+    <before target="_module-${module}-${target}-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'clean' on all configured modules -->
+<target name="_buildmagic:modules:clean" depends="init">
+  <execmodules target="clean" 
+       modules="${modules}" 
+       root="${project.root}/${module}"
+       skipmissing="${executemodules.skipmissing}">
+    <before target="_module-${module}-${target}-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+
+<!-- Invoke the 'clobber' on all configured modules -->
+<target name="_buildmagic:modules:clobber" depends="init">
+  <execmodules target="clobber" 
+       modules="${modules}" 
+       root="${project.root}/${module}"
+       skipmissing="${executemodules.skipmissing}">
+    <before target="_module-${module}-${target}-prepare"/>
+    <header message="${executemodules.header}"/>
+    <footer message="${executemodules.footer}"/>
+    <after target="_module-${module}-${target}"/>
+    <property name="init.have-parent" value="true"/>
+  </execmodules>
+</target>
+

Added: trunk/security/tools/etc/buildmagic/libraries.ent
===================================================================
--- trunk/security/tools/etc/buildmagic/libraries.ent	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/libraries.ent	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,633 @@
+<!-- $Id: libraries.ent,v 1.79 2005/11/04 15:36:44 alesj Exp $ -->
+
+  <!-- Spring -->
+  <property name="spring.root" value="${project.thirdparty}/spring"/>
+  <property name="spring.lib" value="${spring.root}/lib"/>
+  <path id="spring.classpath">
+     <pathelement path="${spring.lib}/spring-beans.jar"/>
+     <pathelement path="${spring.lib}/spring-core.jar"/>
+     <pathelement path="${spring.lib}/spring-context.jar"/>
+  </path>
+  <path id="spring-example.classpath">
+     <pathelement path="${spring.lib}/spring-aop.jar"/>
+     <pathelement path="${spring.lib}/spring-web.jar"/>
+     <pathelement path="${spring.lib}/spring-webmvc.jar"/>
+   </path>
+
+  <!-- Dom4j -->
+  <property name="dom4j.dom4j.root" value="${project.thirdparty}/dom4j-dom4j"/>
+  <property name="dom4j.dom4j.lib" value="${dom4j.dom4j.root}/lib"/>
+  <path id="dom4j.dom4j.classpath">
+    <pathelement path="${dom4j.dom4j.lib}/dom4j.jar"/>
+  </path>
+  
+  <!-- Properties used for transtion to thirdparty build -->
+  <property name="jaxen.jaxen.lib" value="${dom4j.dom4j.root}/lib"/>  
+
+  <!-- Javassist -->
+  <property name="javassist.root" value="${project.thirdparty}/javassist"/>
+  <property name="javassist.lib" value="${javassist.root}/lib"/>
+  <path id="javassist.classpath">
+    <pathelement path="${javassist.lib}/javassist.jar"/>
+  </path>
+
+  <!-- qdox -->
+  <property name="qdox.root" value="${project.thirdparty}/qdox"/>
+  <property name="qdox.lib" value="${qdox.root}/lib"/>
+  <path id="qdox.classpath">
+    <pathelement path="${qdox.lib}/qdox.jar"/>
+  </path>
+
+  <!-- hibernate3 -->
+  <property name="hibernate.root" value="${project.thirdparty}/hibernate"/>
+  <property name="hibernate.lib" value="${hibernate.root}/lib"/>
+  <path id="hibernate3.classpath">
+    <pathelement path="${hibernate.lib}/hibernate3.jar"/>
+    <pathelement path="${hibernate.lib}/asm.jar"/>
+    <pathelement path="${hibernate.lib}/asm-attrs.jar"/>
+    <pathelement path="${hibernate.lib}/antlr*.jar"/>
+  </path>
+  
+  <!-- hibernate entity manager -->
+  <property name="hibernate.entitymanager.root" value="${project.thirdparty}/hibernate"/>
+  <property name="hibernate.entitymanager.lib" value="${hibernate.entitymanager.root}/lib"/>
+  <path id="hibernate.entitymanager.classpath">
+    <pathelement path="${hibernate.entitymanager.lib}/ejb3-persistence.jar"/>
+    <pathelement path="${hibernate.entitymanager.lib}/hibernate-entitymanager.jar"/>
+  </path>
+  
+  <!-- hibernate annotations manager -->
+  <property name="hibernate.annotations.root" value="${project.thirdparty}/hibernate"/>
+  <property name="hibernate.annotations.lib" value="${hibernate.annotations.root}/lib"/>
+  <path id="hibernate.annotations.classpath">
+    <pathelement path="${hibernate.annotations.lib}/hibernate-annotations.jar"/>
+  </path>  
+  
+  <!-- asm alias used for bridging to thirdparty build-->
+  <property name="asm.asm.root" value="${project.thirdparty}/hibernate"/>
+  <property name="asm.asm.lib" value="${asm.asm.root}/lib/"/>
+  <property name="asm.asm.resources" value="${asm.asm.root}/resources/"/>
+  <path id="asm.asm.classpath">
+     <pathelement path="${asm.asm.lib}/asm.jar"/>
+     <pathelement path="${asm.asm.lib}/asm-attrs.jar"/>
+  </path>
+  
+
+  <!-- ejb3-persistence -->
+  <path id="ejb3-persistence.classpath">
+    <pathelement path="${hibernate.lib}/hibernate-annotations.jar"/>
+    <pathelement path="${hibernate.lib}/hibernate-entitymanager.jar"/>
+    <pathelement path="${hibernate.lib}/ejb3-persistence.jar"/>
+  </path>
+
+  <!-- ODMG (needed for Hibernate) -->
+  <property name="odmg.root" value="${project.thirdparty}/odmg"/>
+  <property name="odmg.lib" value="${odmg.root}/lib"/>
+  <path id="odmg.classpath">
+    <pathelement path="${odmg.lib}/odmg-3.0.jar"/>
+  </path>
+
+  <!-- CGLIB (needed for Hibernate) -->
+  <property name="cglib.root" value="${project.thirdparty}/cglib"/>
+  <property name="cglib.lib" value="${cglib.root}/lib"/>
+  <path id="cglib.classpath">
+    <pathelement path="${cglib.lib}/cglib-2.1.1.jar"/>
+  </path>
+
+
+  <!-- Trove -->
+  <property name="trove.root" value="${project.thirdparty}/trove"/>
+  <property name="trove.lib" value="${trove.root}/lib"/>
+  <path id="trove.classpath">
+    <pathelement path="${trove.lib}/trove.jar"/>
+  </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>
+
+  <!-- Apache Avalon -->
+  <property name="apache.avalon.root" value="${project.thirdparty}/apache-avalon"/>
+  <property name="apache.avalon.lib" value="${apache.avalon.root}/lib"/>
+  <path id="apache.avalon.classpath">
+    <pathelement path="${apache.avalon.lib}/avalon-framework.jar"/>
+  </path>
+  <property name="apache.avalon.logkit.lib" value="${apache.avalon.lib}"/>  
+  <path id="apache.avalon.logkit.classpath">
+    <pathelement path="${apache.avalon.logkit.lib}/logkit.jar"/>
+  </path>
+
+  <!-- Apache BCEL -->
+  <property name="apache.bcel.root" value="${project.thirdparty}/apache-bcel"/>
+  <property name="apache.bcel.lib" value="${apache.bcel.root}/lib"/>
+  <path id="apache.bcel.classpath">
+    <pathelement path="${apache.bcel.lib}/bcel.jar"/>
+  </path>
+
+  <!-- Apache Commons -->
+  <property name="apache.commons.root" value="${project.thirdparty}/apache-commons"/>
+  <property name="apache.commons.lib" value="${apache.commons.root}/lib"/>
+  <path id="apache.commons.classpath">
+    <pathelement path="${apache.commons.lib}/commons-collections.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-pool.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-discovery.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-fileupload.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-lang-2.0.jar"/>
+    <pathelement path="${apache.commons.lib}/commons-vfs.jar"/>
+  </path>
+  
+  <!-- Properties used for transtion to thirdparty build -->
+  <property name="apache.collections.lib" value="${apache.commons.root}/lib"/>
+  <property name="apache.codec.lib" value="${apache.commons.root}/lib"/>
+  <property name="apache.beanutils.lib" value="${apache.commons.root}/lib"/>
+  <property name="apache.digester.lib" value="${apache.commons.root}/lib"/>  
+  <property name="apache.httpclient.lib" value="${apache.commons.root}/lib"/>
+  <property name="apache.logging.lib" value="${apache.commons.root}/lib"/>
+  <property name="apache.pool.lib" value="${apache.commons.root}/lib"/>  
+  <property name="apache.fileupload.lib" value="${apache.commons.root}/lib"/>  
+  <property name="apache.lang.lib" value="${apache.commons.root}/lib"/>  
+  <property name="apache.vfs.lib" value="${apache.commons.root}/lib"/>    
+  <property name="apache.discovery.lib" value="${apache.commons.root}/lib"/>  
+  <property name="apache.validator.lib" value="${apache.commons.root}/lib"/>    
+  <property name="apache.logging.api.lib" value="${apache.commons.root}/lib"/>
+  
+  <path id="apache.httpclient.classpath">
+     <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
+  </path>
+
+  <path id="apache.logging.classpath">
+     <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
+  </path>
+  
+  <path id="apache.beanutils.classpath">
+     <pathelement path="${apache.commons.lib}/commons-beanutils.jar"/>
+  </path>
+  
+  <path id="apache.validator.classpath">
+       <pathelement path="${apache.commons.lib}/commons-validator-1.1.3.jar"/>
+  </path>
+
+  <!-- Apache Log4j -->
+  <property name="apache.log4j.root" value="${project.thirdparty}/apache-log4j"/>
+  <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/>
+  <path id="apache.log4j.classpath">
+    <pathelement path="${apache.log4j.lib}/log4j.jar"/>
+  </path>
+
+  <!-- Apache Lucene -->
+  <property name="apache.lucene.root"
+    value="${project.thirdparty}/apache-lucene"/>
+  <property name="apache.lucene.lib" value="${apache.lucene.root}/lib"/>
+  <path id="apache.lucene.classpath">
+    <pathelement path="${apache.lucene.lib}/lucene.jar"/>
+  </path>
+
+   <!-- Apache Myfaces -->
+   <property name="apache.myfaces.root"
+     value="${project.thirdparty}/apache-myfaces"/>
+   <property name="apache.myfaces.lib" value="${apache.myfaces.root}/lib"/>
+
+  <!-- Apache Tomcat 5.5.x -->
+  <property name="apache.tomcat55.root" value="${project.thirdparty}/apache-tomcat55"/>
+  <property name="apache.tomcat55.lib" value="${apache.tomcat55.root}"/>  
+  <path id="apache.tomcat55.classpath">
+    <fileset dir="${apache.tomcat55.root}">
+      <include name="*.jar" />
+    </fileset>
+  </path>
+  
+  <!-- Apache commons-el -->
+  <property name="commons.el.root" value="${apache.tomcat55.root}"/>
+  <property name="commons.el.lib" value="${apache.tomcat55.root}"/>
+  <path id="commons.el.classpath">
+     <pathelement path="${commons.el.lib}/commons-el.jar"/>
+  </path> 
+  
+  <!-- Apache Modeler -->
+  <property name="apache.modeler.root" value="${project.thirdparty}/apache-tomcat55"/>
+  <property name="apache.modeler.lib" value="${apache.modeler.root}"/>
+  <path id="apache.modeler.classpath">
+    <fileset dir="${apache.modeler.root}">
+      <include name="commons-modeler.jar" />
+    </fileset>
+  </path>
+
+  <!-- Apache Velocity -->
+  <property name="apache.velocity.root" value="${project.thirdparty}/apache-velocity"/>
+  <property name="apache.velocity.lib" value="${apache.velocity.root}/lib"/>
+  <path id="apache.velocity.classpath">
+    <pathelement path="${apache.velocity.lib}/velocity.jar"/>
+  </path>
+
+  <!-- Apache Xerces -->
+  <property name="apache.xerces.root" value="${project.thirdparty}/apache-xerces"/>
+  <property name="apache.xerces.lib" value="${apache.xerces.root}/lib"/>
+  <path id="apache.xerces.classpath">
+    <pathelement path="${apache.xerces.lib}/xml-apis.jar"/>
+    <pathelement path="${apache.xerces.lib}/xercesImpl.jar"/>
+    <pathelement path="${apache.xerces.lib}/resolver.jar"/>
+  </path>
+
+  <!-- Apache Xalan -->
+  <property name="apache.xalan.root" value="${project.thirdparty}/apache-xalan"/>
+  <property name="apache.xalan.lib" value="${apache.xalan.root}/lib"/>
+  <path id="apache.xalan.classpath">
+    <pathelement path="${apache.xalan.lib}/xalan.jar"/>
+    <path refid="apache.xerces.classpath"/>
+  </path>
+
+   <!-- Apache Scout -->
+    <property name="apache.scout.root" value="${project.thirdparty}/apache-scout"/>
+    <property name="apache.scout.lib" value="${apache.scout.root}/lib"/>
+    <path id="apache.scout.classpath">
+      <pathelement path="${apache.scout.lib}/scout.jar"/>
+    </path>
+
+  <!-- Apache Slide -->
+  <property name="apache.slide.root" value="${project.thirdparty}/apache-slide"/>
+  <property name="apache.slide.lib" value="${apache.slide.root}/client/lib"/>
+  <path id="apache.slide.classpath">
+    <pathelement path="${apache.slide.lib}/webdavlib.jar"/>
+    <pathelement path="${apache.slide.lib}/commons-httpclient.jar"/>
+  </path>
+
+  <!-- Apache JaxMe2 -->
+  <property name="apache.jaxme.root" value="${project.thirdparty}/apache-jaxme"/>
+  <property name="apache.jaxme.lib" value="${apache.jaxme.root}/lib"/>
+  <path id="apache.jaxme.classpath">
+    <pathelement path="${apache.jaxme.lib}/jaxmexs.jar"/>
+  </path>
+
+  <!-- Apache WSS4J -->
+  <property name="apache.wss4j.root" value="${project.thirdparty}/apache-wss4j"/>
+  <property name="apache.wss4j.lib" value="${apache.wss4j.root}/lib"/>
+  <path id="apache.wss4j.classpath">
+    <pathelement path="${apache.wss4j.lib}/wss4j.jar"/>
+  </path>
+
+  <!-- Apache XMLSec -->
+  <property name="apache.xmlsec.root" value="${project.thirdparty}/apache-xmlsec"/>
+  <property name="apache.xmlsec.lib" value="${apache.xmlsec.root}/lib"/>
+  <path id="apache.xmlsec.classpath">
+    <pathelement path="${apache.xmlsec.lib}/xmlsec.jar"/>
+  </path>
+
+  <!-- Bouncy Castle JCE Provider -->
+  <property name="bouncycastle.root" value="${project.thirdparty}/bouncycastle"/>
+  <property name="bouncycastle.lib" value="${bouncycastle.root}/lib"/>
+  <path id="bouncycastle.classpath">
+    <pathelement path="${bouncycastle.lib}/bcprov-jdk14-122.jar"/>
+  </path>
+
+  <!-- OpenSAML -->
+  <property name="opensaml.root" value="${project.thirdparty}/opensaml"/>
+  <property name="opensaml.lib" value="${opensaml.root}/lib"/>
+  <path id="opensaml.classpath">
+    <pathelement path="${opensaml.lib}/opensaml.jar"/>
+  </path>
+
+  <!-- GNU Regex -->
+  <property name="gnu.regexp.root" value="${project.thirdparty}/gnu-regexp"/>
+  <property name="gnu.regexp.lib" value="${gnu.regexp.root}/lib"/>
+  <path id="gnu.regexp.classpath">
+    <pathelement path="${gnu.regexp.lib}/gnu-regexp.jar"/>
+  </path>
+
+  <!-- GNU Getopt -->
+  <property name="gnu.getopt.root" value="${project.thirdparty}/gnu-getopt"/>
+  <property name="gnu.getopt.lib" value="${gnu.getopt.root}/lib"/>
+  <path id="gnu.getopt.classpath">
+    <pathelement path="${gnu.getopt.lib}/getopt.jar"/>
+  </path>
+
+  <!-- org.jdom -->
+  <property name="jdom.root" value="${project.thirdparty}/jdom-beta-7"/>
+  <property name="jdom.lib" value="${jdom.root}/lib"/>
+  <path id="jdom.classpath">
+    <pathelement path="${jdom.lib}/jdom.jar"/>
+  </path>
+
+  <!-- JBoss -->
+  <property name="jboss.external.root" value="${project.thirdparty}/jboss"/>
+  <property name="jboss.remoting.root" value="${jboss.external.root}/remoting"/>
+  <property name="jboss.remoting.lib" value="${jboss.remoting.root}/lib"/>
+  <path id="jboss.remoting.classpath">
+    <pathelement path="${jboss.remoting.lib}/jboss-remoting.jar"/>
+  </path>
+  <property name="jboss.serialization.root" value="${jboss.external.root}/serialization"/>
+  <property name="jboss.serialization.lib" value="${jboss.serialization.root}/lib"/>
+  <path id="jboss.serialization.classpath">
+    <pathelement path="${jboss.serialization.lib}/jboss-serialization.jar"/>
+  </path>
+  <property name="jboss.axis.root" value="${jboss.external.root}/axis"/>
+  <property name="jboss.axis.lib" value="${jboss.axis.root}/lib"/>
+  <path id="jboss.axis.classpath">
+    <pathelement path="${jboss.axis.lib}/axis-ws4ee.jar"/>
+  </path>
+
+  <!-- JUnit -->
+  <property name="junit.junit.root" value="${project.thirdparty}/junit-junit"/>
+  <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
+  <path id="junit.junit.classpath">
+    <pathelement path="${junit.junit.lib}/junit.jar"/>
+  </path>
+
+  <!-- EDU.oswego.cs.dl.util.concurrent -->
+  <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego-concurrent"/>
+  <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/>
+  <path id="oswego.concurrent.classpath">
+    <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/>
+  </path>
+
+  <!-- org.xml.sax (SAX2 & SAX2 Extensions) -->
+  <property name="sax.root" value="${project.thirdparty}/xml-sax"/>
+  <property name="sax.lib" value="${sax.root}/lib"/>
+  <path id="sax.classpath">
+    <pathelement path="${sax.lib}/sax2.jar"/>
+    <pathelement path="${sax.lib}/sax2-ext.jar"/>
+  </path>
+
+  <!-- IBM WSDL4j -->
+  <property name="ibm.wsdl4j.root" value="${project.thirdparty}/ibm-wsdl4j"/>
+  <property name="ibm.wsdl4j.lib" value="${ibm.wsdl4j.root}/lib"/>
+  <path id="ibm.wsdl4j.classpath">
+    <pathelement path="${ibm.wsdl4j.lib}/wsdl4j.jar"/>
+  </path>
+
+  <!-- GJT JPL-Util -->
+  <property name="gjt.jpl-util.root" value="${project.thirdparty}/gjt-jpl-util"/>
+  <property name="gjt.jpl-util.lib" value="${gjt.jpl-util.root}/lib"/>
+  <path id="gjt.jpl-util.classpath">
+    <pathelement path="${gjt.jpl-util.lib}/jpl-util.jar"/>
+    <pathelement path="${gjt.jpl-util.lib}/jpl-pattern.jar"/>
+  </path>
+
+  <!-- Hypersonic SQL -->
+  <property name="hsqldb.hsqldb.root" value="${project.thirdparty}/hsqldb-hsqldb"/>
+  <property name="hsqldb.hsqldb.lib" value="${hsqldb.hsqldb.root}/lib"/>
+  <path id="hsqldb.hsqldb.classpath">
+    <pathelement path="${hsqldb.hsqldb.lib}/hsqldb.jar"/>
+  </path>
+
+  <!-- JacORB -->
+  <property name="jacorb.jacorb.root" value="${project.thirdparty}/jacorb-jacorb"/>
+  <property name="jacorb.jacorb.lib" value="${jacorb.jacorb.root}/lib"/>
+  <path id="jacorb.jacorb.classpath">
+    <pathelement path="${jacorb.jacorb.lib}/jacorb.jar"/>
+  </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.root}/idl"/>
+  <property name="jacorb.jacorb.resources" value="${jacorb.jacorb.root}/conf/default"/>
+
+  <!-- JGroups -->
+  <property name="jgroups.jgroups.root" value="${project.thirdparty}/javagroups-javagroups"/>
+  <property name="jgroups.jgroups.lib" value="${jgroups.jgroups.root}/lib"/>
+  <path id="jgroups.jgroups.classpath">
+    <pathelement path="${jgroups.jgroups.lib}/jgroups.jar"/>
+  </path>
+
+  <!-- Sleepycat -->
+  <property name="sleepycat.root" value="${project.thirdparty}/sleepycat"/>
+  <property name="sleepycat.lib" value="${sleepycat.root}/lib"/>
+  <path id="sleepycat.classpath">
+     <pathelement path="${sleepycat.lib}/je.jar"/>
+  </path>
+
+
+  <!-- jUDDI -->
+  <property name="juddi.juddi.root" value="${project.thirdparty}/juddi-juddi"/>
+  <property name="juddi.juddi.lib" value="${juddi.juddi.root}/lib"/>
+  <path id="juddi.juddi.classpath">
+    <pathelement path="${juddi.juddi.lib}/juddi.jar"/>
+  </path>
+
+  <!-- JUnitEJB -->
+  <property name="junitejb.junitejb.root" value="${project.thirdparty}/junitejb/junitejb"/>
+  <property name="junitejb.junitejb.lib" value="${junitejb.junitejb.root}/lib"/>
+  <path id="junitejb.junitejb.classpath">
+    <pathelement path="${junitejb.junitejb.lib}/junitejb.jar"/>
+  </path>
+
+  <!-- Sun JavaBeans Activation Framework (JAF) -->
+  <property name="sun.jaf.root" value="${project.thirdparty}/sun-jaf"/>
+  <property name="sun.jaf.lib" value="${sun.jaf.root}/lib"/>
+  <path id="sun.jaf.classpath">
+    <pathelement path="${sun.jaf.lib}/activation.jar"/>
+  </path>
+
+   <!-- Sun JavaMail -->
+   <property name="sun.javamail.root" value="${project.thirdparty}/sun-javamail"/>
+   <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/>
+   <path id="sun.javamail.classpath">
+     <pathelement path="${sun.javamail.lib}/mail.jar"/>
+   </path>
+
+  <!-- Sun Java XML Parser (JAXP) -->
+  <property name="sun.jaxp.root" value="${project.thirdparty}/sun-jaxp"/>
+  <property name="sun.jaxp.lib" value="${sun.jaxp.root}/lib"/>
+  <path id="sun.jaxp.classpath">
+    <pathelement path="${sun.jaxp.lib}/jaxp.jar"/>
+    <pathelement path="${sun.jaxp.lib}/crimson.jar"/>
+    <pathelement path="${sun.jaxp.lib}/xalan.jar"/>
+  </path>
+
+  <!-- Sun Java Media Framework (JMF) -->
+  <property name="sun.jmf.root" value="${project.thirdparty}/sun-jmf"/>
+  <property name="sun.jmf.lib" value="${sun.jmf.root}/lib"/>
+  <path id="sun.jmf.classpath">
+    <pathelement path="${sun.jmf.lib}/jmf.jar"/>
+  </path>
+
+  <!-- Sun Java Management Extensions (JMX) -->
+  <property name="sun.jmx.root" value="${project.thirdparty}/sun-jmx"/>
+  <property name="sun.jmx.lib" value="${sun.jmx.root}/lib"/>
+  <path id="sun.jmx.classpath">
+    <pathelement path="${sun.jmx.lib}/jmxri.jar"/>
+    <pathelement path="${sun.jmx.lib}/jmxtools.jar"/>
+  </path>
+
+  <!-- Sun Java Servlet Technology  -->
+  <property name="sun.servlet.root" value="${project.thirdparty}/sun-servlet"/>
+  <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/>
+  <path id="sun.servlet.classpath">
+    <pathelement path="${sun.servlet.lib}/servlet-api.jar"/>
+    <pathelement path="${sun.servlet.lib}/jsp-api.jar"/>
+  </path>
+
+  <!-- JavaCC -->
+  <property name="sun.javacc.root" value="${project.thirdparty}/sun-javacc"/>
+  <property name="sun.javacc.lib" value="${sun.javacc.root}/lib"/>
+
+  <!-- BeanShell -->
+  <property name="beanshell.beanshell.root" value="${project.thirdparty}/beanshell-beanshell"/>
+  <property name="beanshell.beanshell.lib" value="${beanshell.beanshell.root}/lib"/>
+  <path id="beanshell.beanshell.classpath">
+    <fileset dir="${beanshell.beanshell.lib}">
+      <include name="*.jar" />
+    </fileset>
+  </path>
+
+  <!-- Joe SNMP lib -->
+  <property name="opennms.joesnmp.root" value="${project.thirdparty}/opennms/joesnmp"/>
+  <property name="opennms.joesnmp.lib" value="${opennms.joesnmp.root}/lib"/>
+  <path id="opennms.joesnmp.classpath">
+    <pathelement path="${opennms.joesnmp.lib}/joesnmp.jar"/>
+  </path>
+
+  <!-- XDoclet -->
+
+  <!--
+     | xdoclet has appended a version string to all their jars.
+     | I'm using jb4 so we don't have to track them so carefully
+   -->
+  <property name="xdoclet.version" value="jb4"/>
+
+  <!--
+
+  jason: it seems like this hack is better defaulting to the default in thirdparty, if you
+         want to build from CVS then change this to the value below in build/local.properties.
+
+  <!- - this may be overridden by the build/local.properties file to use version from cvs- ->
+  <property name="xdoclet.xdoclet.root" value="${project.root}/xdoclet/output"/>
+
+  -->
+  <property name="xdoclet.xdoclet.root" value="${project.thirdparty}/xdoclet-xdoclet"/>
+
+  <property name="xdoclet.xdoclet.lib" value="${xdoclet.xdoclet.root}/lib"/>
+  <path id="xdoclet.xdoclet.classpath">
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xjavadoc-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-bea-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-ejb-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-java-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jboss-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jdo-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jmx-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-web-module-${xdoclet.version}.jar"/>
+    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xdoclet-module-${xdoclet.version}.jar"/>
+    <path refid="apache.commons.classpath"/>
+    <path refid="sun.servlet.classpath"/>
+  </path>
+  <path id="xdoclet.task.classpath">
+    <path refid="xdoclet.xdoclet.classpath"/>
+  </path>
+
+  <!-- Informa RSS -->
+  <property name="informa.rss.root" value="${project.thirdparty}/informa-rss"/>
+  <property name="informa.rss.lib" value="${informa.rss.root}/lib"/>
+  <path id="informa.rss.classpath">
+    <pathelement path="${informa.rss.lib}/informa.jar"/>
+  </path>
+
+  <!-- JRegex -->
+  <property name="jregex.jregex.root" value="${project.thirdparty}/jregex-jregex"/>
+  <property name="jregex.jregex.lib" value="${jregex.jregex.root}/lib"/>
+  <path id="jregex.jregex.classpath">
+    <pathelement path="${jregex.jregex.lib}/jregex.jar"/>
+  </path>
+
+  <!-- DNSJava -->
+  <property name="sourceforge.dnsjava.root" value="${project.thirdparty}/sourceforge-dnsjava"/>
+  <property name="sourceforge.dnsjava.lib" value="${sourceforge.dnsjava.root}/lib"/>
+  <path id="sourceforge.dnsjava.classpath">
+    <pathelement path="${sourceforge.dnsjava.lib}/dnsjava-1.4.3.jar"/>
+  </path>
+
+  <!-- M.Wutka's DTD parser -->
+  <property name="wutka.dtdparser.root" value="${project.thirdparty}/wutka-dtdparser"/>
+  <property name="wutka.dtdparser.lib" value="${wutka.dtdparser.root}/lib"/>
+  <path id="wutka.dtdparser.classpath">
+    <pathelement path="${wutka.dtdparser.lib}/dtdparser121.jar"/>
+  </path>
+
+  <!-- JFreeChart -->
+  <property name="jfreechart.jfreechart.root" value="${project.thirdparty}/jfreechart"/>
+  <property name="jfreechart.jfreechart.lib" value="${jfreechart.jfreechart.root}/lib"/>
+  <path id="jfreechart.jfreechart.classpath">
+    <fileset dir="${jfreechart.jfreechart.lib}">
+      <include name="*.jar" />
+    </fileset>
+  </path>
+
+ <!-- ebxmlrr -->
+  <property name="ebxmlrr.ebxmlrr.root" value="${project.thirdparty}/sun-ebxmlrr"/>
+  <property name="ebxmlrr.ebxmlrr.lib" value="${ebxmlrr.ebxmlrr.root}/lib"/>
+  <path id="ebxmlrr.ebxmlrr.classpath">
+    <pathelement path="${ebxmlrr.ebxmlrr.lib}/ebxmlrr.jar"/>
+    <pathelement path="${ebxmlrr.ebxmlrr.lib}/jaxr-client.jar"/>
+  </path>
+
+  <!-- ANTLR -->
+  <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
+  <property name="antlr.antlr.lib" value="${antlr.antlr.root}/lib"/>
+  <path id="antlr.antlr.classpath">
+    <pathelement path="${antlr.antlr.lib}/antlr-2.7.5H3.jar"/>
+  </path>
+
+  <!-- Apache Taglibs -->
+  <property name="apache.taglibs.root" value="${project.thirdparty}/apache-taglibs"/>
+  <property name="apache.taglibs.lib" value="${apache.taglibs.root}/lib"/>
+  <path id="apache.taglibs.classpath">
+    <pathelement path="${apache.taglibs.lib}/jstl-1.1.2.jar"/>
+    <pathelement path="${apache.taglibs.lib}/standard-1.1.2.jar"/>
+  </path>
+
+  <!-- Apache ORO -->
+  <property name="apache.oro.root" value="${project.thirdparty}/apache-oro"/>
+  <property name="apache.oro.lib" value="${apache.oro.root}/lib"/>
+  <path id="apache.oro.classpath">
+    <pathelement path="${apache.oro.lib}/jakarta-oro-2.0.8.jar"/>
+  </path>
+
+  <!-- Apache Struts -->
+  <property name="apache.struts.root" value="${project.thirdparty}/apache-struts"/>
+  <property name="apache.struts.lib" value="${apache.struts.root}/lib"/>
+  <path id="apache.struts.classpath">
+    <pathelement path="${apache.struts.lib}/struts-1.2.6.jar"/>
+  </path>
+
+  <!-- StAX -->
+  <property name="codehaus.stax.root" value="${project.thirdparty}/codehaus-stax"/>
+  <property name="codehaus.stax.lib" value="${codehaus.stax.root}/lib"/>
+  <path id="codehaus.stax.classpath">
+    <pathelement path="${codehaus.stax.lib}/stax-1.1.1.jar"/>
+  </path>
+
+  <!-- XMLUnit -->
+  <property name="xmlunit.xmlunit.root" value="${project.thirdparty}/xmlunit-xmlunit"/>
+  <property name="xmlunit.xmlunit.lib" value="${xmlunit.xmlunit.root}/lib"/>
+  <path id="xmlunit.xmlunit.classpath">
+    <pathelement path="${xmlunit.xmlunit.lib}/xmlunit1.0.jar"/>
+  </path>
+  
+  <!-- easymock -->
+  <property name="easymock.easymock.root" value="${project.thirdparty}/easymock"/>
+  <property name="easymock.easymock.lib" value="${easymock.easymock.root}/lib/"/>
+  <property name="easymock.easymock.resources" value="${easymock.easymock.root}/resources/"/>
+  <path id="easymock.easymock.classpath">
+     <pathelement path="${easymock.easymock.lib}/easymockclassextension.jar"/>
+     <pathelement path="${easymock.easymock.lib}/easymock-1.1.jar"/>
+  </path>
+  
+  <!-- struts-test-case -->
+  <property name="struts.test.case.root" value="${project.thirdparty}/struts-test-case"/>
+  <property name="struts.test.case.lib" value="${struts.test.case.root}/lib/"/>
+  <property name="struts.test.case.resources" value="${struts.test.case.root}/resources/"/>
+  <path id="struts.test.case.classpath">
+     <pathelement path="${struts.test.case.lib}/strutstest-2.1.3.jar"/>
+  </path>  
+  
+  <!-- cache -->
+  <property name="jboss.cache.root" value="${project.thirdparty}/jboss/cache"/>
+  <property name="jboss.cache.lib" value="${jboss.cache.root}/lib"/>
+  <path id="jboss.cache.classpath">
+    <pathelement path="${jboss.cache.lib}/jboss-cache.jar"/>
+  </path>  

Added: trunk/security/tools/etc/buildmagic/modules.ent
===================================================================
--- trunk/security/tools/etc/buildmagic/modules.ent	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/modules.ent	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,59 @@
+<!-- $Id: modules.ent,v 1.56 2006/05/23 20:20:41 asaldhana Exp $ -->
+<!-- J2EE -->
+<property name="jboss.j2ee.root" value="${project.root}"/>
+<property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/>
+<path id="jboss.j2ee.classpath">
+  <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
+  <pathelement path="${jboss.j2ee.lib}/jboss-jaxrpc.jar"/>
+  <pathelement path="${jboss.j2ee.lib}/jboss-saaj.jar"/>
+</path>
+
+<!-- J2EE Extensions-->
+<path id="jboss.j2ee.ext.classpath">
+  <pathelement path="${jboss.j2ee.lib}/jboss-auth.jar"/>
+</path>
+
+<!-- J2SE -->
+<property name="jboss.j2se.root" value="${project.root}"/>
+<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
+<path id="jboss.j2se.classpath">
+  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
+</path>
+<path id="jboss.jmxcompliance.classpath">
+  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
+</path>
+
+<!-- JMX -->
+<property name="jboss.jmx.root" value="${project.root}"/>
+<property name="jboss.jmx.lib" value="${jboss.jmx.root}/lib"/>
+<path id="jboss.jmx.classpath">
+  <pathelement path="${jboss.jmx.lib}/jboss-jmx.jar"/>
+</path>
+
+<!-- MBeans -->
+<property name="jboss.mbeans.root" value="${project.root}"/>
+<property name="jboss.mbeans.lib" value="${jboss.mbeans.root}/lib"/>
+<path id="jboss.mbeans.classpath">
+  <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
+</path>
+
+<!-- Naming -->
+<property name="jboss.naming.root" value="${project.root}"/>
+<property name="jboss.naming.lib" value="${jboss.naming.root}/lib"/>
+<path id="jboss.naming.classpath">
+  <pathelement path="${jboss.naming.lib}/jnpserver.jar"/>
+</path>
+
+<!-- System -->
+<property name="jboss.system.root" value="${project.root}"/>
+<property name="jboss.system.lib" value="${jboss.system.root}/lib"/>
+<path id="jboss.system.classpath">
+  <pathelement path="${jboss.system.lib}/jboss-system.jar"/>
+</path>
+
+<!-- Transaction -->
+<property name="jboss.transaction.root" value="${project.root}"/>
+<property name="jboss.transaction.lib" value="${jboss.transaction.root}/lib"/>
+<path id="jboss.transaction.classpath">
+  <pathelement path="${jboss.transaction.lib}/jboss-transaction.jar"/>
+</path>

Added: trunk/security/tools/etc/buildmagic/targets.ent
===================================================================
--- trunk/security/tools/etc/buildmagic/targets.ent	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/targets.ent	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,116 @@
+<!-- $Id: targets.ent,v 1.5 2004/11/24 02:07:36 starksm Exp $ -->
+<!--
+   $Log: targets.ent,v $
+   Revision 1.5  2004/11/24 02:07:36  starksm
+   Restore the tools module content after the errant removal
+
+   Revision 1.3  2004/03/29 19:49:17  ejort
+   Bring build into line with jboss-3.2
+
+   Revision 1.1.2.2  2003/12/07 22:12:53  ejort
+   Make a start on simplifying the build,
+   including incremental xdoclet MBean generation
+
+   Revision 1.1.2.1  2003/05/18 06:24:13  starksm
+   
+   Standard targets
+-->
+
+  <!-- ================================================================== -->
+  <!-- Initialization                                                     -->
+  <!-- ================================================================== -->
+
+  <!--
+     | Initialize the build system.  Must depend on '_buildmagic:init'.  
+     | Other targets should depend on 'init' or things will mysteriously fail.
+   -->
+
+  <target name="init" unless="init.disable" depends="_buildmagic:init">
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Archives                                                           -->
+  <!-- ================================================================== -->
+
+  <!-- 
+     | Build all jar files.
+   -->
+  <target name="jars" 
+	  description="Builds all jar files."
+     depends="_buildmagic:build-bypass-check"
+	  unless="build-bypass.on">
+
+    <call target="compile"/>
+
+    <mkdir dir="${build.lib}"/>
+
+    <call target="module-jars"/>
+
+    <!-- Update the build marker to allow bypassing -->
+    <touch file="${build-bypass.marker}"/>
+
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Install & Release                                                  -->
+  <!-- ================================================================== -->
+
+  <target name="install" 
+	  description="Install the structure for a release."
+	  depends="all, _buildmagic:install:default"/>
+
+  <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">
+  </target>
+
+  <!-- Clean up all generated files -->
+  <target name="clobber" 
+	  description="Cleans up all generated files."
+	  depends="_buildmagic:clobber, clean">
+  </target>
+
+
+  <!-- ================================================================== -->
+  <!-- Misc.                                                              -->
+  <!-- ================================================================== -->
+
+  <target name="main"
+	  description="Executes the default target (most)."
+	  depends="most"/>
+    
+  <target name="all"
+	  description="Builds everything."
+	  depends="jars, docs"/>
+
+  <target name="most" 
+	  description="Builds almost everything."
+	  depends="jars"/>
+
+  <target name="help" 
+          description="Show this help message."
+	  depends="_buildmagic:help:standard"/>

Added: trunk/security/tools/etc/buildmagic/task.properties
===================================================================
--- trunk/security/tools/etc/buildmagic/task.properties	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/task.properties	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,91 @@
+### ====================================================================== ###
+##                                                                          ##
+##  Default Task Properties                                                 ##
+##                                                                          ##
+### ====================================================================== ###
+
+###  $Id: task.properties,v 1.8 2005/10/05 18:45:32 rloehr Exp $ ###
+
+### Javac Defaults ###
+
+javac.includes=**/*.java
+javac.excludes=
+javac.defaultexcludes=yes
+
+javac.boot.classpath=${sun.boot.classpath}
+javac.classpath=${classpath}
+
+javac.debug=off
+javac.optimize=on
+javac.deprecation=on
+javac.target=1.4
+javac.verbose=off
+javac.depend=off
+javac.source=1.4
+
+javac.include.ant.runtime=no
+javac.include.java.runtime=no
+javac.fail.onerror=true
+
+classpath=
+classpath.local=
+classpath.thirdparty=
+
+### Javadoc Defaults ###
+
+javadoc.classpath=${javac.classpath}
+javadoc.sourcepath=
+javadoc.source.path=
+javadoc.source.files=
+
+javadoc.public=false
+javadoc.package=false
+javadoc.protected=true
+javadoc.private=false
+javadoc.version=true
+javadoc.author=true
+javadoc.use=true
+javadoc.verbose=false
+
+javadoc.windowtitle=${module.Name} API
+javadoc.doctitle=${module.Name}
+javadoc.splitindex=no
+
+### MBean Defaults ###
+mbean.includes=
+mbean.excludes=
+
+### Jar Defaults ###
+jar.server.includes=
+jar.client.includes=
+
+### RMIC Defaults ###
+
+rmic.base=${build.classes}
+rmic.stubVersion=${javac.target}
+rmic.verify=true
+rmic.sourcebase=
+rmic.debug=false
+rmic.iiop=false
+rmic.iiopopts=
+rmic.idl=false
+rmic.idlopts=
+rmic.includes=
+rmic.excludes=
+
+### JUnit Defaults ###
+
+junit.printsummary=true
+junit.haltonerror=false
+junit.haltonfailure=false
+junit.fork=true
+junit.timeout=300000
+junit.jvm=java
+junit.jvm.options=-Dnone
+
+junit.formatter.type=xml
+junit.formatter.usefile=true
+
+junit.batchtest.fork=${junit.fork}
+junit.batchtest.haltonerror=${junit.haltonerror}
+junit.batchtest.haltonfailure=${junit.haltonfailure}

Added: trunk/security/tools/etc/buildmagic/version-info.xml
===================================================================
--- trunk/security/tools/etc/buildmagic/version-info.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/buildmagic/version-info.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,56 @@
+<!-- $Id: version-info.xml,v 1.8 2006/02/23 15:07:21 dimitris Exp $ -->
+
+<project name="Common Build Defs">
+
+  <!-- Include user and project property overrides. -->
+  <property file="${user.home}/.buildmagic.properties"/>
+  <property file="${user.home}/.ant.properties"/>
+
+  <!-- Setup the build timestamp & build identifer properties -->
+  <tstamp>
+    <format property="build.number" pattern="yyyyMMddHHmm"/>
+    <format property="YEAR" pattern="yyyy"/>
+  </tstamp>
+  <property name="build.id" value="${build.number}"/>
+
+    <!-- Version identifiers for the server. -->
+    <property name="version.major" value="5"/>
+    <property name="version.minor" value="0"/>
+    <property name="version.revision" value="0"/>
+    <property name="version.tag" value="Alpha"/>
+    <property name="version.name" value="Morpheus"/>
+    <!-- This must be set to the CVS tag for any release -->
+    <property name="version.cvstag" value="HEAD"/>
+
+    <!-- Manifest version info -->
+    <property name="specification.title" value="JBoss"/>
+    <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
+    <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
+
+    <property name="implementation.title" value="JBoss [${version.name}]"/>
+    <property name="implementation.url" value="http://www.jboss.org/"/>
+    <property name="implementation.version" 
+         value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
+    <property name="implementation.vendor" value="JBoss Inc."/>
+    <property name="implementation.vendor.id" value="${implementation.url}"/>
+
+    <target name="print-version-info">
+      <echo>
+    version.major=${version.major}
+    version.minor=${version.minor}
+    version.revision=${version.revision}
+    version.tag=${version.tag}
+    version.name=${version.name}
+    version.cvstag=${version.cvstag}
+    specification.title=${specification.title}
+    specification.version=${specification.version}
+    specification.vendor=${specification.vendor}
+    implementation.title=${implementation.title}
+    implementation.url=${implementation.url}
+    implementation.version=${implementation.version} 
+    implementation.vendor=${implementation.vendor}
+    implementation.vendor.id=${implementation.vendor.id}
+      </echo>
+    </target>
+</project>
+

Added: trunk/security/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- trunk/security/tools/etc/jbossbuild/jbossbuild.properties	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/jbossbuild/jbossbuild.properties	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,11 @@
+
+# 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
+
+external.project=true;
\ No newline at end of file

Added: trunk/security/tools/etc/jbossbuild/release.xml
===================================================================
--- trunk/security/tools/etc/jbossbuild/release.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/jbossbuild/release.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,152 @@
+<?xml version="1.0"?>
+
+<!--
+ JBoss, the OpenSource J2EE webOS
+ 
+ Distributable under LGPL license.
+ See terms of license at gnu.org.
+-->
+
+<!-- ================================================================== -->
+<!-- JBoss AOP release build definition                                 -->
+<!-- ================================================================== -->
+
+<project name="main.build"
+         default="build" 
+         basedir="."
+>
+   <!-- Import the types -->
+   <import file="../tools/etc/jbossbuild/tasks.xml"/>
+
+   <!-- =============================================================== -->
+   <!-- The Main project definition                                     -->
+   <!-- =============================================================== -->
+
+   <build id="jboss-aop"
+          impltitle="JBoss AOP"
+          implversion="1.0.0-FINAL"
+          implvendor="JBoss Inc."
+          implurl="http://www.jboss.com/products/aop"
+          description="JBoss Aspect Oriented Programming Framewoork"
+          cvsroot="cvs.sourceforge.net:/cvsroot/jboss"
+          thirdpartypath="../thirdparty/"
+          location="http://cruisecontrol.jboss.com/repository/"
+          targetdefs="targets">
+
+      <!-- ============================================================ -->
+      <!-- Common utilities                                             -->
+      <!-- ============================================================ -->
+
+      <component id="common"
+                 version="5.0-SNAPSHOT"
+      >
+         <artifact id="jboss-common.jar" release="lib"/>
+         <artifact id="jboss-common-client.jar"/>
+         <artifact id="namespace.jar"/>
+      </component>
+
+      <includes id="common-project">
+         <include input="jboss-common.jar"/>
+         <include input="namespace.jar"/>
+      </includes>
+
+      <!-- ============================================================ -->
+      <!-- Container                                                    -->
+      <!-- ============================================================ -->
+
+      <component id="container"
+                 version="5.0-SNAPSHOT"
+      >
+         <artifact id="jboss-container.jar"/>
+      </component>
+
+      <includes id="container-project">
+         <include input="jboss-container.jar"/>
+      </includes>
+
+      <!-- ============================================================ -->
+      <!-- AOP                                                          -->
+      <!-- ============================================================ -->
+
+      <component id="aop"
+                 module="jboss-aop"
+                 version="1.0.0-FINAL"
+      >
+         <artifact id="jboss-aop.jar" release="lib"/>
+      </component>
+
+      <includes id="aop-project">
+         <include input="jboss-aop.jar"/>
+      </includes>
+
+      <!-- ============================================================ -->
+      <!-- QDox                                                         -->
+      <!-- ============================================================ -->
+
+      <component id="qdox"
+                 version="1.4">
+         <artifact id="qdox.jar" release="lib"/>
+      </component>
+
+      <includes id="qdox-lib">
+         <include input="qdox.jar"/>
+      </includes>
+
+      <!-- ============================================================ -->
+      <!-- Javassist                                                    -->
+      <!-- ============================================================ -->
+
+      <component id="javassist"
+                 version="3.0beta">
+         <artifact id="javassist.jar" release="lib"/>
+      </component>
+
+      <includes id="javassist-lib">
+         <include input="javassist.jar"/>
+      </includes>
+
+      <!-- ============================================================ -->
+      <!-- Trove                                                        -->
+      <!-- ============================================================ -->
+      
+      <component id="trove"
+                 version="2.1.1">
+         <artifact id="trove.jar" release="lib"/>
+      </component>
+
+      <includes id="trove-lib">
+         <include input="trove.jar"/>
+      </includes>
+
+      <!-- ============================================================ -->
+      <!-- Oswego Concurrent Library                                    -->
+      <!-- ============================================================ -->
+
+      <component id="oswego-concurrent"
+                 version="1.0">
+         <artifact id="concurrent.jar" release="lib"/>
+      </component>
+
+      <includes id="concurrent">
+         <include input="concurrent.jar"/>
+      </includes>
+
+
+      <!-- ============================================================ -->
+      <!-- JUnit                                                        -->
+      <!-- ============================================================ -->
+
+      <component id="junit-junit"
+                 version="3.8.1">
+         <artifact id="junit.jar" release="lib"/>
+      </component>
+
+      <includes id="junit">
+         <include input="junit.jar"/>
+      </includes>
+   </build>
+
+   <!-- Generate the targets -->
+   <generate generate="jboss-aop"/>
+   
+</project>

Added: trunk/security/tools/etc/jbossbuild/tasks.xml
===================================================================
--- trunk/security/tools/etc/jbossbuild/tasks.xml	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/etc/jbossbuild/tasks.xml	2006-09-08 19:43:32 UTC (rev 56669)
@@ -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="thirdparty"/>
+            <get src="@{location}/${jbossbuild.component.info}"
+                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
+                 useTimestamp="true"
+                 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="true"
+                 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/security/tools/lib/README
===================================================================
--- trunk/security/tools/lib/README	2006-09-08 19:27:25 UTC (rev 56668)
+++ trunk/security/tools/lib/README	2006-09-08 19:43:32 UTC (rev 56669)
@@ -0,0 +1,14 @@
+Please refer to the Ant manual under Installing Ant / Library
+Dependencies for a list of the jar requirements for various optional
+tasks and features.
+
+This directory contains xercesImpl.jar from the 2.6.1 release of
+Apache Xerces.  For more information or newer releases see
+<http://xml.apache.org/xerces2-j/>.  See the file LICENSE.xerces for
+the terms of distribution.
+
+It also contains xml-apis.jar from the 2.6.1 release of Apache Xerces.
+For more information or newer releases see
+<http://xml.apache.org/commons/>.  See the files LICENSE.dom and
+LICENSE.sax for the terms of distribution.
+

Added: trunk/security/tools/lib/ant-javamail.jar
===================================================================
(Binary files differ)


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

Added: trunk/security/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)


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

Added: trunk/security/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)


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

Added: trunk/security/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)


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

Added: trunk/security/tools/lib/ant-trax.jar
===================================================================
(Binary files differ)


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

Added: trunk/security/tools/lib/ant-xslp.jar
===================================================================
(Binary files differ)


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

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


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

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


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

Added: trunk/security/tools/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)


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

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


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

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


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

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


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

Added: trunk/security/tools/lib/org.eclipse.jdt.core_3.1.0.jar
===================================================================
(Binary files differ)


Property changes on: trunk/security/tools/lib/org.eclipse.jdt.core_3.1.0.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

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


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

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


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

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


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

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


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

Added: trunk/security/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)


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




More information about the jboss-cvs-commits mailing list