build.xml revision 1375
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanCDDL HEADER START
2cb6f28b3a12bb714bf14494d31eb6b6fff64b8bJakub HrozekThe contents of this file are subject to the terms of the
a7797068c4deb6ce2bdbcda27c45ff1bbb4a8e78Jakub HrozekCommon Development and Distribution License (the "License").
2cb6f28b3a12bb714bf14494d31eb6b6fff64b8bJakub HrozekYou may not use this file except in compliance with the License.
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanSee LICENSE.txt included in this distribution for the specific
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivanlanguage governing permissions and limitations under the License.
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanWhen distributing Covered Code, include this CDDL HEADER in each
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozekfile and include the License file at LICENSE.txt.
531661c7bb54eb71853977a64cb30f80c20b963eJakub HrozekIf applicable, add the following below this CDDL HEADER, with the
e59e09b5010f262228bbdeb92a79b733bf5854b3Stephen Gallagherfields enclosed by brackets "[]" replaced with your own identifying
a7797068c4deb6ce2bdbcda27c45ff1bbb4a8e78Jakub Hrozekinformation: Portions Copyright [yyyy] [name of copyright owner]
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen GallagherCDDL HEADER END
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanCopyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
7a14e8f66c0e932fe2954d792614a3b61d444bd1Jakub Hrozek<project name="OpenGrok" default="jar" basedir=".">
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <description>Builds, tests, and runs the project opengrok.</description>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <property name="build.sysclasspath" value="ignore"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property file="${user.home}/config/ant/${ant.project.name}.properties" />
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property file="${user.home}/config/ant/global.properties" />
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek <import file="nbproject/profiler-build-impl.xml"/> <!--
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek There exist several targets which are by default empty and which can be
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek used for execution of your tasks. These targets are usually executed
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek before and after some main targets. They are:
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -pre-init: called before initialization of project properties
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -post-init: called after initialization of project properties
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -pre-compile: called before javac compilation
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -post-compile: called after javac compilation
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -pre-compile-single: called before javac compilation of single file
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -post-compile-single: called after javac compilation of single file
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -pre-compile-test: called before javac compilation of JUnit tests
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -post-compile-test: called after javac compilation of JUnit tests
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -pre-compile-test-single: called before javac compilation of single JUnit test
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -post-compile-test-single: called after javac compilation of single JUunit test
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek -pre-jar: called before JAR building
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek -post-jar: called after JAR building
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek -post-clean: called after cleaning build products
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek (Targets beginning with '-' are not intended to be called on their own.)
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan Example of inserting an obfuscator after compilation could look like this:
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <target name="-post-compile">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <fileset dir="${build.classes.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan For list of available properties check the imported
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher Another way to customize the build is by overriding existing main targets.
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan The targets of interest are:
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -init-macrodef-javac: defines macro for javac compilation
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -init-macrodef-junit: defines macro for junit execution
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan -init-macrodef-debug: defines macro for class debugging
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -init-macrodef-java: defines macro for class execution
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek -do-jar-with-manifest: JAR building (if you are using a manifest)
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher -do-jar-without-manifest: JAR building (if you are not using a manifest)
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek run: execution of project
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek -javadoc-build: Javadoc generation
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek test-report: JUnit report generation
261cdde02b40aa8dabb3d69e43586a5a220647e9Jakub Hrozek An example of overriding the target for project execution could look like this:
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <target name="run" depends="opengrok-impl.jar">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <exec dir="bin" executable="launcher.exe">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <arg file="${dist.jar}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan Notice that the overridden target depends on the jar target and not only on
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan the compile target as the regular run target does. Again, for a list of available
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan properties which you can use, check the target you are overriding in the
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property name="version" value="0.12-dev"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property name="src.generatedsrc.dir" location="generatedsrc"/>
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <property name="findbugs.home" value="${user.home}/.ant/lib/findbugs"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <property name="checkstyle.home" value="${user.home}/.ant/lib/checkstyle"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <property name="pmd.home" value="${user.home}/.ant/lib/pmd"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property name="test.repositories" value="testdata/repositories"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <property name="test.sources" value="testdata/sources"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <property name="test.cvs" value="${test.repositories}/cvs"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property name="test.cvs.repo" value="${test.cvs}/cvsrepo"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property name="test.cvs.root" value="${test.cvs}/cvsroot"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <property name="test.hg" value="${test.repositories}/mercurial"/>
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <property name="test.svn" value="${test.repositories}/svn"/>
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <property name="test.razor" value="${test.repositories}/razor"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <available property="compileSystrayClient" classname="java.awt.TrayIcon"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="-exclude-client" unless="compileSystrayClient">
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <echo>JDK doesn't have java.awt.TrayIcon, excluding building of systray client ... </echo>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <property name="excludes" value="org/opensolaris/opengrok/management/client/**"/>
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <pathelement path="${findbugs.home}/lib/"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <available file="JFlex.jar" type="file" property="JFlex.present">
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek </available>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <fail unless="JFlex.present" message="Please download JFlex (http://jflex.de/) and put JFlex.jar it into /lib directory (or in ant classpath)."/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" classpathref="lib.search.path"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainXref.lex" destdir="${src.generatedsrc.dir}"/>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CXref.lex" destdir="${src.generatedsrc.dir}"/>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CxxSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CxxXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/fortran/FortranSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/fortran/FortranXref.lex" destdir="${src.generatedsrc.dir}"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/java/JavaSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/java/JavaXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/javascript/JavaScriptSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/javascript/JavaScriptXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/python/PythonSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/python/PythonXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/perl/PerlSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/perl/PerlXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/php/PhpSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/php/PhpXref.lex" destdir="${src.generatedsrc.dir}"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/lisp/LispSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/lisp/LispXref.lex" destdir="${src.generatedsrc.dir}"/>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/tcl/TclSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/tcl/TclXref.lex" destdir="${src.generatedsrc.dir}"/>
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainFullTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/XMLXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sql/SQLXref.lex" destdir="${src.generatedsrc.dir}"/>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sql/PLSQLXref.lex" destdir="${src.generatedsrc.dir}"/>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/document/TroffXref.lex" destdir="${src.generatedsrc.dir}"/>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/document/TroffFullTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sh/ShSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sh/ShXref.lex" destdir="${src.generatedsrc.dir}"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/vb/VBSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/vb/VBXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/csharp/CSharpSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/csharp/CSharpXref.lex" destdir="${src.generatedsrc.dir}"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <jflex file="${src.dir}/org/opensolaris/opengrok/search/context/HistoryLineTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <jflex file="${src.dir}/org/opensolaris/opengrok/search/context/PlainLineTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <!-- Get the id of the changeset we're building from using a
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher Mercurial command.
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher depends="-check-is-hg-repo" if="build.from.repo">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan failifexecutionfails="no"
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan outputproperty="changeset">
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <!-- Check if we build from a checked out copy of the repository,
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan so that we have history information from Mercurial available.
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher <available property="build.from.repo" file=".hg" type="dir"/>
7797e361155f7ce937085fd98e360469d7baf1b6Jakub Hrozek <!-- Get the id of the changeset we're building from by reading
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan .hg_archival.txt file created by hg archive. This will only
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher be used when we're not building from a checked out copy of
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher the repository, for example the source distribution.
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan depends="-check-is-hg-repo" unless="build.from.repo">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <tempfile property="hg.archival.temp" deleteonexit="true"/>
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <copy file=".hg_archival.txt" tofile="${hg.archival.temp}"/>
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <replaceregexp file="${hg.archival.temp}" flags="s"
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan match=".*node: ([0-9a-f]{12}).*"
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher replace="\1"/>
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher <loadfile srcFile="${hg.archival.temp}" property="changeset"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan depends="-get-changeset-from-command,-get-changeset-from-file">
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <mkdir dir="${build.classes.dir}/org/opensolaris/opengrok"/>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <propertyfile
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan file="${build.classes.dir}/org/opensolaris/opengrok/info.properties">
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <entry key="changeset" value="${changeset}"/>
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher </propertyfile>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <property name="coverage.dir" value="${basedir}/coverage"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <target name="-pre-compile" depends="jrcs,jflex,download-lucene"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek description="satisfy eclipse dependencies"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <antcall target="-delete-generated-repository-files"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <delete file="${file.reference.lucene-core.jar}"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <delete file="${file.reference.lucene-spellchecker.jar}"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek Create an empty manifest file so that nbproject/build-impl.xml
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek notices that a manifest should be added to the jar file
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <!-- no attributes, main-class and class-path will be added later -->
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <target name="-pre-init" depends="-touch-manifest, -exclude-client"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek Initialize a property holding a list of jar files on which
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <pathconvert property="opengrok.lib.files" pathsep=" ">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <flattenmapper/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek </pathconvert>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <!-- Update the manifest file with a classpath attribute -->
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <manifest file="${manifest.file}" mode="update">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek value="${opengrok.lib.files} lib/derbyclient.jar lib/derby.jar"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <target name="-pre-jar" depends="-update-manifest-classpath,-update-build-info"/>
a7797068c4deb6ce2bdbcda27c45ff1bbb4a8e78Jakub Hrozek Copy the jars from lib to dist/lib manually if we don't have
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek the copylibs task from NetBeans
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek unless="manifest.available+main.class+mkdist.available">
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <fileset dir="." includes="${opengrok.lib.files}"/>
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <target name="-check-lucene" description="Check that lucene jar files are present">
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <available file="${lucene-core.jar}" type="file" property="lucene-core.jar.present">
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek </available>
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <available file="${lucene-spellchecker.jar}" type="file" property="lucene-spellchecker.jar.present">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek </available>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <isset property="lucene-spellchecker.jar.present"/>
481ec0e1eb0058195732cb320845b41f6f4d43ebJakub Hrozek </condition>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <target name="download-lucene" depends="-check-lucene" if="lucene_not_downloaded">
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <get src="http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/${lucene.version}/${lucene-core.jar}"
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek dest="lib/${lucene-core.jar}" verbose="true" usetimestamp="true"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <get src="http://repo1.maven.org/maven2/org/apache/lucene/lucene-spellchecker/${lucene.version}/${lucene-spellchecker.jar}"
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek dest="lib/${lucene-spellchecker.jar}" verbose="true" usetimestamp="true"/>
ad805face83ba7d67b1cf2067a1982c7e63d1060Jakub Hrozek <target name="-post-jar" depends="-copy-lib-without-netbeans">
ad805face83ba7d67b1cf2067a1982c7e63d1060Jakub Hrozek <war destfile="${dist.war}" webxml="web/WEB-INF/web.xml">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <fileset dir="web" excludes="META-INF/context.xml"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <lib dir="${dist.dir}" includes="opengrok.jar"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <lib dir="${dist.dir}/lib" includes="*.jar" excludes="servlet-api.jar"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <java classname="org.opensolaris.opengrok.index.CommandLineOptions"
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek output="${dist.dir}/opengrok.1" failonerror="true" fork="true">
481ec0e1eb0058195732cb320845b41f6f4d43ebJakub Hrozek </classpath>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <exec os="SunOS" executable="/usr/bin/pkgmk" failonerror="true">
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <arg line="-o -d build -r . -v ${version} -f platform/solaris/pkgdef/prototype"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <exec os="SunOS" executable="/usr/bin/pkgtrans" failonerror="true">
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <arg line="-s build /dist/OSOLopengrok-${version}.pkg OSOLopengrok"/>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <tar destfile="${dist.dir}/${distname}-${version}.tar.gz"
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek compression="gzip">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <tarfileset dir="." prefix="${distname}-${version}/doc">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek </tarfileset>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <tarfileset dir="." prefix="${distname}-${version}/bin" mode="755">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek </tarfileset>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <tarfileset dir="doc" prefix="${distname}-${version}/doc">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek </tarfileset>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <tarfileset dir="${dist.dir}" prefix="${distname}-${version}/lib">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek </tarfileset>
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek <tarfileset dir="${dist.dir}" prefix="${distname}-${version}/man/man1">
a23014d69b56cbdf48ad05229c334648b5309d8fJakub Hrozek </tarfileset>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek<!-- <arg value="-p"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <arg value="${distname}-${version}-src"/> -->
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <arg value="${dist.dir}/${distname}-${version}-src.tar.gz"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="-check_findbugs" description="Check that findbugs jar files are present">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <available file="findbugs.jar" type="file" property="findbugs.jar.present">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <filepath refid="findbugs.lib.search.path"/>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <fail unless="findbugs.jar.present" message="Please install Findbugs findbugs.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <available file="findbugs-ant.jar" type="file" property="findbugs-ant.jar.present">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <filepath refid="findbugs.lib.search.path"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <fail unless="findbugs-ant.jar.present" message="Please install Findbugs findbugs-ant.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="findbugs" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate HTML output">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <findbugs projectname="OpenGrok" home="${findbugs.home}" output="html" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.html" jvmargs="-Xmx512m">
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <auxClasspath>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan </auxClasspath>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <class location="${dist.dir}/opengrok.jar" />
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="findbugs-xml" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate XML output">
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
056302a92862fda16351d7192600746746f38e5dStephen Gallagher <findbugs projectname="OpenGrok" home="${findbugs.home}" output="xml" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.xml" jvmargs="-Xmx512m">
e59e09b5010f262228bbdeb92a79b733bf5854b3Stephen Gallagher <auxClasspath>
056302a92862fda16351d7192600746746f38e5dStephen Gallagher </auxClasspath>
e59e09b5010f262228bbdeb92a79b733bf5854b3Stephen Gallagher <class location="${dist.dir}/opengrok.jar" />
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <target name="-check_checkstyle" description="Check that checkstyle jar files are present">
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <available file="checkstyle-all.jar" type="file" property="checkstyle.jar.present">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <filepath refid="checkstyle.lib.search.path"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <fail unless="checkstyle.jar.present" message="Please install checkstyle-all.jar in lib-directory (or in ant classpath) to run Checkstyle, see README."/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="checkstyle" depends="compile, -check_checkstyle" description="Run checkstyle on OpenGrok source code">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <taskdef resource="checkstyletask.properties" classpath="${checkstyle.home}/checkstyle-all.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <checkstyle config="checkstyle/style.xml" failOnViolation="false">
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <fileset dir="test" includes="**/*.java"/>
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher <formatter type="plain" toFile="checkstyle/checkstyle_errors.txt"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <formatter type="xml" toFile="checkstyle/checkstyle_errors.xml"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="-check_pmd" description="Check that pmd jar files are present">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <available file="pmd.jar" type="file" property="pmd.jar.present">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek </available>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <fail unless="pmd.jar.present" message="Please install pmd.jar in lib-directory (or in ant classpath) to run PMD, see README."/>
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <target name="pmd" depends="compile, -check_pmd" description="Run PMD on OpenGrok source code">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <pathelement location="${pmd.home}/lib/pmd.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <pathelement location="${pmd.home}/lib/jaxen.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <pathelement location="${pmd.home}/lib/asm.jar"/>
2cb6f28b3a12bb714bf14494d31eb6b6fff64b8bJakub Hrozek <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.lib"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <pmd failuresPropertyName="pmd.num.warnings" rulesetfiles="tools/pmd_ruleset.xml">
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <formatter type="html" toFile="pmd/pmd_report.html"/>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <formatter type="xml" toFile="pmd/pmd_report.xml"/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek<!-- <fileset dir="test" includes="**/*.java"/> -->
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek<!-- <fileset dir="web" includes="**/*.jsp"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <fileset dir="web" includes="**/*.jspf"/> -->
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <echo message="PMD finished, found ${pmd.num.warnings} warnings, see pmd/pmd_report.html"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="cpd-xml" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code, print output in xml">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <pathelement location="${pmd.home}/lib/pmd.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <pathelement location="${pmd.home}/lib/jaxen.jar"/>
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.lib"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <cpd minimumTokenCount="100" format="xml" outputFile="pmd/cpd_report.xml">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <target name="cpd" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code">
e5c33e0bd03a2deb8e5011deeb3ae93f960910eeJakub Hrozek <pathelement location="${pmd.home}/lib/pmd.jar"/>
e5c33e0bd03a2deb8e5011deeb3ae93f960910eeJakub Hrozek <pathelement location="${pmd.home}/lib/jaxen.jar"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.lib"/>
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher <cpd minimumTokenCount="100" outputFile="pmd/cpd_report.txt">
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <target name="-check_emma" description="Check that emma jar files are present">
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <available file="emma.jar" type="file" property="emma.jar.present">
0172959f117b545c8a6b1893f5f56818d82dd624Jakub Hrozek </available>
0172959f117b545c8a6b1893f5f56818d82dd624Jakub Hrozek <fail unless="emma.jar.present" message="Please install emma.jar in lib-directory (or in ant classpath) to run Emma, see README."/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <available file="emma_ant.jar" type="file" property="emma_ant.jar.present">
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek </available>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <fail unless="emma_ant.jar.present" message="Please install emma_ant.jar in lib-directory (or in ant classpath) to run Emma, see README."/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <target name="emma-instrument" depends="compile, -check_emma" description="Instruments the source code for Emma code coverage analysis">
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <taskdef resource="emma_ant.properties" classpathref="emma.lib"/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek metadatafile="${coverage.dir}/coverage.em"
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek mode="overwrite"
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek filter="+org.opensolaris.*,-org.opensolaris.opengrok.management.client.*"/>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <property name="test-sys-prop.emma.coverage.out.file" value="${coverage.dir}/coverage.ec"/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <property name="test-sys-prop.emma.coverage.out.merge" value="true"/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <!-- Change root in CVS test repository -->
0172959f117b545c8a6b1893f5f56818d82dd624Jakub Hrozek <!-- Strange indentation in line two levels below to get newline correctly -->
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <concat destfile="${test.cvs.repo}/CVS/Root" append="no" force="yes" eol="unix">${basedir}/${test.cvs.root}/
a9228ebcce14888b3123bdf46e610e0900bcd2ccJakub Hrozek <!-- Generate ZIP files used for unit testing mercurial/.hg and mercurial/.hgignore are renamed -->
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <copy file="${test.hg}/hgignore" tofile="${test.hg}/.hgignore"/>
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek <zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/index/source.zip"
0172959f117b545c8a6b1893f5f56818d82dd624Jakub Hrozek update="false"
0172959f117b545c8a6b1893f5f56818d82dd624Jakub Hrozek defaultexcludes="no"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/history/repositories.zip"
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher update="false"
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher defaultexcludes="no"/>
dd3ba5c5b7d2a9d109963ae9e6c94fff34872221Stephen Gallagher <antcall target="-delete-generated-repository-files"/>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <exec executable="svnadmin" failifexecutionfails="true">
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher <arg value="${build.test.reposroots}/svn"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <!-- need absolute path for svn url -->
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <path location="${build.test.reposroots}/svn"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan </pathconvert>
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <exec executable="svn" failifexecutionfails="false">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <exec executable="svn" failifexecutionfails="false">
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <fileset dir="ext/SampleRazorRepository/UserSandbox"/>
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <copy todir="${test.razor}/Razor-Simple/SimpleCProgram/.razor">
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek The support for binaries in Razor repositories is not fully
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan functional, so the next copy target is commented out for now.
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan <!--copy todir="${test.razor}/Razor-Simple/SimpleCProgram-BinaryRelease/.razor">
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan <fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <!-- clean up generated test repositories -->
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <target name="-delete-generated-repository-files">
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <delete file="${test.cvs.repo}/CVS/Root"/>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <target name="emma-report" description="Analyze" depends="-check_emma">
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher <taskdef resource="emma_ant.properties" classpathref="emma.lib"/>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <report sourcepath="${src.dir},${src.generatedsrc.dir}">
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <!-- collect all EMMA data dumps (metadata and runtime): -->
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <infileset dir="${coverage.dir}" includes="*.em, *.ec"/>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <txt outfile="${coverage.dir}/coverage.txt"/>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <xml outfile="${coverage.dir}/coverage.xml"/>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <html outfile="${coverage.dir}/index.html"/>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <target name="code-coverage" depends="clean, emma-instrument, test, emma-report" description="Make test code coverage reports based on the OpenGrok unit tests"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <target name="jdepend" depends="compile" description="Run JDepend dependency checking">
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <java classname="jdepend.xmlui.JDepend" failonerror="true" fork="true">
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <pathelement location="${user.home}/.ant/lib/jdepend/lib/jdepend.jar"/>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek </classpath>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek <java classname="jdepend.textui.JDepend" failonerror="true" fork="true">
481ec0e1eb0058195732cb320845b41f6f4d43ebJakub Hrozek <pathelement location="${user.home}/.ant/lib/jdepend/lib/jdepend.jar"/>
481ec0e1eb0058195732cb320845b41f6f4d43ebJakub Hrozek </classpath>
481ec0e1eb0058195732cb320845b41f6f4d43ebJakub Hrozek <!-- Generate HTML test report -->
481ec0e1eb0058195732cb320845b41f6f4d43ebJakub Hrozek <junitreport todir="${build.test.results.dir}">
524ceecc11f3d458eb3c1cf1489c3ff6ccb22226Jakub Hrozek </junitreport>
524ceecc11f3d458eb3c1cf1489c3ff6ccb22226Jakub Hrozek <!-- Build our patched JRCS library. -->
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <target name="jrcs" depends="-pre-pre-compile">
524ceecc11f3d458eb3c1cf1489c3ff6ccb22226Jakub Hrozek <javac srcdir="jrcs/src" destdir="${build.dir}/jrcs"
e5c33e0bd03a2deb8e5011deeb3ae93f960910eeJakub Hrozek <fileset dir="${build.dir}/jrcs" includes="**/*.class"/>
2cb6f28b3a12bb714bf14494d31eb6b6fff64b8bJakub Hrozek <!-- compile jsp - just to test -->
524ceecc11f3d458eb3c1cf1489c3ff6ccb22226Jakub Hrozek <property name="debuglevel" value="source,lines,vars" />
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek <property name="codebase" value="org/opensolaris/opengrok"/>
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek <property name="codebase.dot" value="org.opensolaris.opengrok"/>
531661c7bb54eb71853977a64cb30f80c20b963eJakub Hrozek </patternset>
0142e7e2558a887992b1c5d4dc3051178e377687Jakub Hrozek <!-- for the **/auth/* stuff, only -->
524ceecc11f3d458eb3c1cf1489c3ff6ccb22226Jakub Hrozek <include name="appserv-deployment-client.jar" />
5ee3fba0bd812242a1ffe189f5ddf2689e6e6811Jakub Hrozek <mkdir dir="${build.dir}/src/jsp/${codebase}/jsp" />
5ee3fba0bd812242a1ffe189f5ddf2689e6e6811Jakub Hrozek <srcfiles dir="${web.src.dir}" includes="**/*.jsp,**/*.jspf"/>
be5cc3c013ece0c957f2f8c28a217052227dfd07Jakub Hrozek to="${build.dir}/src/jsp/${codebase}/jsp/*_jsp.java"/>
5ee3fba0bd812242a1ffe189f5ddf2689e6e6811Jakub Hrozek <target name="-jsp.generate" depends="-jsp.check" unless="jsp.not.changed">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <taskdef name="jasper" classname="org.apache.jasper.JspC"
5ee3fba0bd812242a1ffe189f5ddf2689e6e6811Jakub Hrozek classpathref="classpath.jsp" />
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek outputdir="${build.dir}/src/jsp"
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek javaencoding="UTF-8"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek package="${codebase.dot}.jsp"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek compilersourcevm="1.6"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek compilertargetvm="1.6"
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek smapsuppressed="false"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek webxmlfragment="${build.dir}/src/servlets_web.xml"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <loadfile property="wdd" srcfile="${build.dir}/src/servlets_web.xml"/>
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <copy file="${web.src.dir}/WEB-INF/web.xml" todir="${build.dir}"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek overwrite="true">
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek value=" generated start -->${wdd}<!-- generated end " />
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek </filterset>
d25fa6f2608d5fe0617ada47f9d426f45deb96ffJakub Hrozek <target name="compile.jsp" depends="compile,-jsp.generate"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek description="--> compile java source code and jsp pages"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <javac srcdir="${build.dir}/src/jsp" destdir="${build.dir}/classes"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek includes="**/*.java"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek optimize="${optimize}" debug="${debug}" debuglevel="${debuglevel}"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek deprecation="${deprecation}" classpathref="classpath.jsp"
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek includeantruntime="false">
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <compilerarg value="-Xlint:unchecked" compiler="javac1.6"/>
f45a20d6ba9e8d695ec3ab707f0cc082999aa4a3Jakub Hrozek <target name="all" depends="clean,jar,compile.jsp,test,javadoc,pmd,findbugs-xml,checkstyle" />