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