diff options
-rw-r--r-- | java/build.xml | 20 | ||||
-rw-r--r-- | java/common.xml | 101 |
2 files changed, 111 insertions, 10 deletions
diff --git a/java/build.xml b/java/build.xml index b746cd0f71..440c361a29 100644 --- a/java/build.xml +++ b/java/build.xml @@ -60,11 +60,11 @@ <iterate target="compile-tests"/> </target> - <target name="test" description="execute unit tests"> + <target name="test" description="execute tests"> <iterate target="test"/> </target> - <target name="jar" description="create jars"> + <target name="jar" description="create module jars"> <iterate target="jar"/> </target> @@ -72,7 +72,7 @@ <iterate target="jar-tests"/> </target> - <target name="libs" description="copy dependencies into build directory"> + <target name="libs" description="copy dependencies into build tree"> <iterate target="libs"/> </target> @@ -102,7 +102,7 @@ <touch file="${qpid.jar}"/> </target> - <target name="build" description="build distribution"> + <target name="build" description="build the project"> <iterate target="build"/> <antcall target="manifest"/> </target> @@ -111,29 +111,29 @@ <mkdir dir="${release}"/> </target> - <target name="zip" depends="build,prepare" description="produce a zip archive of the distribution tree"> + <target name="zip" depends="build,prepare" description="build release archive"> <zip destfile="${release.zip}"> <zipfileset dir="${build}" prefix="${project.namever}" excludes="${release.excludes}"/> </zip> </target> - <target name="tar" depends="build,prepare" description="produce a tar archive of the distribution tree"> + <target name="tar" depends="build,prepare" description="build release archive"> <tar destfile="${release.tar}"> <tarfileset dir="${build}" prefix="${project.namever}" excludes="${release.excludes}"/> </tar> </target> - <target name="gzip" depends="tar" description="produce a gzipped tarball of the distribution tree"> + <target name="gzip" depends="tar" description="build release archive"> <gzip src="${release.tar}" destfile="${release.tgz}"/> </target> - <target name="bzip2" depends="tar" description="produze a bzipped tarball of the distribution tree"> + <target name="bzip2" depends="tar" description="build release archive"> <bzip2 src="${release.tar}" destfile="${release.bz2}"/> </target> - <target name="archive" depends="zip,gzip,bzip2" description="produce all archive formats of the distribution tree"/> + <target name="release" depends="zip,gzip,bzip2" description="build all release archives"/> - <target name="clean" description="remove all build artifacts"> + <target name="clean" description="remove build and release artifacts"> <iterate target="clean"/> <delete dir="${build}"/> <delete dir="${release}"/> diff --git a/java/common.xml b/java/common.xml index 5053bdd3aa..8f3475b715 100644 --- a/java/common.xml +++ b/java/common.xml @@ -94,4 +94,105 @@ </junitreport> </target> + <target name="help" description="display detailed build documentation"> + <echo> + ant build + + This target compiles all sources, creates java archives, and + copies scripts and configurations into the build directory: + + ${build} + + The build directory is treated as a live distro which this target + will incrementally update. Developers can put the build/bin + directory into their path in order to run any scripts or code + directly out of the live build: + + ${build.bin} + + ant test [ -Dtest=<pattern> ] [ report ] + + Execute unit tests and place the output in the build results + directory: + + ${build.results} + + All test output will be redirected to a file of the form: + + TEST-<class>.txt + + The same output is available using an xml file format: + + TEST-<class>.xml + + The test system property may be used to restrict the number of + tests run by a given invocation of the ant test target. The + following command will run just the MongooseTest test case: + + ant test -Dtest=MongooseTest + + In addition, patterns may be used to specify more than one test. + The following command will run both the MongooseTest and GooseTest + test cases: + + ant test -Dtest=*ooseTest + + If no test property is specified, the "ant test" target will + default to running all available tests for the project or module + depending on the current working directory. + + Finally it can be useful to append the report target in order to + generate an html summary of the tests that were just run. The + following command will run both the MongooseTest and GooseTest + test cases and generate an html summary of the results: + + ant test -Dtest=*ooseTest report + + See the documentation for the "ant report" target for more details + on the generated report. + + ant report + + The report target will generate an html summary of the current + test results into the report directory: + + ${build.report} + + The report target will operate on all results currently in the + build results directory. Results are not cleared unless the clean + target is used. This means that several consecutive test runs can + be summarized into a single report. The following commands will + produce a report summarizing both the MongooseTest and GooseTest + test cases: + + ant test -Dtest=MongooseTest + ... + ant test -Dtest=GooseTest + ... + ant report + + ant release + + The release target generates binary distribution archives and + places them into the release directory: + + ${release} + + ant clean + + The clean target removes build artifacts. When invoked from the + project root this target will remove the entire project build and + release directories: + + ${build} + and + ${release} + + When invoked from a specific module, the clean target will delete + that modules build root from underneath the project build root: + + ${build}/<module> + </echo> + </target> + </project> |