<?xml version="1.0" encoding="UTF-8"?>
<!--
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
See LICENSE.txt included in this distribution for the specific
language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at LICENSE.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
-->
<description>Builds, tests, and runs the project opengrok.</description>
<property file="${user.home}/config/ant/${ant.project.name}.properties" />
<property file="${user.home}/config/ant/global.properties" />
<import file="nbproject/build-impl.xml"/>
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="opengrok-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<property name="version" value="0.13-rc4"/>
<property name="distname" value="opengrok"/>
<target name="-exclude-client" unless="compileSystrayClient">
</target>
<property name="jflex-version" value="1.6.1"/>
<path id="lib.search.path">
<pathelement path="${java.class.path}"/>
<pathelement path="lib"/>
<pathelement path="/lib"/>
</path>
<path id="jacoco.lib.search.path">
<pathelement path="${jacoco.home}/lib"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="findbugs.lib.search.path">
<pathelement path="${findbugs.home}/lib/"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="checkstyle.lib.search.path">
<pathelement path="${checkstyle.home}/"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="pmd.lib.search.path">
<pathelement path="${pmd.home}/lib/"/>
<pathelement path="${java.class.path}"/>
</path>
<target name="-check-jflex" description="Check that jflex jar file is present">
<filepath refid="lib.search.path"/>
</available>
<condition property="jflex_not_downloaded">
<not>
<isset property="JFlex.present"/>
</not>
</condition>
</target>
<target name="download-jflex" depends="-check-jflex" if="jflex_not_downloaded">
<get src="${mvn.repository}/de/jflex/jflex/${jflex-version}/jflex-${jflex-version}.jar"
</target>
<target name="jflex" depends="download-jflex">
<mkdir dir="${src.generatedsrc.dir}"/>
<macrodef name="run-jflex">
<attribute name="file"/>
<sequential>
</sequential>
</macrodef>
<run-jflex file="${src.dir}/org/opensolaris/opengrok/analysis/javascript/JavaScriptSymbolTokenizer.lex"/>
</target>
<property name="git" value="git"/>
<!-- Get the id of the changeset we're building from using a
git command.
-->
<target name="-get-changeset-from-command"
depends="-check-is-git-repo" if="build.from.repo">
<exec executable="${git}"
failifexecutionfails="no"
outputproperty="changeset">
<arg value="rev-parse"/>
<arg value="HEAD"/>
</exec>
</target>
<!-- Check if we build from a checked out copy of the repository,
so that we have history information from git available.
-->
<target name="-check-is-git-repo">
</target>
<target name="-check-is-archived-git-repo">
<available property="build.from.archived.repo"
file=".git_archival.txt"
type="file"/>
</target>
<!-- Get the id of the changeset we're building from by reading
.git_archival.txt file created by git archive. This will only
be used when we're not building from a checked out copy of
the repository, for example the source distribution.
-->
<target name="-get-changeset-from-file"
depends="-check-is-archived-git-repo" if="build.from.archived.repo">
match=".*node: ([0-9a-f]{12}).*"
replace="\1"/>
</target>
<target name="-set-changeset" unless="changeset">
<property name="changeset" value="unknown"/>
</target>
<target name="-update-build-info"
depends="-get-changeset-from-command,-get-changeset-from-file,-set-changeset">
<mkdir dir="${build.classes.dir}/org/opensolaris/opengrok"/>
<propertyfile
file="${build.classes.dir}/org/opensolaris/opengrok/info.properties">
<entry key="version" value="${version}"/>
<entry key="changeset" value="${changeset}"/>
</propertyfile>
</target>
<target name="-pre-compile" depends="jrcs,jflex,download-lucene,download-servlet-api"/>
<target name="eclipse" depends="-pre-compile"
description="satisfy eclipse dependencies"/>
<target name="-post-clean">
<delete dir="${src.generatedsrc.dir}"/>
<delete file="${manifest.file}"/>
<delete dir="${coverage.dir}"/>
<antcall target="-delete-generated-repository-files"/>
</target>
<!--
Create an empty manifest file so that nbproject/build-impl.xml
notices that a manifest should be added to the jar file
-->
<target name="-touch-manifest">
<!-- no attributes, main-class and class-path will be added later -->
</target>
<!-- injecting jacoco, too -->
<target name="-pre-init" depends="-touch-manifest, -exclude-client, -set-jacocoagent"/>
<!--
Initialize a property holding a list of jar files on which
opengrok.jar depends
-->
<target name="-post-init">
<path>
<pathelement path="${javac.classpath}"/>
</path>
<flattenmapper/>
<map from="" to="lib/"/>
</pathconvert>
<mkdir dir="${build.test.classes.dir}"/>
</target>
<!-- Update the manifest file with a classpath attribute -->
<target name="-update-manifest-classpath">
<attribute name="Class-Path"
value="${opengrok.lib.files} lib/derbyclient.jar lib/derby.jar"/>
</manifest>
</target>
<target name="-pre-jar" depends="-update-manifest-classpath,-update-build-info"/>
<!--
the copylibs task from NetBeans
-->
<target name="-copy-lib-without-netbeans"
unless="manifest.available+main.class+mkdist.available">
<copy todir="${dist.dir}/lib">
<fileset file="${file.reference.ant.jar}"/>
</copy>
<copy todir="${dist.dir}">
</copy>
</target>
<path id="plainlib.search.path">
<pathelement path="lib"/>
<pathelement path="/lib"/>
</path>
<target name="-check-lucene" description="Check that lucene jar files are present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-analyzers-common.jar}" type="file" property="lucene-analyzers-common.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<filepath refid="plainlib.search.path"/>
</available>
<filepath refid="plainlib.search.path"/>
</available>
<condition property="lucene_not_downloaded">
<not>
<and>
<isset property="lucene-core.jar.present"/>
<isset property="lucene-analyzers-common.jar.present"/>
<isset property="lucene-queryparser.jar.present"/>
<isset property="lucene-suggest.jar.present"/>
</and>
</not>
</condition>
</target>
<target name="download-lucene" depends="-check-lucene" if="lucene_not_downloaded">
<delete>
<fileset dir="lib">
<include name="lucene-*.jar"/>
</fileset>
</delete>
<get src="${mvn.repository}/org/apache/lucene/lucene-core/${lucene.version}/${lucene-core.jar}"
<get src="${mvn.repository}/org/apache/lucene/lucene-analyzers-common/${lucene.version}/${lucene-analyzers-common.jar}"
<get src="${mvn.repository}/org/apache/lucene/lucene-queryparser/${lucene.version}/${lucene-queryparser.jar}"
<get src="${mvn.repository}/org/apache/lucene/lucene-suggest/${lucene.version}/${lucene-suggest.jar}"
</target>
<target name="-check-servlet-api" description="Check that servlet-api jar file is present">
<filepath refid="plainlib.search.path"/>
</available>
<condition property="servlet-api_not_downloaded">
<not>
<isset property="servlet-api.jar.present"/>
</not>
</condition>
</target>
<target name="download-servlet-api" depends="-check-servlet-api" if="servlet-api_not_downloaded">
<delete>
<fileset dir="lib">
<include name="servlet-api-*.jar"/>
</fileset>
</delete>
<get src="${mvn.repository}/javax/servlet/servlet-api/${servlet-api.version}/${servlet-api.jar}"
</target>
<target name="-post-jar" depends="-copy-lib-without-netbeans, sample-plugins">
</war>
<echo message="Generating man page.."/>
<java classname="org.opensolaris.opengrok.index.CommandLineOptions"
<classpath>
<pathelement location="dist/opengrok.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</target>
<target name="package" depends="jar">
</exec>
<arg line="-s build /dist/OSOLopengrok-${version}.pkg OSOLopengrok"/>
</exec>
<arg line="-v ${version}"/>
</exec>
</target>
<target name="dist" depends="jar">
compression="gzip">
<tarfileset dir="." prefix="${distname}-${version}/doc">
<include name="README.txt"/>
<include name="CHANGES.txt"/>
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
<include name="paths.tsv"/>
<include name="logging.properties"/>
</tarfileset>
<tarfileset dir="." prefix="${distname}-${version}/bin" mode="555">
<include name="OpenGrok"/>
</tarfileset>
<tarfileset dir="tools" prefix="${distname}-${version}/bin/" mode="555">
<include name="Messages"/>
<include name="Groups"/>
</tarfileset>
<tarfileset dir="doc" prefix="${distname}-${version}/doc">
<include name="EXAMPLE.txt"/>
</tarfileset>
<include name="opengrok.jar"/>
<include name="source.war"/>
<include name="lib/*"/>
<exclude name="lib/${servlet-api.jar}"/>
</tarfileset>
<include name="opengrok.1"/>
</tarfileset>
</tar>
</target>
<target name="dist-src" depends="init">
<mkdir dir="${dist.dir}"/>
<echo message="Creating archive for tag ${version}"/>
<exec executable="${git}">
<arg value="archive"/>
<!--<arg value="-v"/>-->
<arg value="--prefix=${distname}-${version}-src/"/>
<arg value="${version}"/>
</exec>
</target>
<target name="-check_findbugs" description="Check that findbugs jar files are present">
<filepath refid="findbugs.lib.search.path"/>
</available>
<fail unless="findbugs.jar.present" message="Please install Findbugs findbugs.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
<filepath refid="findbugs.lib.search.path"/>
</available>
<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"/>
</target>
<target name="findbugs" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate HTML output">
<path id="findbugs.lib" >
<pathelement location="${findbugs.home}/lib/findbugs.jar"/>
<pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
<mkdir dir="findbugs"/>
<findbugs projectname="OpenGrok" home="${findbugs.home}" output="html" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.html" jvmargs="-Xmx512m">
<auxClasspath>
<fileset dir="${dist.dir}/lib/">
<include name="*.jar"/>
</fileset>
</auxClasspath>
<sourcePath path="${src.dir}"/>
<sourcePath path="${src.generatedsrc.dir}"/>
<class location="${dist.dir}/opengrok.jar" />
</findbugs>
</target>
<target name="findbugs-xml" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate XML output">
<path id="findbugs.lib" >
<pathelement location="${findbugs.home}/lib/findbugs.jar"/>
<pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
<mkdir dir="findbugs"/>
<findbugs projectname="OpenGrok" home="${findbugs.home}" output="xml" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.xml" jvmargs="-Xmx512m">
<auxClasspath>
<fileset dir="${dist.dir}/lib/">
<include name="*.jar"/>
</fileset>
</auxClasspath>
<sourcePath path="${src.dir}"/>
<sourcePath path="${src.generatedsrc.dir}"/>
<class location="${dist.dir}/opengrok.jar" />
</findbugs>
</target>
<target name="-check_checkstyle" description="Check that checkstyle jar files are present">
<filepath refid="checkstyle.lib.search.path"/>
</available>
<fail unless="checkstyle.jar.present" message="Please install checkstyle-all.jar in lib-directory (or in ant classpath) to run Checkstyle, see README."/>
</target>
<target name="checkstyle" depends="compile, -check_checkstyle" description="Run checkstyle on OpenGrok source code">
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpath="${checkstyle.home}/checkstyle-all.jar"/>
<fileset dir="src" includes="**/*.java"/>
<fileset dir="test" includes="**/*.java"/>
<formatter type="plain"/>
</checkstyle>
</target>
<target name="-check_pmd" description="Check that pmd jar files are present">
<filepath refid="pmd.lib.search.path"/>
</available>
<fail unless="pmd-lib.present" message="Please point pmd.home to proper directory to run PMD, see README."/>
</target>
<path id="pmd.lib" >
<include name="*.jar"/>
</fileset>
</path>
<target name="pmd" depends="compile, -check_pmd" description="Run PMD on OpenGrok source code">
<mkdir dir="pmd"/>
<fileset dir="src" includes="**/*.java"/>
<!-- <fileset dir="test" includes="**/*.java"/> -->
<!-- <fileset dir="web" includes="**/*.jsp"/>
<fileset dir="web" includes="**/*.jspf"/> -->
</pmd>
<echo message="PMD finished, found ${pmd.num.warnings} warnings, see pmd/pmd_report.html"/>
</target>
<target name="cpd-xml" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code, print output in xml">
<fileset dir="src">
<include name="**/*.java"/>
</fileset>
<fileset dir="test">
<include name="**/*.java"/>
</fileset>
</cpd>
</target>
<target name="cpd" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code">
<fileset dir="src">
<include name="**/*.java"/>
</fileset>
<fileset dir="test">
<include name="**/*.java"/>
</fileset>
</cpd>
</target>
<target name="-check_jacoco" description="Check that jacoco jar files are present">
<filepath refid="jacoco.lib.search.path"/>
</available>
<fail unless="jacocoant.jar.present" message="Please install jacocoant.jar in lib-directory (or in ant classpath) to run Jacoco, see README."/>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="jacoco.lib.search.path"/>
</target>
<target name="-set-jacocoagent" if="jacoco">
<antcall target="-check_jacoco"/>
<jacoco:agent property="jacocoagent" includes="org.opensolaris.*" excludes="org.opensolaris.opengrok.management.client.*:org.apache.*" destfile="${jacoco_out}"/>
<!-- Ugly hack to leverage IDE variable to inject jacoco
this will most probably break once Netbeans folks will drop this variable!
-->
</target>
<target name="jacocoreport" depends="-check_jacoco,-jacocoreport-without-test" />
<target name="jacoco-code-coverage" depends="clean, test, jacocoreport" description="Make jacoco test code coverage reports based on the OpenGrok unit tests" if="jacoco"/>
<target name="-jacocoreport-without-test"> <!--depends="-set-jacocoagent"> -->
<jacoco:report>
<executiondata>
<file file="${jacoco_out}"/>
</executiondata>
<structure name="Opengrok">
<classfiles>
<exclude name="**/org/opensolaris/opengrok/management/client/*.class" />
</fileset>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="src"/>
</sourcefiles>
</structure>
<html destdir="jacoco"/>
<csv destfile="jacoco/report.csv"/>
<xml destfile="jacoco/report.xml"/>
</jacoco:report>
</target>
<target name="-pre-compile-test"><!-- depends="-set-jacocoagent"> -->
</target>
<!-- <target name="-pre-compile-test-single" depends="-set-jacocoagent"/> -->
<available
type="file" property="repos_exists">
</available>
<condition property="repos_missing">
<not>
<isset property="repos_exists"/>
</not>
</condition>
</target>
<available
type="file" property="plugins_exists">
</available>
<condition property="plugins_missing">
<not>
<isset property="plugins_exists" />
</not>
</condition>
</target>
<target depends="create_repos, create_plugins" name="-post-compile-test">
</target>
<target depends="create_repos, create_plugins" name="-post-compile-test-single">
</target>
<target depends="check_plugins_jar" name="create_plugins" if="plugins_missing">
<copy
file="${test.plugins_jar}"
tofile="${build.test.classes.dir}/org/opensolaris/opengrok/authorization/plugins.jar" />
</target>
<target depends="check_repositories_zip" name="create_repos" if="repos_missing">
<antcall target="-create-svn-repository"/>
<antcall target="-create-razor-repository"/>
<!-- Change root in CVS test repository -->
<!-- Strange indentation in line two levels below to get newline correctly -->
<concat destfile="${test.cvs.repo}/CVS/Root" append="no" force="yes" eol="unix">${basedir}/${test.cvs.root}/
</concat>
<copy todir="${test.git}/.git">
<fileset dir="${test.git}/git"/>
</copy>
<copy todir="${test.hg}/.hg">
<fileset dir="${test.hg}/hg"/>
</copy>
<zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/index/source.zip"
basedir="${test.sources}"
update="false"
defaultexcludes="no"/>
<zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/history/repositories.zip"
basedir="${test.repositories}"
update="false"
defaultexcludes="no"/>
<antcall target="-delete-generated-repository-files"/>
</target>
<target name="-create-svn-repository">
<delete dir="${test.svn}"/>
<delete dir="${build.test.reposroots}/svn"/>
<mkdir dir="${build.test.reposroots}"/>
<exec executable="svnadmin" failifexecutionfails="false">
<arg value="create"/>
<arg value="${build.test.reposroots}/svn"/>
</exec>
<!-- need absolute path for svn url -->
<pathconvert property="test.svn.url">
<map from="" to="file://"/>
<path location="${build.test.reposroots}/svn"/>
</pathconvert>
<exec executable="svn" failifexecutionfails="false">
<arg value="import"/>
<arg value="${test.sources}"/>
<arg value="${test.svn.url}"/>
<arg value="-m"/>
<arg value="Initial import"/>
</exec>
<!-- Unit test for issue #694 -->
<exec executable="svn" failifexecutionfails="false">
<arg value="checkout"/>
<arg value="${test.svn.url}"/>
<arg value="${build.test.reposroots}/svn-working"/>
</exec>
<mkdir dir="${build.test.reposroots}/svn-working/parent"/>
<mkdir dir="${build.test.reposroots}/svn-working/parent/module1"/>
<mkdir dir="${build.test.reposroots}/svn-working/parent/module2"/>
<touch file="${build.test.reposroots}/svn-working/parent/module1/file1.txt"/>
<touch file="${build.test.reposroots}/svn-working/parent/module1/file2.txt"/>
<arg value="add"/>
<arg value="parent"/>
</exec>
<arg value="commit"/>
<arg value="-m"/>
<arg value="files in 2 modules"/>
</exec>
<!-- move the file1 from module1 to module2, and commit to finish our test case -->
<arg value="move"/>
</exec>
<arg value="commit"/>
<arg value="-m"/>
<arg value="move file1.txt from module1 to module2"/>
</exec>
<delete dir="${build.test.reposroots}/svn-working"/>
<!-- end of unit test for issue #694 -->
<exec executable="svn" failifexecutionfails="false">
<arg value="checkout"/>
<arg value="${test.svn.url}"/>
<arg value="${test.svn}"/>
</exec>
</target>
<target name="-create-razor-repository">
<delete dir="${test.razor}"/>
<copy todir="${test.razor}/Razor-Simple">
<fileset dir="ext/SampleRazorRepository/UserSandbox"/>
</copy>
<copy todir="${test.razor}/Razor-Simple/SimpleCProgram/.razor">
<fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
</copy>
<!--
The support for binaries in Razor repositories is not fully
functional, so the next copy target is commented out for now.
-->
<!--copy todir="${test.razor}/Razor-Simple/SimpleCProgram-BinaryRelease/.razor">
<fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
</copy-->
</target>
<!-- clean up generated test repositories -->
<target name="-delete-generated-repository-files">
<delete dir="${test.hg}/.hg"/>
<delete file="${test.hg}/.hgignore"/>
<delete dir="${test.git}/.git"/>
<delete dir="${test.svn}"/>
<delete dir="${test.razor}"/>
<delete file="${test.cvs.repo}/CVS/Root"/>
</target>
<target name="jdepend" depends="compile" description="Run JDepend dependency checking">
<mkdir dir="jdepend"/>
<arg value="-file"/>
<arg value="jdepend/report.xml"/>
<arg value="${build.classes.dir}"/>
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
<arg value="-file"/>
<arg value="jdepend/report.txt"/>
<arg value="${build.classes.dir}"/>
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</target>
<!-- Generate HTML test report -->
<target depends="init" name="test-report">
<junitreport todir="${build.test.results.dir}">
<fileset dir="${build.test.results.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report todir="${build.test.results.dir}"/>
</junitreport>
</target>
<!-- Build our patched JRCS library. -->
<target name="jrcs" depends="-pre-pre-compile">
<mkdir dir="${build.dir}/jrcs"/>
<compilerarg value="-Xlint:deprecation"/> <!-- ,unchecked -->
</javac>
<jar destfile="${file.reference.jrcs.jar}">
</jar>
</target>
<!-- Build the sample plugins. -->
<target name="sample-plugins" depends="-pre-pre-compile">
<mkdir dir="${build.dir}/plugins"/>
<javac srcdir="plugins/"
destdir="${build.dir}/plugins"
includes="**/*.java"
classpath="${javac.classpath}:${dist.jar}"
compiler="javac${javac.source}">
<compilerarg value="-Xlint:deprecation,unchecked" />
</javac>
</target>
<!-- compile jsp - just to test -->
<property name="debug" value="on" />
<property name="jsdebug" value="off" />
<property name="compress" value=".gz" />
<property name="debuglevel" value="source,lines,vars" />
<property name="optimize" value="on" />
<property name="deprecation" value="on" />
<property name="listfiles" value="true" />
<patternset id="libs">
<include name="*.jar" />
</patternset>
<path id="classpath.base">
<fileset dir="lib">
<patternset refid="libs" />
</fileset>
</path>
<property name="AS_HOME" value="glassfish"/>
<path id="classpath.j2ee">
<fileset dir="${AS_HOME}/modules">
<include name="javaee.jar" />
<!-- for the **/auth/* stuff, only -->
<include name="appserv-rt.jar" />
<include name="appserv-deployment-client.jar" />
</fileset>
</path>
<path id="classpath.jspc">
<fileset dir="${AS_HOME}/modules">
<include name="javax.servlet.jar"/>
<include name="javax.servlet.jsp.jar"/>
<include name="jsp-impl.jar"/>
<include name="el-impl.jar"/>
<include name="javax.servlet.jsp.jstl.jar"/>
<include name="jstl-impl.jar"/>
<include name="jsf-api.jar"/>
<include name="jsf-impl.jar"/>
<include name="tools.jar"/>
</fileset>
</path>
<path id="classpath.web">
<path refid="classpath.j2ee"/>
<path refid="classpath.base"/>
</path>
<path id="classpath.jsp">
<path refid="classpath.jspc"/>
<path refid="classpath.web"/>
</path>
<uptodate property="jsp.not.changed">
<mapper type="glob" from="*.jsp"
</uptodate>
</target>
classpathref="classpath.jsp" />
<fileset dir="${web.src.dir}">
<include name="**/*.jsp"/>
<include name="**/*.jspf"/>
<include name="**/index_body.html"/>
</fileset>
</copy>
<jasper validateXml="false"
javaencoding="UTF-8"
package="${codebase.dot}.jsp"
compilersourcevm="${javac.source}"
compilertargetvm="${javac.target}"
smapsuppressed="false"
webxmlfragment="${build.dir}/src/servlets_web.xml"
/>
overwrite="true">
<filterset>
<filter token="generated servlet mappings"
value=" generated start -->${wdd}<!-- generated end " />
</filterset>
</copy>
</target>
description="--> compile java source code and jsp pages"
>
includes="**/*.java"
optimize="${optimize}" debug="${debug}" debuglevel="${debuglevel}"
deprecation="${deprecation}" classpathref="classpath.jsp"
encoding="UTF-8" listfiles="${listfiles}"
includeantruntime="false">
</javac>
</target>
</project>