build.xml revision 3c390a5cd6f5baf2ceb8607d33fe66f93b7826ba
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye<?xml version="1.0" encoding="UTF-8"?>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye<!--
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond NorbyeCDDL HEADER START
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
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 Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond NorbyeSee LICENSE.txt included in this distribution for the specific
64b763950bf11e9357facbd2b5666631a895c085Trond Norbyelanguage governing permissions and limitations under the License.
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
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 Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond NorbyeCDDL HEADER END
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
fe80b749cd764b1f0f72b2f913b1fe10581911c3Knut Anders HatlenCopyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye-->
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" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property file="${user.home}/config/ant/global.properties" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <import file="nbproject/build-impl.xml"/>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <import file="nbproject/profiler-build-impl.xml"/> <!--
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
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
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
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye (Targets beginning with '-' are not intended to be called on their own.)
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye Example of inserting an obfuscator after compilation could look like this:
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <target name="-post-compile">
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <obfuscate>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <fileset dir="${build.classes.dir}"/>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye </obfuscate>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye </target>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye For list of available properties check the imported
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye nbproject/build-impl.xml file.
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye Another way to customize the build is by overriding existing main targets.
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye The targets of interest are:
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
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
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye An example of overriding the target for project execution could look like this:
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
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 </exec>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye </target>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
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
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye nbproject/build-impl.xml file.
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye -->
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye
0a0811923cbbd2976425db6f4c78eed811c2825bKnut Anders Hatlen <property name="version" value="0.12-dev"/>
b4c9214a3933505203cfad32e6a8d3ba86b0ada2Trond Norbye <property name="distname" value="opengrok"/>
a07b2874263e3c5f0cd2e83441719415d53059c2Knut Anders Hatlen <property name="src.dir" location="src"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <property name="src.generatedsrc.dir" location="generatedsrc"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <property name="findbugs.home" value="${user.home}/.ant/lib/findbugs"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <property name="checkstyle.home" value="${user.home}/.ant/lib/checkstyle"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <property name="pmd.home" value="${user.home}/.ant/lib/pmd"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco <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"/>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <property name="test.cvs.repo" value="${test.cvs}/cvsrepo"/>
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen <property name="test.cvs.root" value="${test.cvs}/cvsroot"/>
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen <property name="test.hg" value="${test.repositories}/mercurial"/>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <property name="test.svn" value="${test.repositories}/svn"/>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <property name="test.razor" value="${test.repositories}/razor"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco <available property="compileSystrayClient" classname="java.awt.TrayIcon"/>
0466de7c67573e1ce5e0733325c1e5383270f5d5Knut Anders Hatlen
0466de7c67573e1ce5e0733325c1e5383270f5d5Knut Anders Hatlen <target name="-exclude-client" unless="compileSystrayClient">
0466de7c67573e1ce5e0733325c1e5383270f5d5Knut Anders Hatlen <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/**"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco
1ed6b730409d4740e941142599767d5eac7e7d92Lubos Kosco <path id="lib.search.path">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <pathelement path="${user.home}/.ant/lib"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <pathelement path="${java.class.path}"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <pathelement path="lib"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement path="/lib"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </path>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <path id="findbugs.lib.search.path">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <pathelement path="${findbugs.home}/lib/"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <pathelement path="${java.class.path}"/>
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco <pathelement path="lib/findbugs/lib/"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </path>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <path id="checkstyle.lib.search.path">
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <pathelement path="${checkstyle.home}/"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <pathelement path="${java.class.path}"/>
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco </path>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <path id="pmd.lib.search.path">
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <pathelement path="${pmd.home}/lib/"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <pathelement path="${java.class.path}"/>
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco <pathelement path="lib/pmd/lib/"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik </path>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <available file="JFlex.jar" type="file" property="JFlex.present">
1ed6b730409d4740e941142599767d5eac7e7d92Lubos Kosco <filepath refid="lib.search.path"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </available>
1ed6b730409d4740e941142599767d5eac7e7d92Lubos Kosco <fail unless="JFlex.present" message="Please download JFlex (http://jflex.de/) and put JFlex.jar it into /lib directory (or in ant classpath)."/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik
4d93e73b35c5009898b59c9bd7e6629ac5942c2cLubos Kosco <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" classpathref="lib.search.path"/>
4d93e73b35c5009898b59c9bd7e6629ac5942c2cLubos Kosco <target name="jflex">
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <mkdir dir="${src.generatedsrc.dir}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainXref.lex" destdir="${src.generatedsrc.dir}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <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}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/javascript/JavaScriptSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
45909b3ef8c6e568a87482cb890fec7b5dbb7733Lubos 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}"/>
fcb68bae47907ba23c545e379c81c3ee6e19f778Lubos 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}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <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}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <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}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/vb/VBSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/vb/VBXref.lex" destdir="${src.generatedsrc.dir}"/>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/csharp/CSharpSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/csharp/CSharpXref.lex" destdir="${src.generatedsrc.dir}"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <jflex file="${src.dir}/org/opensolaris/opengrok/search/context/HistoryLineTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <jflex file="${src.dir}/org/opensolaris/opengrok/search/context/PlainLineTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen </target>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <property name="hg" value="hg"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye <!-- Get the id of the changeset we're building from using a
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye Mercurial command.
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye -->
3d35131df8607ae05b064219b9448afc5c4b550aKnut Anders Hatlen <target name="-get-changeset-from-command"
3d35131df8607ae05b064219b9448afc5c4b550aKnut Anders Hatlen depends="-check-is-hg-repo" if="build.from.repo">
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye <exec executable="${hg}"
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye failifexecutionfails="no"
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye outputproperty="changeset">
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <arg value="identify"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <arg value="--id"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen </exec>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
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.
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen -->
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <target name="-check-is-hg-repo">
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <available property="build.from.repo" file=".hg" type="dir"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen </target>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen
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
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye be used when we're not building from a checked out copy of
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye the repository, for example the source distribution.
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye -->
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <target name="-get-changeset-from-file"
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen depends="-check-is-hg-repo" unless="build.from.repo">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <tempfile property="hg.archival.temp" deleteonexit="true"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <copy file=".hg_archival.txt" tofile="${hg.archival.temp}"/>
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen <replaceregexp file="${hg.archival.temp}" flags="s"
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen match=".*node: ([0-9a-f]{12}).*"
a5cc1506d5c0704805c6733a46c7f1f8f91ae724Knut Anders Hatlen replace="\1"/>
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye <loadfile srcFile="${hg.archival.temp}" property="changeset"/>
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye </target>
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye <target name="-update-build-info"
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye 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">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <entry key="version" value="${version}"/>
d3aa2b921c67d952f62c82503575ea545e274d69Knut Anders Hatlen <entry key="changeset" value="${changeset}"/>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye </propertyfile>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco </target>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <property name="coverage.dir" value="${basedir}/coverage"/>
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen <target name="-pre-compile" depends="jrcs,jflex,download-lucene"/>
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <target name="-post-clean">
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <delete dir="${src.generatedsrc.dir}"/>
9cf297d9a579835e9336d587eaee187ca0954767Knut Anders Hatlen <delete file="${manifest.file}"/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <delete dir="${coverage.dir}"/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <antcall target="-delete-generated-repository-files"/>
9cf297d9a579835e9336d587eaee187ca0954767Knut Anders Hatlen </target>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <target name="clean-lib" depends="init">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <delete file="${file.reference.lucene-core.jar}"/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <delete file="${file.reference.lucene-spellchecker.jar}"/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen </target>
5a0c5ad4116f5a4dd0dd5a0a4e6d02973cd5eef9Lubos Kosco
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <!--
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 -->
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <target name="-touch-manifest">
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <!-- no attributes, main-class and class-path will be added later -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <manifest file="manifest.mf" mode="replace"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="-pre-init" depends="-touch-manifest, -exclude-client"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!--
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye Initialize a property holding a list of jar files on which
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen opengrok.jar depends
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen -->
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <target name="-post-init">
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <pathconvert property="opengrok.lib.files" pathsep=" ">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement path="${javac.classpath}"/>
752fbd3cf33aada419c8258959ff5574d2d2047dTrond Norbye </path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <flattenmapper/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <map from="" to="lib/"/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen </pathconvert>
7b046969a1b2565787df8ae3a8126359e8cd6fafTrond Norbye </target>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <!-- Update the manifest file with a classpath attribute -->
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <target name="-update-manifest-classpath">
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <manifest file="${manifest.file}" mode="update">
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen <attribute name="Class-Path"
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen value="${opengrok.lib.files} lib/derbyclient.jar lib/derby.jar"/>
2dbc1835e0ae88ad102e2b9a85e5c7b5298b14b6Knut Anders Hatlen </manifest>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="-pre-jar" depends="-update-manifest-classpath,-update-build-info"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!--
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye Copy the jars from lib to dist/lib manually if we don't have
9cf297d9a579835e9336d587eaee187ca0954767Knut Anders Hatlen the copylibs task from NetBeans
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye -->
9cf297d9a579835e9336d587eaee187ca0954767Knut Anders Hatlen <target name="-copy-lib-without-netbeans"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye unless="manifest.available+main.class+mkdist.available">
2c2a50fade805afbf4a5a880a38648613d7e01aeLubos Kosco <copy todir="${dist.dir}/lib">
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <fileset file="${file.reference.ant.jar}"/>
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye </copy>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <copy todir="${dist.dir}">
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye <fileset dir="." includes="${opengrok.lib.files}"/>
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye </copy>
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye </target>
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye <path id="plainlib.search.path">
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye <pathelement path="lib"/>
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye <pathelement path="/lib"/>
523201f786f6b12b7cf54091c6e5be167878cbeeTrond Norbye </path>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
0a0811923cbbd2976425db6f4c78eed811c2825bKnut Anders Hatlen <target name="-check-lucene" description="Check that lucene jar files are present">
0a0811923cbbd2976425db6f4c78eed811c2825bKnut Anders Hatlen <available file="${lucene-core.jar}" type="file" property="lucene-core.jar.present">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <filepath refid="plainlib.search.path"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </available>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <available file="${lucene-spellchecker.jar}" type="file" property="lucene-spellchecker.jar.present">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <filepath refid="plainlib.search.path"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </available>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <condition property="lucene_not_downloaded">
0a0811923cbbd2976425db6f4c78eed811c2825bKnut Anders Hatlen <not>
a07b2874263e3c5f0cd2e83441719415d53059c2Knut Anders Hatlen <and>
a07b2874263e3c5f0cd2e83441719415d53059c2Knut Anders Hatlen <isset property="lucene-core.jar.present"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <isset property="lucene-core.jar.present"/>
a07b2874263e3c5f0cd2e83441719415d53059c2Knut Anders Hatlen </and>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </not>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </condition>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="download-lucene" depends="-check-lucene" if="lucene_not_downloaded">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <get src="http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/${lucene.version}/${lucene-core.jar}"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye dest="lib/${lucene-core.jar}" verbose="true" usetimestamp="true"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <get src="http://repo1.maven.org/maven2/org/apache/lucene/lucene-spellchecker/${lucene.version}/${lucene-spellchecker.jar}"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye dest="lib/${lucene-spellchecker.jar}" verbose="true" usetimestamp="true"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="-post-jar" depends="-copy-lib-without-netbeans">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <war destfile="${dist.war}" webxml="web/WEB-INF/web.xml">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="web" excludes="META-INF/context.xml"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <lib dir="${dist.dir}" includes="opengrok.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <lib dir="${dist.dir}/lib" includes="*.jar" excludes="servlet-api.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </war>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <echo message="Generating man page.."/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <java classname="org.opensolaris.opengrok.index.CommandLineOptions"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye output="${dist.dir}/opengrok.1" failonerror="true" fork="true">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <classpath>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement location="dist/opengrok.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement path="${java.class.path}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </classpath>
a07b2874263e3c5f0cd2e83441719415d53059c2Knut Anders Hatlen </java>
a07b2874263e3c5f0cd2e83441719415d53059c2Knut Anders Hatlen </target>
edcb01bf549171673fd0bb4239f2edfc7a810397Knut Anders Hatlen
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="package" depends="jar">
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>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <exec os="SunOS" executable="/usr/bin/pkgtrans" failonerror="true">
a7f25b0d188e4ea80ddcabf3ac52ade1bdb4ebecLubos Kosco <arg line="-s build /dist/OSOLopengrok-${version}.pkg OSOLopengrok"/>
a7f25b0d188e4ea80ddcabf3ac52ade1bdb4ebecLubos Kosco </exec>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
edcb01bf549171673fd0bb4239f2edfc7a810397Knut Anders Hatlen <target name="dist" depends="jar">
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik <tar destfile="${dist.dir}/${distname}-${version}.tar.gz"
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik compression="gzip">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <tarfileset dir="." prefix="${distname}-${version}/doc">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="README.txt"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="CHANGES.txt"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <include name="LICENSE.txt"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="NOTICE.txt"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="paths.tsv"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="logging.properties"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </tarfileset>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <tarfileset dir="." prefix="${distname}-${version}/bin" mode="755">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="OpenGrok"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </tarfileset>
52cf1d63b1f1b231ff1e86eca2058d88560579b5Lubos Kosco <tarfileset dir="doc" prefix="${distname}-${version}/doc">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="EXAMPLE.txt"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik </tarfileset>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <tarfileset dir="${dist.dir}" prefix="${distname}-${version}/lib">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="opengrok.jar"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <include name="source.war"/>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik <include name="lib/*"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <exclude name="lib/servlet-api.jar"/>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik </tarfileset>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik <tarfileset dir="${dist.dir}" prefix="${distname}-${version}/man/man1">
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik <include name="opengrok.1"/>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik </tarfileset>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik </tar>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik </target>
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik <target name="dist-src" depends="init">
85e0595857351c6e22f75b8928967d14cb679ac5Jorgen Austvik <mkdir dir="${dist.dir}"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <exec executable="hg">
52cf1d63b1f1b231ff1e86eca2058d88560579b5Lubos Kosco <arg value="archive"/>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <arg value="-t"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik <arg value="tgz"/>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik<!-- <arg value="-p"/>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <arg value="${distname}-${version}-src"/> -->
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <arg value="${dist.dir}/${distname}-${version}-src.tar.gz"/>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye </exec>
c7eb123c8b2081a261deff3c401fbf92ddba1b58Jorgen Austvik </target>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <target name="-check_findbugs" description="Check that findbugs jar files are present">
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <available file="findbugs.jar" type="file" property="findbugs.jar.present">
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <filepath refid="findbugs.lib.search.path"/>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye </available>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <fail unless="findbugs.jar.present" message="Please install Findbugs findbugs.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <available file="findbugs-ant.jar" type="file" property="findbugs-ant.jar.present">
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye <filepath refid="findbugs.lib.search.path"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik </available>
49f592091468eac515dde6139fbc8efa26056b0aJorgen 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"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik </target>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <target name="findbugs" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate HTML output">
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <path id="findbugs.lib" >
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik </path>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
45cf976b01987ad147e9edb54ffab0938dd6c016Trond Norbye <mkdir dir="findbugs"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <findbugs projectname="OpenGrok" home="${findbugs.home}" output="html" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.html" jvmargs="-Xmx512m">
54ba62a2c6e74332ffc742cb23faf21615b5d39fLubos Kosco <auxClasspath>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <fileset dir="${dist.dir}/lib/">
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik <include name="*.jar"/>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik </fileset>
49f592091468eac515dde6139fbc8efa26056b0aJorgen Austvik </auxClasspath>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <sourcePath path="src" />
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <class location="${dist.dir}/opengrok.jar" />
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik </findbugs>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik </target>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <target name="findbugs-xml" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate XML output">
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <path id="findbugs.lib" >
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik </path>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <mkdir dir="findbugs"/>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <findbugs projectname="OpenGrok" home="${findbugs.home}" output="xml" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.xml" jvmargs="-Xmx512m">
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <auxClasspath>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <fileset dir="${dist.dir}/lib/">
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <include name="*.jar"/>
1e13442ac5687540ace78411d98155fca4b3791eKnut Anders Hatlen </fileset>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik </auxClasspath>
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <sourcePath path="src" />
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <class location="${dist.dir}/opengrok.jar" />
fcb68bae47907ba23c545e379c81c3ee6e19f778Lubos Kosco </findbugs>
fcb68bae47907ba23c545e379c81c3ee6e19f778Lubos Kosco </target>
fcb68bae47907ba23c545e379c81c3ee6e19f778Lubos Kosco
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <target name="-check_checkstyle" description="Check that checkstyle jar files are present">
2ef63dc9adc693ddad2206d323b0a85a1afe70ecJorgen Austvik <available file="checkstyle-all.jar" type="file" property="checkstyle.jar.present">
945f4c3c36a15447913781dfb1894b34f2941c57Jorgen Austvik <filepath refid="checkstyle.lib.search.path"/>
1f17ba9e3c026d75f488227451416bd72a222afeTrond Norbye </available>
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <fail unless="checkstyle.jar.present" message="Please install checkstyle-all.jar in lib-directory (or in ant classpath) to run Checkstyle, see README."/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <target name="checkstyle" depends="compile, -check_checkstyle" description="Run checkstyle on OpenGrok source code">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <taskdef resource="checkstyletask.properties" classpath="${checkstyle.home}/checkstyle-all.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <checkstyle config="checkstyle/style.xml" failOnViolation="false">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="src" includes="**/*.java"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="test" includes="**/*.java"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <formatter type="plain"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <formatter type="plain" toFile="checkstyle/checkstyle_errors.txt"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <formatter type="xml" toFile="checkstyle/checkstyle_errors.xml"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </checkstyle>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <target name="-check_pmd" description="Check that pmd jar files are present">
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <available file="pmd.jar" type="file" property="pmd.jar.present">
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <filepath refid="pmd.lib.search.path"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </available>
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <fail unless="pmd.jar.present" message="Please install pmd.jar in lib-directory (or in ant classpath) to run PMD, see README."/>
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="pmd" depends="compile, -check_pmd" description="Run PMD on OpenGrok source code">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path id="pmd.lib" >
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement location="${pmd.home}/lib/pmd.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement location="${pmd.home}/lib/jaxen.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.lib"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <mkdir dir="pmd"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pmd targetjdk="1.6" failuresPropertyName="pmd.num.warnings" rulesetfiles="tools/pmd_ruleset.xml">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <formatter type="html" toFile="pmd/pmd_report.html"/>
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <formatter type="xml" toFile="pmd/pmd_report.xml"/>
30637745bf5a7db2ff9684a2536cc9f8c9df2218Lubos Kosco <fileset dir="src" includes="**/*.java"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik<!-- <fileset dir="test" includes="**/*.java"/> -->
f09d46eefeb5e4db6dc11e02e417b448fa9362a9Jorgen Austvik<!-- <fileset dir="web" includes="**/*.jsp"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <fileset dir="web" includes="**/*.jspf"/> -->
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </pmd>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <echo message="PMD finished, found ${pmd.num.warnings} warnings, see pmd/pmd_report.html"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </target>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <target name="cpd-xml" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code, print output in xml">
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <path id="pmd.lib" >
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <pathelement location="${pmd.home}/lib/pmd.jar"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <pathelement location="${pmd.home}/lib/jaxen.jar"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik </path>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.lib"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <cpd minimumTokenCount="100" format="xml" outputFile="pmd/cpd_report.xml">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <fileset dir="src">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <include name="**/*.java"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </fileset>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <fileset dir="test">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <include name="**/*.java"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </fileset>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </cpd>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </target>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik
63e0f31920b0818d6f471a066c12da991fb35346Trond Norbye <target name="cpd" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <path id="pmd.lib" >
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <pathelement location="${pmd.home}/lib/pmd.jar"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <pathelement location="${pmd.home}/lib/jaxen.jar"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </path>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.lib"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <cpd minimumTokenCount="100" outputFile="pmd/cpd_report.txt">
ede8ae04a015c7d2ae4916e5bb36813b81cb7c30Jorgen Austvik <fileset dir="src">
49180e08afc7cf03413ab108bc71c14e9de1a880Jorgen Austvik <include name="**/*.java"/>
ede8ae04a015c7d2ae4916e5bb36813b81cb7c30Jorgen Austvik </fileset>
afb218f076cae538126a5f931299a82a114a075aKnut Anders Hatlen <fileset dir="test">
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <include name="**/*.java"/>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik </fileset>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik </cpd>
2f93a8465131cf5f18613f02f25a3663575bfe57Lubos Kosco </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
629f5f1dc42d96d37676b093b89f011f143dad0aJorgen Austvik <target name="-check_emma" description="Check that emma jar files are present">
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <available file="emma.jar" type="file" property="emma.jar.present">
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <filepath refid="lib.search.path"/>
629f5f1dc42d96d37676b093b89f011f143dad0aJorgen Austvik </available>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <fail unless="emma.jar.present" message="Please install emma.jar in lib-directory (or in ant classpath) to run Emma, see README."/>
629f5f1dc42d96d37676b093b89f011f143dad0aJorgen Austvik
d5734522e5d6f8e329d005a0f93f8c2f30df9516Trond Norbye <available file="emma_ant.jar" type="file" property="emma_ant.jar.present">
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik <filepath refid="lib.search.path"/>
d5734522e5d6f8e329d005a0f93f8c2f30df9516Trond Norbye </available>
d5734522e5d6f8e329d005a0f93f8c2f30df9516Trond Norbye <fail unless="emma_ant.jar.present" message="Please install emma_ant.jar in lib-directory (or in ant classpath) to run Emma, see README."/>
629f5f1dc42d96d37676b093b89f011f143dad0aJorgen Austvik </target>
780cc7d1b57609ff15fb283201e93cb501ebe9e6Jorgen Austvik
629f5f1dc42d96d37676b093b89f011f143dad0aJorgen Austvik <target name="emma-instrument" depends="compile, -check_emma" description="Instruments the source code for Emma code coverage analysis">
d5734522e5d6f8e329d005a0f93f8c2f30df9516Trond Norbye <path id="emma.lib" >
d5734522e5d6f8e329d005a0f93f8c2f30df9516Trond Norbye <pathelement location="lib/emma.jar"/>
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen <pathelement location="lib/emma_ant.jar"/>
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen </path>
afb218f076cae538126a5f931299a82a114a075aKnut Anders Hatlen <taskdef resource="emma_ant.properties" classpathref="emma.lib"/>
afb218f076cae538126a5f931299a82a114a075aKnut Anders Hatlen <mkdir dir="${coverage.dir}" />
afb218f076cae538126a5f931299a82a114a075aKnut Anders Hatlen <emma enabled="true">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <instr instrpath="build/classes"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye metadatafile="${coverage.dir}/coverage.em"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye mode="overwrite"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye filter="+org.opensolaris.*,-org.opensolaris.opengrok.management.client.*"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </emma>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
bcae302a5f4b516d2f3c05f657df054e1a0efde7Knut Anders Hatlen <target name="-pre-compile-test">
bcae302a5f4b516d2f3c05f657df054e1a0efde7Knut Anders Hatlen <property name="test-sys-prop.emma.coverage.out.file" value="${coverage.dir}/coverage.ec"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="test-sys-prop.emma.coverage.out.merge" value="true"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="-post-compile-test">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <antcall target="-create-svn-repository"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <antcall target="-create-razor-repository"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- Change root in CVS test repository -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- Strange indentation in line two levels below to get newline correctly -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <concat destfile="${test.cvs.repo}/CVS/Root" append="no" force="yes" eol="unix">${basedir}/${test.cvs.root}/
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </concat>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- Generate ZIP files used for unit testing mercurial/.hg and mercurial/.hgignore are renamed -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <copy todir="${test.hg}/.hg">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="${test.hg}/hg"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </copy>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <copy file="${test.hg}/hgignore" tofile="${test.hg}/.hgignore"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/index/source.zip"
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik basedir="${test.sources}"
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik update="false"
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen defaultexcludes="no"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/history/repositories.zip"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye basedir="${test.repositories}"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye excludes="mercurial/hg/**, mercurial/hgignore"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye update="false"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye defaultexcludes="no"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <antcall target="-delete-generated-repository-files"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen </target>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <target name="-create-svn-repository">
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <delete dir="${test.svn}"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <delete dir="${build.test.reposroots}/svn"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <mkdir dir="${build.test.reposroots}"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <exec executable="svnadmin" failifexecutionfails="true">
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <arg value="create"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <arg value="${build.test.reposroots}/svn"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen </exec>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <!-- need absolute path for svn url -->
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen <pathconvert property="test.svn.url">
d3d2404f9a49bf70b124053feabe666f85ef5361Knut Anders Hatlen <map from="" to="file://"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path location="${build.test.reposroots}/svn"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </pathconvert>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <exec executable="svn" failifexecutionfails="false">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <arg value="import"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <arg value="${test.sources}"/>
7b9f9a1761f76744fc3772181877d5e301f122adKnut Anders Hatlen <arg value="${test.svn.url}"/>
7ecd52b03dc1f0b03ff8f522b4891c8531896c3dJorgen Austvik <arg value="-m"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <arg value="Initial import"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </exec>
4c0668d038ecec0f5f4f4cc3d7a177d8e118c955Knut Anders Hatlen <exec executable="svn" failifexecutionfails="false">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <arg value="checkout"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <arg value="${test.svn.url}"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <arg value="${test.svn}"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </exec>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik </target>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <target name="-create-razor-repository">
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <delete dir="${test.razor}"/>
2e3c025fdd5908a27cc82eb1d5346368a8be4e0dJorgen Austvik <copy todir="${test.razor}/Razor-Simple">
4b08e2231abb7a3b44ab9255eca7963e6309aba4Jorgen Austvik <fileset dir="ext/SampleRazorRepository/UserSandbox"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik </copy>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <copy todir="${test.razor}/Razor-Simple/SimpleCProgram/.razor">
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik </copy>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <!--
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik The support for binaries in Razor repositories is not fully
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik functional, so the next copy target is commented out for now.
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik -->
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <!--copy todir="${test.razor}/Razor-Simple/SimpleCProgram-BinaryRelease/.razor">
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik </copy-->
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik </target>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <!-- clean up generated test repositories -->
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <target name="-delete-generated-repository-files">
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <delete dir="${test.hg}/.hg"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <delete file="${test.hg}/.hgignore"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <delete dir="${test.svn}"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <delete dir="${test.razor}"/>
92ed85d851c9108d821e93d3aacc9faf3588e17eJorgen Austvik <delete file="${test.cvs.repo}/CVS/Root"/>
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen </target>
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <target name="emma-report" description="Analyze" depends="-check_emma">
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <taskdef resource="emma_ant.properties" classpathref="emma.lib"/>
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <emma enabled="true" >
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <report sourcepath="${src.dir},${src.generatedsrc.dir}">
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <!-- collect all EMMA data dumps (metadata and runtime): -->
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <infileset dir="${coverage.dir}" includes="*.em, *.ec"/>
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <txt outfile="${coverage.dir}/coverage.txt"/>
8a667c39dc64db336c7bd14db6bde1e38fb5c117Knut Anders Hatlen <xml outfile="${coverage.dir}/coverage.xml"/>
d3aa2b921c67d952f62c82503575ea545e274d69Knut Anders Hatlen <html outfile="${coverage.dir}/index.html"/>
d3aa2b921c67d952f62c82503575ea545e274d69Knut Anders Hatlen </report>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </emma>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
6ba6a49186aff8de4dc5251195b9917021b5ee69Knut Anders Hatlen
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="code-coverage" depends="clean, emma-instrument, test, emma-report" description="Make test code coverage reports based on the OpenGrok unit tests"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="jdepend" depends="compile" description="Run JDepend dependency checking">
d3aa2b921c67d952f62c82503575ea545e274d69Knut Anders Hatlen <mkdir dir="jdepend"/>
d3aa2b921c67d952f62c82503575ea545e274d69Knut Anders Hatlen <java classname="jdepend.xmlui.JDepend" failonerror="true" fork="true">
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <arg value="-file"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <arg value="jdepend/report.xml"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <arg value="${build.classes.dir}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <classpath>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement location="${user.home}/.ant/lib/jdepend/lib/jdepend.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement path="${java.class.path}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </classpath>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </java>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <java classname="jdepend.textui.JDepend" failonerror="true" fork="true">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <arg value="-file"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <arg value="jdepend/report.txt"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <arg value="${build.classes.dir}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <classpath>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <pathelement location="${user.home}/.ant/lib/jdepend/lib/jdepend.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <pathelement path="${java.class.path}"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </classpath>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </java>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- Generate HTML test report -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target depends="init" name="test-report">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <junitreport todir="${build.test.results.dir}">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="${build.test.results.dir}">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="TEST-*.xml"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </fileset>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <report todir="${build.test.results.dir}"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </junitreport>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- Build our patched JRCS library. -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <target name="jrcs" depends="-pre-pre-compile">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <mkdir dir="${build.dir}/jrcs"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <javac srcdir="jrcs/src" destdir="${build.dir}/jrcs"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye nowarn="on" source="1.4"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <jar destfile="${file.reference.jrcs.jar}">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="${build.dir}/jrcs" includes="**/*.class"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </jar>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </target>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- compile jsp - just to test -->
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="debug" value="on" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="jsdebug" value="off" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="compress" value=".gz" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="debuglevel" value="source,lines,vars" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="optimize" value="on" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="deprecation" value="on" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="listfiles" value="true" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="codebase" value="org/opensolaris/opengrok"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="codebase.dot" value="org.opensolaris.opengrok"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="web.src.dir" location="web" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <patternset id="libs">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="*.jar" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </patternset>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path id="classpath.base">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="lib">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <patternset refid="libs" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </fileset>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <property name="AS_HOME" value="glassfish"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path id="classpath.j2ee">
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <fileset dir="${AS_HOME}/modules">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="javaee.jar" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <!-- for the **/auth/* stuff, only -->
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <include name="appserv-rt.jar" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="appserv-deployment-client.jar" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </fileset>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path id="classpath.jspc">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <fileset dir="${AS_HOME}/modules">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="javax.servlet.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="javax.servlet.jsp.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="jsp-impl.jar"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <include name="el-impl.jar"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <include name="javax.servlet.jsp.jstl.jar"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <include name="jstl-impl.jar"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <include name="jsf-api.jar"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <include name="jsf-impl.jar"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <include name="tools.jar"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </fileset>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </path>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <path id="classpath.web">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path refid="classpath.j2ee"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path refid="classpath.base"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path id="classpath.jsp">
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <path refid="classpath.jspc"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <path refid="classpath.web"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye </path>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <target name="-jsp.check" depends="init">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <mkdir dir="${build.dir}/src/jsp/${codebase}/jsp" />
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <uptodate property="jsp.not.changed">
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <srcfiles dir="${web.src.dir}" includes="**/*.jsp,**/*.jspf"/>
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <mapper type="glob" from="*.jsp"
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner to="${build.dir}/src/jsp/${codebase}/jsp/*_jsp.java"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </uptodate>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner </target>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <target name="-jsp.generate" depends="-jsp.check" unless="jsp.not.changed">
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <taskdef name="jasper" classname="org.apache.jasper.JspC"
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye classpathref="classpath.jsp" />
d4ce228a333ba2daa19ad8b0672a704c8e42a2dcTrond Norbye <mkdir dir="${build.dir}/src/web"/>
7e33e87b7d6c9a61ff11d23e37c02274b1223ce1Jens Elkner <copy todir="${build.dir}/src/web">
64b763950bf11e9357facbd2b5666631a895c085Trond Norbye <fileset dir="${web.src.dir}">
<include name="**/*.jsp"/>
<include name="**/*.jspf"/>
<include name="**/index_body.html"/>
</fileset>
</copy>
<jasper validateXml="false"
outputdir="${build.dir}/src/jsp"
javaencoding="UTF-8"
uriroot="${build.dir}/src/web"
package="${codebase.dot}.jsp"
compilersourcevm="1.6"
compilertargetvm="1.6"
smapsuppressed="false"
webxmlfragment="${build.dir}/src/servlets_web.xml"
/>
<loadfile property="wdd" srcfile="${build.dir}/src/servlets_web.xml"/>
<copy file="${web.src.dir}/WEB-INF/web.xml" todir="${build.dir}"
overwrite="true">
<filterset>
<filter token="generated servlet mappings"
value=" generated start -->${wdd}&lt;!-- generated end " />
</filterset>
</copy>
</target>
<target name="compile.jsp" depends="compile,-jsp.generate"
description="--> compile java source code and jsp pages"
>
<javac srcdir="${build.dir}/src/jsp" destdir="${build.dir}/classes"
includes="**/*.java"
optimize="${optimize}" debug="${debug}" debuglevel="${debuglevel}"
deprecation="${deprecation}" classpathref="classpath.jsp"
encoding="UTF-8" listfiles="${listfiles}"
includeantruntime="false">
<compilerarg value="-Xlint:unchecked" compiler="javac1.6"/>
</javac>
</target>
<target name="all" depends="clean,jar,compile.jsp,test,javadoc,pmd,findbugs-xml,checkstyle" />
</project>