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