build.xml revision fe80b749cd764b1f0f72b2f913b1fe10581911c3
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringCDDL HEADER START
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringThe contents of this file are subject to the terms of the
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringCommon Development and Distribution License (the "License").
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringYou may not use this file except in compliance with the License.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringSee LICENSE.txt included in this distribution for the specific
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringlanguage governing permissions and limitations under the License.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringWhen distributing Covered Code, include this CDDL HEADER in each
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringfile and include the License file at LICENSE.txt.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringIf applicable, add the following below this CDDL HEADER, with the
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringfields enclosed by brackets "[]" replaced with your own identifying
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringinformation: Portions Copyright [yyyy] [name of copyright owner]
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringCDDL HEADER END
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringCopyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering<project name="OpenGrok" default="jar" basedir=".">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <description>Builds, tests, and runs the project opengrok.</description>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <import file="nbproject/build-impl.xml"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <import file="nbproject/profiler-build-impl.xml"/> <!--
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering There exist several targets which are by default empty and which can be
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering used for execution of your tasks. These targets are usually executed
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering before and after some main targets. They are:
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -pre-init: called before initialization of project properties
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-init: called after initialization of project properties
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -pre-compile: called before javac compilation
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-compile: called after javac compilation
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -pre-compile-single: called before javac compilation of single file
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-compile-single: called after javac compilation of single file
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -pre-compile-test: called before javac compilation of JUnit tests
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-compile-test: called after javac compilation of JUnit tests
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -pre-compile-test-single: called before javac compilation of single JUnit test
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-compile-test-single: called after javac compilation of single JUunit test
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -pre-jar: called before JAR building
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-jar: called after JAR building
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -post-clean: called after cleaning build products
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering (Targets beginning with '-' are not intended to be called on their own.)
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Example of inserting an obfuscator after compilation could look like this:
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-post-compile">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <fileset dir="${build.classes.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering For list of available properties check the imported
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Another way to customize the build is by overriding existing main targets.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering The targets of interest are:
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -init-macrodef-javac: defines macro for javac compilation
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -init-macrodef-junit: defines macro for junit execution
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -init-macrodef-debug: defines macro for class debugging
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -init-macrodef-java: defines macro for class execution
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -do-jar-with-manifest: JAR building (if you are using a manifest)
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -do-jar-without-manifest: JAR building (if you are not using a manifest)
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering run: execution of project
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering -javadoc-build: Javadoc generation
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering test-report: JUnit report generation
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering An example of overriding the target for project execution could look like this:
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="run" depends="opengrok-impl.jar">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <exec dir="bin" executable="launcher.exe">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <arg file="${dist.jar}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Notice that the overridden target depends on the jar target and not only on
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering the compile target as the regular run target does. Again, for a list of available
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering properties which you can use, check the target you are overriding in the
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="distname" value="opengrok"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="findbugs.home" value="${user.home}/.ant/lib/findbugs"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="checkstyle.home" value="${user.home}/.ant/lib/checkstyle"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="pmd.home" value="${user.home}/.ant/lib/pmd"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.repositories" value="testdata/repositories"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.sources" value="testdata/sources"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.cvs" value="${test.repositories}/cvs"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.cvs.repo" value="${test.cvs}/cvsrepo"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.cvs.root" value="${test.cvs}/cvsroot"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.hg" value="${test.repositories}/mercurial"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.svn" value="${test.repositories}/svn"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="test.razor" value="${test.repositories}/razor"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <available property="compileSystrayClient" classname="java.awt.TrayIcon"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-exclude-client" unless="compileSystrayClient">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <echo>JDK doesn't have java.awt.TrayIcon, excluding building of systray client ... </echo>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="excludes" value="org/opensolaris/opengrok/management/client/**"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathelement path="${user.home}/.ant/lib"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathelement path="${findbugs.home}/lib/"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathelement path="${checkstyle.home}/"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <available file="JFlex.jar" type="file" property="JFlex.present">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <fail unless="JFlex.present" message="Please download JFlex (http://jflex.de/) and put JFlex.jar it into /lib directory (or in ant classpath)."/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" classpathref="lib.search.path"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CxxSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/c/CxxXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/fortran/FortranSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/fortran/FortranXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/java/JavaSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/java/JavaXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/python/PythonSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/python/PythonXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/perl/PerlSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/perl/PerlXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/lisp/LispSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/lisp/LispXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/tcl/TclSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/tcl/TclXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainFullTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/PlainXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/plain/XMLXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sql/SQLXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/document/TroffXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/document/TroffFullTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sh/ShSymbolTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/analysis/sh/ShXref.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/search/context/HistoryLineTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <jflex file="${src.dir}/org/opensolaris/opengrok/search/context/PlainLineTokenizer.lex" destdir="${src.generatedsrc.dir}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <!-- Get the id of the changeset we're building from using a
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Mercurial command.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-get-changeset-from-command"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering depends="-check-is-hg-repo" if="build.from.repo">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering failifexecutionfails="no"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering outputproperty="changeset">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <!-- Check if we build from a checked out copy of the repository,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering so that we have history information from Mercurial available.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <available property="build.from.repo" file=".hg" type="dir"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <!-- Get the id of the changeset we're building from by reading
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering .hg_archival.txt file created by hg archive. This will only
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering be used when we're not building from a checked out copy of
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering the repository, for example the source distribution.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering depends="-check-is-hg-repo" unless="build.from.repo">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tempfile property="hg.archival.temp" deleteonexit="true"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <copy file=".hg_archival.txt" tofile="${hg.archival.temp}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <replaceregexp file="${hg.archival.temp}" flags="s"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering match=".*node: ([0-9a-f]{12}).*"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering replace="\1"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <loadfile srcFile="${hg.archival.temp}" property="changeset"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering depends="-get-changeset-from-command,-get-changeset-from-file">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <mkdir dir="${build.classes.dir}/org/opensolaris/opengrok"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering file="${build.classes.dir}/org/opensolaris/opengrok/info.properties">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <entry key="version" value="${version}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <entry key="changeset" value="${changeset}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering </propertyfile>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <property name="coverage.dir" value="${basedir}/coverage"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-pre-compile" depends="jrcs,jflex"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <antcall target="-delete-generated-repository-files"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Create an empty manifest file so that nbproject/build-impl.xml
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering notices that a manifest should be added to the jar file
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <!-- no attributes, main-class and class-path will be added later -->
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <manifest file="manifest.mf" mode="replace"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-pre-init" depends="-touch-manifest, -exclude-client"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Initialize a property holding a list of jar files on which
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathconvert property="opengrok.lib.files" pathsep=" ">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <flattenmapper/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering </pathconvert>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <!-- Update the manifest file with a classpath attribute -->
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-update-manifest-classpath">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <manifest file="${manifest.file}" mode="update">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering value="${opengrok.lib.files} lib/derbyclient.jar lib/derby.jar"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-pre-jar" depends="-update-manifest-classpath,-update-build-info"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Copy the jars from lib to dist/lib manually if we don't have
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering the copylibs task from NetBeans
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-copy-lib-without-netbeans"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering unless="manifest.available+main.class+mkdist.available">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <fileset file="${file.reference.ant.jar}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <fileset dir="." includes="${opengrok.lib.files}"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-post-jar" depends="-copy-lib-without-netbeans">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <war destfile="${dist.war}" webxml="web/WEB-INF/web.xml">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <fileset dir="web" excludes="META-INF/context.xml"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <lib dir="${dist.dir}" includes="opengrok.jar"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <lib dir="${dist.dir}/lib" includes="*.jar" excludes="servlet-api.jar"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <java classname="org.opensolaris.opengrok.index.CommandLineOptions"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering output="${dist.dir}/opengrok.1" failonerror="true" fork="true">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathelement location="dist/opengrok.jar"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <exec os="SunOS" executable="/usr/bin/pkgmk" failonerror="true">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <arg line="-o -d build -r . -v ${version} -f platform/solaris/pkgdef/prototype"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <exec os="SunOS" executable="/usr/bin/pkgtrans" failonerror="true">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <arg line="-s build /dist/OSOLopengrok-${version}.pkg OSOLopengrok"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tar destfile="${dist.dir}/${distname}-${version}.tar.gz"
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering compression="gzip">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tarfileset dir="." prefix="${distname}-${version}/doc">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tarfileset dir="." prefix="${distname}-${version}/bin" mode="755">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tarfileset dir="doc" prefix="${distname}-${version}/doc">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tarfileset dir="${dist.dir}" prefix="${distname}-${version}/lib">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <tarfileset dir="${dist.dir}" prefix="${distname}-${version}/man/man1">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering<!-- <arg value="-p"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <arg value="${distname}-${version}-src"/> -->
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <arg value="${dist.dir}/${distname}-${version}-src.tar.gz"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="-check_findbugs" description="Check that findbugs jar files are present">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <available file="findbugs.jar" type="file" property="findbugs.jar.present">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <filepath refid="findbugs.lib.search.path"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <fail unless="findbugs.jar.present" message="Please install Findbugs findbugs.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <available file="findbugs-ant.jar" type="file" property="findbugs-ant.jar.present">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <filepath refid="findbugs.lib.search.path"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <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"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <target name="findbugs" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate HTML output">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <findbugs projectname="OpenGrok" home="${findbugs.home}" output="html" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.html" jvmargs="-Xmx512m">
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering <auxClasspath>
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering </auxClasspath>
<target name="findbugs-xml" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate XML output">
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
<findbugs projectname="OpenGrok" home="${findbugs.home}" output="xml" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.xml" jvmargs="-Xmx512m">
<fail unless="checkstyle.jar.present" message="Please install checkstyle-all.jar in lib-directory (or in ant classpath) to run Checkstyle, see README."/>
<target name="checkstyle" depends="compile, -check_checkstyle" description="Run checkstyle on OpenGrok source code">
<fail unless="pmd.jar.present" message="Please install pmd.jar in lib-directory (or in ant classpath) to run PMD, see README."/>
<target name="cpd-xml" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code, print output in xml">
<fail unless="emma.jar.present" message="Please install emma.jar in lib-directory (or in ant classpath) to run Emma, see README."/>
<fail unless="emma_ant.jar.present" message="Please install emma_ant.jar in lib-directory (or in ant classpath) to run Emma, see README."/>
<target name="emma-instrument" depends="compile, -check_emma" description="Instruments the source code for Emma code coverage analysis">
metadatafile="${coverage.dir}/coverage.em"
filter="+org.opensolaris.*,-org.opensolaris.opengrok.management.client.*"/>
<concat destfile="${test.cvs.repo}/CVS/Root" append="no" force="yes" eol="unix">${basedir}/${test.cvs.root}/
basedir="${test.sources}"
basedir="${test.repositories}"
<fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
<!--copy todir="${test.razor}/Razor-Simple/SimpleCProgram-BinaryRelease/.razor">
<fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>