User: user57
Date: 01/09/10 22:29:11
Modified: . build.xml
Log:
o updating build system, see mail to jboss-dev for more details
Revision Changes Path
1.21 +325 -162 manual/build.xml
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/manual/build.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- build.xml 2001/09/04 19:35:52 1.20
+++ build.xml 2001/09/11 05:29:11 1.21
@@ -10,7 +10,7 @@
<!-- -->
<!-- ====================================================================== -->
-<!-- $Id: build.xml,v 1.20 2001/09/04 19:35:52 user57 Exp $ -->
+<!-- $Id: build.xml,v 1.21 2001/09/11 05:29:11 user57 Exp $ -->
<project default="main" name="JBoss/Manual">
@@ -19,158 +19,228 @@
<!-- ================================================================== -->
<!-- Load Buildmagic extention tasks. -->
- <taskdef name="taskdef" classname="planet57.tools.buildmagic.task.Taskdef"/>
<taskdef resource="planet57/tools/buildmagic/task/autoload.properties"/>
+ <taskdef name="property" classname="planet57.tools.buildmagic.task.Property"/>
- <!-- Setup the basic project roots. -->
- <path id="project.root"><pathelement location=".."/></path>
- <property name="project.root" refid="project.root"/>
- <property name="control.root" value="${project.root}/build"/>
+ <!-- Initialize the build system. -->
+ <target name="init" depends="_init-prepare" unless="init.disable">
+ <!-- Perform any setup required if we are a child of another build -->
+ <call target="_init-child"/>
+
+ <!-- Setup the basic project roots. -->
+ <path id="project.root"><pathelement location=".."/></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"/>
- <property file="${control.root}/local.properties"/>
-
- <!-- Setup the basic environment for a project build module. -->
- <property name="project.output" value="${control.root}/output"/>
- <property name="project.release" value="${project.output}"/>
- <property name="tools.root" value="${project.root}/tools"/>
- <property name="thirdparty.root" value="${project.root}/thirdparty"/>
-
- <!-- Setup the basic environment for a source module. -->
- <property name="module.root" value="${basedir}"/>
- <property name="module.source" value="${module.root}/src"/>
- <property name="module.output" value="${module.root}/output"/>
- <property name="module.build" value="${module.output}"/>
- <property name="module.release" value="${module.output}"/>
- <property file="${module.root}/local.properties"/>
+ <!-- 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}"/>
+ <call target="_init-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"/>
- <!-- Initialize the build system. -->
- <target name="init" unless="initialized-already" depends="init-buildlog">
+ <!-- Setup the build.log -->
+ <call target="_init-buildlog"/>
+
+ <!-- Load common properties -->
+ <property resource="planet57/tools/buildmagic/common.properties"/>
+
+ <!-- Setup the build timestamp & build identifer properties -->
<tstamp>
<format property="build.number" pattern="yyyyMMddHHmm"/>
</tstamp>
- <property name="build.id" value="DEV"/>
+ <property name="build.id" value="${build.number}"/>
- <property resource="planet57/tools/buildmagic/common.properties"/>
- <property resource="planet57/tools/buildmagic/task.properties"/>
+ <!-- Invoke the configure task -->
+ <call target="_configure"/>
- <moduleinfo/>
+ <!-- Late bind properties & install filters -->
<resolver force="${buildmagic.resolveproperties.force}"/>
<propertyfilter all="${buildmagic.propertyfilter.all}"/>
- <property name="initialized-already" value="true"/>
- </target>
- <target name="init-buildlog" unless="buildlog-disabled">
- <record name="${basedir}/build.log" append="no" loglevel="info"/>
- </target>
-
-
- <!-- ================================================================== -->
- <!-- Module Configuration -->
- <!-- ================================================================== -->
-
- <!-- Module name(s) & version -->
- <property name="module.name" value="manual"/>
- <property name="module.Name" value="JBoss Manual"/>
- <property name="module.version" value="unspecified"/>
+ <!-- Show some information -->
+ <call target="_init-show-environment"/>
-
- <!-- ================================================================== -->
- <!-- Tool Configuration -->
- <!-- ================================================================== -->
+ <!-- Finish up -->
+ <property name="init.disable" value="true"/>
+ </target>
- <!-- DocBook -->
- <path id="oasis.docbook.xml.root">
- <pathelement location="${thirdparty.root}/oasis/docbook-xml"/>
- </path>
- <property name="oasis.docbook.xml.root" refid="oasis.docbook.xml.root"/>
- <path id="oasis.docbook.xsl.root">
- <pathelement location="${thirdparty.root}/oasis/docbook-xsl"/>
- </path>
- <property name="oasis.docbook.xsl.root" refid="oasis.docbook.xsl.root"/>
- <property name="oasis.docbook.xsl.chunker.quiet" value="0"/>
+ <!-- Perform any preperation before init. -->
+ <target name="_init-prepare">
+ <available file="${module.root}/etc/local.properties-example"
+ property="init.have-local-properties"/>
+ </target>
- <!-- FOP -->
- <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
+ <!-- Perform any setup required if we are a child of another build -->
+ <target name="_init-child" if="init.have-parent">
+ <!-- Disable the build.log, our parent will catch it -->
+ <property name="init-buildlog.disable" value="true"/>
+ </target>
+ <!-- Install the local.properties example if it is there -->
+ <target name="_init-local-properties" if="init.have-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>
- <!-- ================================================================== -->
- <!-- Library Configuration -->
- <!-- ================================================================== -->
+ <!-- Initialize the build.log -->
+ <target name="_init-buildlog" unless="init-buildlog.disable">
+ <record name="${basedir}/build.log" append="no" loglevel="info"/>
+ <property name="init-buildlog.disable" value="true"/>
+ </target>
- <!-- The combined library classpath -->
- <path id="library.classpath">
- </path>
+ <!-- Show the running environment if -Dinit.verbose=true -->
+ <target name="_init-show-environment" if="init.verbose">
+ <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>
<!-- ================================================================== -->
- <!-- Dependent Module Configuration -->
+ <!-- Configuration -->
<!-- ================================================================== -->
-
- <!-- This module does not depend on any other modules. -->
- <!-- The combined depedant module classpath -->
- <path id="dependentmodule.classpath">
- </path>
+ <!--
+ | Configure the build system.
+ |
+ | Configuration elements should be placed in the appropriate
+ | _configure-* targets.
+ -->
+ <target name="_configure" unless="configure.disable">
+ <!-- Module name(s) & version -->
+ <property name="module.name" value="manual"/>
+ <property name="module.Name" value="JBoss Manual"/>
+ <property name="module.version" value="unspecified"/>
+
+ <!-- Invoke the rest of the configuration targets -->
+ <call target="_configure-tools"/>
+ <call target="_configure-libraries"/>
+ <call target="_configure-modules"/>
+ <call target="_configure-tasks"/>
+ </target>
+
+ <!-- Configure the thirdparty tools required to build this module. -->
+ <target name="_configure-tools" unless="configure-tools.disable">
+ <!-- DocBook -->
+ <path id="oasis.docbook.xml.root">
+ <pathelement location="${project.thirdparty}/oasis/docbook-xml"/>
+ </path>
+ <property name="oasis.docbook.xml.root" refid="oasis.docbook.xml.root"/>
+ <path id="oasis.docbook.xsl.root">
+ <pathelement location="${project.thirdparty}/oasis/docbook-xsl"/>
+ </path>
+ <property name="oasis.docbook.xsl.root" refid="oasis.docbook.xsl.root"/>
+ <property name="oasis.docbook.xsl.chunker.quiet" value="0"/>
+
+ <!-- FOP -->
+ <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
+ </target>
+
+ <!-- Configure the thirdparty libraries required by this module. -->
+ <target name="_configure-libraries" unless="configure-libraries.disable">
+ <!-- The combined library classpath -->
+ <path id="library.classpath">
+ </path>
+ </target>
+
+ <!-- Configure the external modules which this module depends on. -->
+ <target name="_configure-modules" unless="configure-modules.disable">
+ <!-- The combined dependent module classpath -->
+ <path id="dependentmodule.classpath">
+ </path>
+ </target>
+
+ <!-- Configure the tasks used by this module. -->
+ <target name="_configure-tasks" unless="configure-tasks.disable">
+ <!-- Load common task properties -->
+ <property resource="planet57/tools/buildmagic/task.properties"/>
- <!-- ================================================================== -->
- <!-- Task Configuration -->
- <!-- ================================================================== -->
-
- <!-- The combined thirdparty classpath -->
- <path id="thirdparty.classpath">
- <path refid="library.classpath"/>
- <path refid="dependentmodule.classpath"/>
- </path>
-
- <!-- This module is based on Java 1.2 -->
- <property name="javac.target" 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>
-
- <!-- Packages to include when generating api documentation -->
- <property name="javadoc.packages" value="org.jboss.*"/>
-
- <!-- The classpath required to build javadocs. -->
- <path id="javadoc.classpath">
- <path refid="javac.classpath"/>
- </path>
-
- <!-- Where source files live -->
- <property name="source.metadata" value="${module.source}/metadata"/>
- <property name="source.examples" value="${module.source}/examples"/>
- <property name="source.stylesheets" value="${module.source}/stylesheets"/>
- <property name="source.docs" value="${module.source}/docs"/>
- <property name="source.xdocs" value="${module.source}/xdocs"/>
-
- <!-- Where build generated files will go -->
- <property name="build.metadata" value="${module.build}/metadata"/>
- <property name="build.docs" value="${module.build}/docs"/>
- <property name="build.xdocs" value="${module.build}/xdocs"/>
- <property name="build.stylesheets" value="${module.build}/stylesheets"/>
- <property name="build.html" value="${module.build}/html"/>
- <property name="build.html.fancy" value="${build.html}/fancy"/>
- <property name="build.html.plain" value="${build.html}/plain"/>
- <property name="build.html.printable" value="${build.html}/printable"/>
- <property name="build.pdf" value="${module.build}/pdf"/>
- <property name="build.jars" value="${module.build}/lib"/>
-
- <!-- Where release generated files will go -->
- <property name="release.id" value="${module.name}-${module.version}-${build.id}"/>
- <property name="release.root" value="${module.release}/${release.id}"/>
- <property name="release.archive.basename"
value="${module.release}/${release.id}"/>
+ <!-- Where source files live -->
+ <property name="source.metadata" value="${module.source}/metadata"/>
+ <property name="source.examples" value="${module.source}/examples"/>
+ <property name="source.stylesheets" value="${module.source}/stylesheets"/>
+ <property name="source.docs" value="${module.source}/docs"/>
+ <property name="source.xdocs" value="${module.source}/xdocs"/>
+
+ <!-- Where build generated files will go -->
+ <property name="build.metadata" value="${module.output}/metadata"/>
+ <property name="build.docs" value="${module.output}/docs"/>
+ <property name="build.xdocs" value="${module.output}/xdocs"/>
+ <property name="build.stylesheets" value="${module.output}/stylesheets"/>
+ <property name="build.html" value="${module.output}/html"/>
+ <property name="build.html.fancy" value="${build.html}/fancy"/>
+ <property name="build.html.plain" value="${build.html}/plain"/>
+ <property name="build.html.printable" value="${build.html}/printable"/>
+ <property name="build.pdf" value="${module.output}/pdf"/>
+ <property name="build.lib" value="${module.output}/lib"/>
+ <property name="build.reports" value="${module.output}/reports"/>
+
+ <!-- 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.2 -->
+ <property name="javac.target" 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>
+
+ <!-- Packages to include when generating api documentation -->
+ <property name="javadoc.packages" value="org.jboss.*"/>
+
+ <!-- Override JUnit defaults -->
+ <property name="junit.timeout" value="240000"/> <!-- 4 minutes -->
+ <property name="junit.batchtest.todir" value="${build.reports}"/>
+ <property name="junit.jvm.options" value="-Ddummy"/>
+ </target>
<!-- ================================================================== -->
@@ -234,22 +304,24 @@
<!-- ================================================================== -->
- <!-- Build Jars -->
+ <!-- Archives -->
<!-- ================================================================== -->
- <!-- Build all jar files. -->
+ <!--
+ | Build all jar files.
+ -->
<target name="jars" depends="docs" description="Builds all jar files.">
- <mkdir dir="${build.jars}"/>
+ <mkdir dir="${build.lib}"/>
- <war warfile="${build.jars}/manual.war"
+ <war warfile="${build.lib}/manual.war"
webxml="${build.metadata}/manual-web.xml">
<zipfileset prefix="HTML" dir="${build.html.fancy}"/>
<zipfileset prefix="printable" dir="${build.html.printable}"/>
</war>
- <ear earfile="${build.jars}/manual.ear"
+ <ear earfile="${build.lib}/manual.ear"
appxml="${build.metadata}/manual-application.xml">
- <fileset dir="${build.jars}">
+ <fileset dir="${build.lib}">
<include name="manual.war"/>
</fileset>
</ear>
@@ -257,7 +329,7 @@
<!-- ================================================================== -->
- <!-- Build documents -->
+ <!-- Documents -->
<!-- ================================================================== -->
<!--
@@ -384,76 +456,165 @@
<!-- ================================================================== -->
- <!-- Builds a release distribution. -->
+ <!-- Install -->
<!-- ================================================================== -->
- <target name="release" depends="all"
- description="Builds a release distribution.">
- <!-- Copy the output directory to the release directory -->
- <mkdir dir="${release.root}"/>
- <copy todir="${release.root}" filtering="no">
- <fileset dir="${module.build}">
+ <target name="install" depends="all">
+ <!-- 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="${release.id}/**"/>
+ <exclude name="${install.id}/**"/>
</fileset>
</copy>
</target>
+
+
+ <!-- ================================================================== -->
+ <!-- Release -->
+ <!-- ================================================================== -->
- <target name="release-archive-prepare" depends="release">
- <mkdir dir="${module.release}"/>
+ <!--
+ | Builds a release distribution.
+ -->
+
+ <target name="release" depends="install">
+ <!-- install handles most of the work -->
</target>
- <target name="release-zip" depends="release-archive-prepare"
+ <target name="release-zip" depends="release"
description="Builds a ZIP release distribution.">
- <zip zipfile="${release.archive.basename}.zip">
- <fileset dir="${module.release}">
+ <zip zipfile="${module.output}/${release.id}.zip">
+ <fileset dir="${module.output}">
<include name="${release.id}/**"/>
</fileset>
</zip>
</target>
- <target name="release-tar" depends="release-archive-prepare"
+ <target name="release-tar" depends="release"
description="Builds a TAR release distribution.">
- <tar tarfile="${release.archive.basename}.tar" longfile="gnu"
- basedir="${module.release}"
+ <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
+ basedir="${module.output}"
includes="${release.id}/**">
</tar>
</target>
<target name="release-tgz" depends="release-tar"
description="Builds a TAR-GZIP release distribution.">
- <gzip src="${release.archive.basename}.tar"
- zipfile="${release.archive.basename}.tgz"/>
+ <gzip src="${module.output}/${release.id}.tar"
+ zipfile="${module.output}/${release.id}.tgz"/>
</target>
<target name="release-all" depends="release-zip, release-tgz"
description="Builds a distribution for each archive type."/>
+ <!-- ================================================================== -->
+ <!-- Tests -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Run all tests.
+ -->
+
+ <target name="tests" depends="init" description="Execute all tests.">
+ <call target="tests-junit"/>
+ <call target="tests-reports"/>
+ </target>
+
+ <!--
+ | Run JUnit tests.
+ -->
+
+ <target name="tests-junit" depends="jars">
+ <mkdir dir="${build.reports}"/>
+ <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}"/>
+
+ <classpath>
+ <pathelement location="${build.classes}"/>
+ <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="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>
+
+
<!-- ================================================================== -->
- <!-- Cleans up generated stuff -->
+ <!-- Cleaning -->
<!-- ================================================================== -->
<!-- Clean up all build output -->
<target name="clean" depends="init"
description="Cleans up most generated files.">
- <delete dir="${module.build}"/>
- <delete dir="${module.release}"/>
<delete dir="${module.output}"/>
</target>
<!-- Clean up all generated files -->
<target name="clobber" depends="clean"
description="Cleans up all generated files.">
+ <delete file="${module.root}/local.properties"/>
<delete file="${module.root}/build.log"/>
</target>
<!-- ================================================================== -->
- <!-- Other Targets -->
+ <!-- Workspace -->
<!-- ================================================================== -->
+
+ <target name="update-project" depends="init">
+ <echo>Updating project workspace...</echo>
+ <cvs command="update -d" dest="${project.root}"/>
+ </target>
+
+ <target name="update-module" depends="init">
+ <echo>Updating module workspace...</echo>
+ <cvs command="update -d" dest="${module.root}"/>
+ </target>
+
- <target name="help">
+ <!-- ================================================================== -->
+ <!-- Help -->
+ <!-- ================================================================== -->
+
+ <target name="help" depends="init">
<projecthelp taskname="help">
<header><![CDATA[
The ${module.Name} module.
@@ -465,16 +626,18 @@
</projecthelp>
</target>
+
+ <!-- ================================================================== -->
+ <!-- Misc. -->
+ <!-- ================================================================== -->
+
<target name="main" depends="most"
description="Executes the default target (most)."/>
- <target name="all" depends="jars"
+ <target name="all" depends="jars, docs"
description="Builds everything."/>
<target name="most" depends="jars"
description="Builds almost everything."/>
-
- <target name="tests" depends="init"
- description="Execute all tests."/>
</project>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development