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