2005-05-01 20:11:11 -04:00
<?xml version="1.0"?>
2007-06-09 02:09:46 -04:00
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
2007-06-16 00:45:13 -04:00
<project name= "common" xmlns:artifact= "antlib:org.apache.maven.artifact.ant" >
2005-05-01 20:11:11 -04:00
<description >
This file is designed for importing into a main build file, and not intended
for standalone use.
</description>
<dirname file= "${ant.file.common}" property= "common.dir" />
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it -->
<property file= "${user.home}/lucene.build.properties" />
<property file= "${user.home}/build.properties" />
<property file= "${basedir}/build.properties" />
2005-07-04 22:22:45 -04:00
<property file= "${common.dir}/build.properties" />
2005-05-01 20:11:11 -04:00
<tstamp >
<format property= "current.year" pattern= "yyyy" />
<format property= "DSTAMP" pattern= "yyyy-MM-dd" />
<format property= "TSTAMP" pattern= "HH:mm:ss" />
</tstamp>
<property name= "name" value= "${ant.project.name}" />
<property name= "Name" value= "Lucene" />
2009-11-16 09:03:05 -05:00
<property name= "dev.version" value= "3.1-dev" />
2009-05-26 06:25:06 -04:00
<property name= "version" value= "${dev.version}" />
2009-12-08 18:05:29 -05:00
<property name= "compatibility.tag" value= "lucene_3_0_back_compat_tests_20091208" />
2008-01-08 15:05:53 -05:00
<property name= "spec.version" value= "${version}" />
2005-05-01 20:11:11 -04:00
<property name= "year" value= "2000-${current.year}" />
2005-05-06 19:43:54 -04:00
<property name= "final.name" value= "lucene-${name}-${version}" />
2005-05-01 20:11:11 -04:00
2009-12-05 13:27:27 -05:00
<property name= "junit.jar" value= "junit-4.7.jar" />
2008-01-25 15:27:55 -05:00
<property name= "junit-location.jar" value= "${common.dir}/lib/${junit.jar}" />
<path id= "junit-path" >
<pathelement location= "${junit-location.jar}" />
</path>
2009-08-14 07:00:48 -04:00
<!-- default arguments to pass to JVM executing tests -->
<property name= "args" value= "" />
2005-05-12 14:14:15 -04:00
<property name= "javac.deprecation" value= "off" />
2005-05-01 20:11:11 -04:00
<property name= "javac.debug" value= "on" />
2009-09-29 18:33:28 -04:00
<property name= "javac.source" value= "1.5" />
<property name= "javac.target" value= "1.5" />
2009-11-16 09:03:05 -05:00
<property name= "javac.source.tag" value= "1.5" />
<property name= "javac.target.tag" value= "1.5" />
2005-05-01 20:11:11 -04:00
2009-09-29 19:50:08 -04:00
<property name= "javadoc.link" value= "http://java.sun.com/j2se/1.5/docs/api/" />
2007-11-14 14:16:19 -05:00
<property name= "javadoc.access" value= "protected" />
2009-05-14 10:48:37 -04:00
<property name= "javadoc.charset" value= "utf-8" />
2007-11-14 14:16:19 -05:00
<property name= "javadoc.dir" value= "${common.dir}/build/docs/api" />
2009-12-08 05:37:30 -05:00
<property name= "javadoc.maxmemory" value= "512m" />
2007-11-14 14:16:19 -05:00
<!-- Javadoc classpath -->
<path id= "javadoc.classpath" >
<path refid= "classpath" />
<pathelement location= "${ant.home}/lib/ant.jar" />
2009-08-27 10:07:04 -04:00
<fileset dir= "." >
<include name= "**/lib/*.jar" />
</fileset>
2007-11-14 14:16:19 -05:00
</path>
2008-02-05 08:02:12 -05:00
<property name= "changes.src.dir" value= "${common.dir}/src/site/changes" />
<property name= "changes.target.dir" value= "${common.dir}/build/docs/changes" />
2005-05-01 20:11:11 -04:00
<property name= "project.name" value= "site" /> <!-- todo: is this used by anakia or something else? -->
<property name= "build.encoding" value= "utf-8" />
<property name= "src.dir" location= "src/java" />
<property name= "build.dir" location= "build" />
2008-11-08 13:30:37 -05:00
<property name= "tags.dir" location= "tags" />
2005-05-01 20:11:11 -04:00
<property name= "dist.dir" location= "dist" />
2007-06-16 00:45:13 -04:00
<property name= "maven.dist.dir" location= "dist/maven" />
2007-10-31 21:26:43 -04:00
<property name= "m2.repository.url" value= "file://${maven.dist.dir}" />
2007-12-03 02:31:02 -05:00
<property name= "m2.repository.private.key" value= "${user.home}/.ssh/id_dsa" />
2005-05-01 20:11:11 -04:00
2005-07-04 22:22:45 -04:00
<property name= "javacc.home" location= "${common.dir}" />
2007-08-08 18:26:44 -04:00
<property name= "jflex.home" location= "${common.dir}" />
2005-05-01 20:11:11 -04:00
<property name= "junit.output.dir" location= "${build.dir}/test" />
<property name= "junit.reports" location= "${build.dir}/test/reports" />
2005-05-12 14:11:04 -04:00
<property name= "junit.includes" value= "**/Test*.java,**/*Test.java" />
2006-07-25 18:23:01 -04:00
<property name= "junit.excludes" value= "" />
2005-05-01 20:11:11 -04:00
2007-08-22 19:16:48 -04:00
<property name= "manifest.file" location= "${common.dir}/build/MANIFEST.MF" />
2008-09-22 19:31:07 -04:00
<!--
we attempt to exec svnversion to get details build information
for jar manifests. this property can be set at runtime to an
explicit path as needed, or ant will just try to find it in the
default PATH. (this is useful for Hudson)
-->
<property name= "svnversion.exe" value= "svnversion" />
2008-11-13 13:11:59 -05:00
<property name= "svn.exe" value= "svn" />
2008-09-22 19:31:07 -04:00
2007-05-31 16:58:55 -04:00
<condition property= "build-1-5-contrib" >
<equals arg1= "1.5" arg2= "${ant.java.version}" />
</condition>
2006-12-09 11:32:22 -05:00
2008-03-14 23:16:43 -04:00
<property name= "clover.db.dir" location= "${common.dir}/build/test/clover/db" />
<property name= "clover.report.dir" location= "${common.dir}/build/test/clover/reports" />
2006-12-09 11:32:22 -05:00
<available
property="clover.present"
classname="com.cenqua.clover.tasks.CloverReportTask"
/>
<condition property= "clover.enabled" >
<and >
<isset property= "run.clover" />
<isset property= "clover.present" />
</and>
</condition>
2005-05-01 20:11:11 -04:00
<available
property="javacc.present"
classname="org.javacc.parser.Main"
classpath="${javacc.home}/bin/lib/javacc.jar"
/>
2007-08-08 18:26:44 -04:00
<available
property="jflex.present"
classname="JFlex.anttask.JFlexTask"
classpath="${jflex.home}/lib/JFlex.jar"
/>
2007-06-16 00:45:13 -04:00
<available
property="maven.ant.tasks.present"
classname="org.apache.maven.artifact.ant.Pom"
/>
2005-05-01 20:11:11 -04:00
<target name= "clean"
description="Removes contents of build and dist directories">
<delete dir= "${build.dir}" />
<delete dir= "${dist.dir}" />
<delete file= "velocity.log" />
</target>
<!-- TODO: maybe make JavaCC checking specific to only the projects
2009-08-28 10:56:58 -04:00
that use it (Lucene core and contrib/misc
2005-05-01 20:11:11 -04:00
-->
<target name= "javacc-uptodate-check" >
<uptodate property= "javacc.files.uptodate" >
<srcfiles dir= "src" includes= "**/*.jj" />
<mapper type= "glob" from= "*.jj" to= "*.java" />
</uptodate>
</target>
<target name= "javacc-notice" unless= "javacc.files.uptodate" >
<echo >
One or more of the JavaCC .jj files is newer than its corresponding
.java file. Run the "javacc" target to regenerate the artifacts.
</echo>
</target>
2008-01-29 18:55:10 -05:00
<target name= "init" depends= "javacc-uptodate-check, javacc-notice, jflex-uptodate-check, jflex-notice" >
2007-08-08 18:26:44 -04:00
</target>
<target name= "jflex-uptodate-check" >
<uptodate property= "jflex.files.uptodate" >
<srcfiles dir= "src" includes= "**/*.jflex" />
<mapper type= "glob" from= "*.jflex" to= "*.java" />
</uptodate>
</target>
<target name= "jflex-notice" unless= "jflex.files.uptodate" >
<echo >
One or more of the JFlex .jflex files is newer than its corresponding
.java file. Run the "jflex" target to regenerate the artifacts.
</echo>
2005-05-01 20:11:11 -04:00
</target>
<target name= "javacc-check" >
<fail unless= "javacc.present" >
##################################################################
JavaCC not found.
JavaCC Home: ${javacc.home}
JavaCC JAR: ${javacc.jar}
Please download and install JavaCC from:
< http://javacc.dev.java.net>
Then, create a build.properties file either in your home
directory, or within the Lucene directory and set the javacc.home
property to the path where JavaCC is installed. For example,
2009-10-20 12:06:29 -04:00
if you installed JavaCC in /usr/local/java/javacc-4.1, then set the
2005-05-01 20:11:11 -04:00
javacc.home property to:
2009-10-20 12:06:29 -04:00
javacc.home=/usr/local/java/javacc-4.1
2005-05-01 20:11:11 -04:00
If you get an error like the one below, then you have not installed
things correctly. Please check all your paths and try again.
java.lang.NoClassDefFoundError: org.javacc.parser.Main
##################################################################
</fail>
</target>
2007-06-16 00:45:13 -04:00
2007-08-08 18:26:44 -04:00
<target name= "jflex-check" >
<fail unless= "jflex.present" >
##################################################################
JFlex not found.
JFlex Home: ${jflex.home}
Please download and install JFlex from:
< http://jflex.de/download.html>
Then, create a build.properties file either in your home
directory, or within the Lucene directory and set the jflex.home
property to the path where JFlex is installed. For example,
if you installed JFlex in /usr/local/java/jflex-1.4.1, then set the
jflex.home property to:
jflex.home=/usr/local/java/jflex-1.4.1
##################################################################
</fail>
</target>
2008-01-29 18:55:10 -05:00
<target name= "compile-core" depends= "init, clover"
2005-05-01 20:11:11 -04:00
description="Compiles core classes">
<compile
srcdir="src/java"
destdir="${build.dir}/classes/java">
<classpath refid= "classpath" />
</compile>
2009-05-14 06:09:22 -04:00
<!-- Copy the resources folder (if existent) -->
<copy todir= "${build.dir}/classes/java" includeEmptyDirs= "false" >
<globmapper from= "resources/*" to= "*" handledirsep= "yes" />
<fileset dir= "src" includes= "resources/**" />
</copy>
2005-05-01 20:11:11 -04:00
</target>
<target name= "compile" depends= "compile-core" >
<!-- convenience target to compile core -->
</target>
<target name= "jar-core" depends= "compile-core"
description="Packages the JAR file">
2007-08-22 19:16:48 -04:00
<jarify />
2007-06-06 20:48:32 -04:00
</target>
2007-08-22 19:16:48 -04:00
2007-06-16 00:45:13 -04:00
<target name= "maven.ant.tasks-check" >
<fail unless= "maven.ant.tasks.present" >
##################################################################
Maven ant tasks not found.
Please make sure the maven-ant-tasks jar is in ANT_HOME/lib, or made
available to Ant using other mechanisms like -lib or CLASSPATH.
##################################################################
</fail>
</target>
2007-06-06 20:48:32 -04:00
2007-08-22 19:16:48 -04:00
<property name= "pom.xml" value= "pom.xml.template" />
2007-06-16 00:45:13 -04:00
<macrodef name= "m2-deploy" description= "Builds a Maven artifact" >
2007-08-22 19:16:48 -04:00
<element name= "artifact-attachments" optional= "yes" />
2007-06-16 00:45:13 -04:00
<attribute name= "pom.xml" default= "${pom.xml}" />
<sequential >
<copy file= "@{pom.xml}" tofile= "${build.dir}/@{pom.xml}" >
<filterset begintoken= "@" endtoken= "@" >
<filter token= "version" value= "${version}" />
</filterset>
</copy>
2007-12-03 02:31:02 -05:00
<artifact:install-provider artifactId= "wagon-ssh" version= "1.0-beta-2" />
2007-08-22 19:16:48 -04:00
2007-06-16 00:45:13 -04:00
<artifact:pom id= "maven.project" file= "${build.dir}/@{pom.xml}" />
2007-08-22 19:16:48 -04:00
<artifact:deploy file= "${build.dir}/${maven.project.build.finalName}.jar" >
<artifact-attachments />
2007-12-03 02:31:02 -05:00
<remoteRepository url= "${m2.repository.url}" >
<authentication username= "${m2.repository.username}" privateKey= "${m2.repository.private.key}" />
</remoteRepository>
2007-06-16 00:45:13 -04:00
<pom refid= "maven.project" />
2007-08-22 19:16:48 -04:00
</artifact:deploy>
2007-06-16 00:45:13 -04:00
</sequential>
</macrodef>
2007-08-22 19:16:48 -04:00
<macrodef name= "build-manifest" description= "Builds a manifest file" >
<attribute name= "title" default= "Lucene Search Engine: ${ant.project.name}" />
<sequential >
<manifest file= "${manifest.file}" >
<attribute name= "Specification-Title" value= "@{title}" />
<!-- spec version must match "digit+{.digit+}*" -->
2008-01-08 15:05:53 -05:00
<attribute name= "Specification-Version" value= "${spec.version}" />
2007-08-22 19:16:48 -04:00
<attribute name= "Specification-Vendor"
value="The Apache Software Foundation"/>
<attribute name= "Implementation-Title" value= "org.apache.lucene" />
<!-- impl version can be any string -->
<attribute name= "Implementation-Version"
2008-05-30 07:11:32 -04:00
value="${version} ${svnversion} - ${DSTAMP} ${TSTAMP}"/>
2007-08-22 19:16:48 -04:00
<attribute name= "Implementation-Vendor"
value="The Apache Software Foundation"/>
<attribute name= "X-Compile-Source-JDK"
value="${javac.source}"/>
<attribute name= "X-Compile-Target-JDK"
value="${javac.target}"/>
</manifest>
</sequential>
</macrodef>
2007-06-06 20:48:32 -04:00
<macrodef name= "jarify" description= "Builds a JAR file" >
2007-08-22 19:16:48 -04:00
<attribute name= "basedir" default= "${build.dir}/classes/java" />
<attribute name= "destfile" default= "${build.dir}/${final.name}.jar" />
2007-06-06 20:48:32 -04:00
<element name= "manifest-attributes" optional= "yes" />
2007-08-22 19:16:48 -04:00
<element name= "metainf-includes" optional= "yes" />
2007-06-06 20:48:32 -04:00
<sequential >
<!-- If possible, include the svnversion -->
2008-09-22 19:31:07 -04:00
<exec dir= "." executable= "${svnversion.exe}"
2007-06-06 20:48:32 -04:00
outputproperty="svnversion" failifexecutionfails="false">
<arg line= "." />
</exec>
2007-08-22 19:16:48 -04:00
<build-manifest />
2007-06-06 20:48:32 -04:00
<jar
2007-08-22 19:16:48 -04:00
destfile="@{destfile}"
basedir="@{basedir}"
manifest="${manifest.file}">
2007-06-06 20:48:32 -04:00
<manifest >
2007-08-22 19:16:48 -04:00
<manifest-attributes />
2007-06-06 20:48:32 -04:00
</manifest>
<metainf dir= "${common.dir}" >
<include name= "LICENSE.txt" />
<include name= "NOTICE.txt" />
</metainf>
2007-08-22 19:16:48 -04:00
<metainf-includes />
2007-06-06 20:48:32 -04:00
</jar>
</sequential>
</macrodef>
2005-05-01 20:11:11 -04:00
<target name= "compile-test" depends= "compile-core" >
2008-11-08 13:30:37 -05:00
<compile-test-macro srcdir= "src/test" destdir= "${build.dir}/classes/test"
test.classpath="test.classpath"/>
2005-05-01 20:11:11 -04:00
</target>
2007-07-27 16:24:52 -04:00
<property name= "tests.verbose" value= "false" />
2008-11-08 13:30:37 -05:00
<macrodef name= "compile-test-macro" description= "Compiles junit tests." >
<attribute name= "srcdir" />
<attribute name= "destdir" />
<attribute name= "test.classpath" />
2009-09-30 13:37:49 -04:00
<attribute name= "javac.source" default= "${javac.source}" />
<attribute name= "javac.target" default= "${javac.target}" />
2008-11-08 13:30:37 -05:00
<sequential >
<compile
srcdir="@{srcdir}"
2009-09-30 13:37:49 -04:00
destdir="@{destdir}"
javac.source="@{javac.source}"
javac.target="@{javac.source}">
2008-11-08 13:30:37 -05:00
<classpath refid= "@{test.classpath}" />
</compile>
<!-- Copy any data files present to the classpath -->
<copy todir= "@{destdir}" >
<fileset dir= "@{srcdir}" excludes= "**/*.java" />
</copy>
</sequential>
</macrodef>
<macrodef name= "test-macro" description= "Executes junit tests." >
<attribute name= "junit.output.dir" default= "${junit.output.dir}" />
<attribute name= "junit.classpath" default= "junit.classpath" />
<attribute name= "dataDir" />
<attribute name= "tempDir" />
<element name= "contrib-settings" optional= "yes" />
2009-04-28 16:23:52 -04:00
<sequential >
<condition property= "runall" >
<not > <or >
<isset property= "testcase" />
<isset property= "testpackage" />
<isset property= "testpackageroot" />
</or> </not>
</condition>
2008-11-08 13:30:37 -05:00
<mkdir dir= "@{junit.output.dir}" />
<junit printsummary= "off" haltonfailure= "no" maxmemory= "512M"
errorProperty="tests.failed" failureProperty="tests.failed">
<classpath refid= "@{junit.classpath}" />
<assertions >
<enable package= "org.apache.lucene" />
</assertions>
2009-08-14 07:00:48 -04:00
<jvmarg line= "${args}" />
2008-11-08 13:30:37 -05:00
<!-- allow tests to control debug prints -->
<sysproperty key= "tests.verbose" value= "${tests.verbose}" />
<!-- TODO: create propertyset for test properties, so each project can have its own set -->
<sysproperty key= "dataDir" file= "@{dataDir}" />
<sysproperty key= "tempDir" file= "@{tempDir}" />
<sysproperty key= "java.io.tmpdir" file= "@{tempDir}" />
2009-05-26 06:25:06 -04:00
<sysproperty key= "lucene.version" value= "${dev.version}" />
2008-11-08 13:30:37 -05:00
<contrib-settings />
<formatter type= "xml" />
<formatter type= "brief" usefile= "false" />
2009-04-28 16:23:52 -04:00
<batchtest fork= "yes" todir= "@{junit.output.dir}" if= "runall" >
2008-11-08 13:30:37 -05:00
<fileset dir= "@{dataDir}" includes= "${junit.includes}" excludes= "${junit.excludes}" />
</batchtest>
2009-06-14 10:06:52 -04:00
<batchtest fork= "yes" todir= "@{junit.output.dir}" if= "testpackage" >
<fileset dir= "@{dataDir}" includes= "**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" excludes= "${junit.excludes}" />
</batchtest>
2009-04-28 16:23:52 -04:00
<batchtest fork= "yes" todir= "@{junit.output.dir}" if= "testpackageroot" >
<fileset dir= "@{dataDir}" includes= "**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" excludes= "${junit.excludes}" />
</batchtest>
2008-11-08 13:30:37 -05:00
<batchtest fork= "yes" todir= "@{junit.output.dir}" if= "testcase" >
<fileset dir= "@{dataDir}" includes= "**/${testcase}.java" />
</batchtest>
</junit>
<!-- create this file, then if we don't fail, delete it -->
<!-- this meme makes it easy to tell if contribs have failed later -->
<echo file= "@{junit.output.dir}/junitfailed.flag" > MAYBE</echo>
<fail if= "tests.failed" > Tests failed!</fail>
<!-- life would be easier if echo had an 'if' attribute like fail -->
<delete file= "@{junit.output.dir}/junitfailed.flag" />
</sequential>
</macrodef>
2009-06-14 10:06:52 -04:00
<target name= "test" depends= "compile-test" description= "Runs unit tests" >
2008-11-08 13:30:37 -05:00
<test-macro dataDir= "src/test" tempDir= "${build.dir}/test" >
<contrib-settings >
<!-- set as a system property so contrib tests can have a fixed root
to reference file paths from, and "ant test" can work from
anywhere.
-->
<sysproperty key= "lucene.common.dir" file= "${common.dir}" />
<!-- contrib/ant IndexTaskTest needs these two system properties -->
<sysproperty key= "docs.dir" file= "src/test" />
<sysproperty key= "index.dir" file= "${build.dir}/test/index" />
<!-- contrib/benchmark uses this system property to locate docs data and defined tasks -->
<sysproperty key= "tasks.dir" file= "${build.dir}/classes/java/org/apache/lucene/benchmark/byTask/tasks" />
<sysproperty key= "benchmark.work.dir" file= "${common.dir}/contrib/benchmark/work" />
</contrib-settings>
</test-macro>
2005-05-01 20:11:11 -04:00
</target>
2006-12-09 11:32:22 -05:00
<!--
If you want clover test code coverage, run this before the tests. You need clover.jar and the license in your ANT classspath and you need to specify -Drun.clover=true on the command line.
See http://issues.apache.org/jira/browse/LUCENE-721
-->
2008-03-14 23:16:43 -04:00
<target name= "clover" depends= "clover.setup, clover.info" description= "Instrument the Unit tests using Clover. Requires a Clover 1.3.2 license and clover.jar in the ANT classpath. To use, specify -Drun.clover=true on the command line." />
2006-12-09 11:32:22 -05:00
<target name= "clover.setup" if= "clover.enabled" >
<taskdef resource= "clovertasks" />
<mkdir dir= "${clover.db.dir}" />
<clover-setup initString= "${clover.db.dir}/lucene_coverage.db" >
2008-03-14 23:16:43 -04:00
<fileset dir= "src/java" >
<!-- see https://svn.apache.org/repos/private/committers/donated - licenses/clover/1.3.2/README.txt -->
<include name= "org/apache/**" />
<include name= "javax/**" />
<include name= "org/xml/**" />
<include name= "org/w3c/**" />
<include name= "com/example/**" />
2008-12-06 22:34:07 -05:00
<exclude name= "org/apache/lucene/analysis/ASCIIFoldingFilter.java" /> <!-- Class too large for clover -->
2008-03-14 23:16:43 -04:00
</fileset>
2006-12-09 11:32:22 -05:00
</clover-setup>
</target>
<target name= "clover.info" unless= "clover.present" >
<echo >
Clover not found. Code coverage reports disabled.
</echo>
</target>
<target name= "clover.check" >
<fail unless= "clover.present" >
##################################################################
Clover not found.
Please make sure clover.jar is in ANT_HOME/lib, or made available
to Ant using other mechanisms like -lib or CLASSPATH.
##################################################################
</fail>
</target>
<!--
Run after Junit tests.
-->
<target name= "generate-clover-reports" depends= "clover.check, clover" >
<mkdir dir= "${clover.report.dir}" />
<clover-report >
<current outfile= "${clover.report.dir}" title= "${final.name}" >
<format type= "html" />
</current>
2008-03-17 00:26:30 -04:00
<current outfile= "${clover.report.dir}/clover.xml" title= "${final.name}" >
<format type= "xml" />
</current>
2006-12-09 11:32:22 -05:00
</clover-report>
</target>
2005-05-01 20:11:11 -04:00
<target name= "generate-test-reports" description= "Generates test reports" >
<mkdir dir= "${junit.reports}" />
<junitreport todir= "${junit.output.dir}" >
2007-05-30 03:18:29 -04:00
<!-- this fileset let's the task work for individual contribs,
as well as the project as a whole
-->
<fileset dir= "${build.dir}" >
<include name= "**/test/TEST-*.xml" />
2005-05-01 20:11:11 -04:00
</fileset>
<report format= "frames" todir= "${junit.reports}" />
</junitreport>
</target>
<target name= "jar" depends= "jar-core" >
<!-- convenience target to package core JAR -->
</target>
<target name= "jar-src" depends= "init" >
2007-08-22 19:16:48 -04:00
<jarify basedir= "${src.dir}" destfile= "${build.dir}/${final.name}-src.jar" />
2005-05-01 20:11:11 -04:00
</target>
<target name= "default" depends= "jar-core" />
<!-- +
| M A C R O S
+-->
<macrodef name= "compile" >
<attribute name= "srcdir" />
<attribute name= "destdir" />
2009-09-30 13:37:49 -04:00
<attribute name= "javac.source" default= "${javac.source}" />
<attribute name= "javac.target" default= "${javac.target}" />
2005-05-01 20:11:11 -04:00
<element name= "nested" implicit= "yes" optional= "yes" />
<sequential >
<mkdir dir= "@{destdir}" />
<javac
encoding="${build.encoding}"
srcdir="@{srcdir}"
destdir="@{destdir}"
deprecation="${javac.deprecation}"
debug="${javac.debug}"
2009-09-30 13:37:49 -04:00
source="@{javac.source}"
target="@{javac.target}">
2005-05-01 20:11:11 -04:00
<nested />
2008-02-05 13:38:28 -05:00
<compilerarg line= "-Xmaxwarns 10000000" />
<compilerarg line= "-Xmaxerrs 10000000" />
2009-09-30 13:37:49 -04:00
<!-- for generics in Java 1.5: -->
<!-- <compilerarg line=" - Xlint:unchecked"/> -->
2005-05-01 20:11:11 -04:00
</javac>
</sequential>
</macrodef>
<macrodef name= "invoke-javacc" >
<attribute name= "target" />
<attribute name= "outputDir" />
<sequential >
2005-07-04 22:22:45 -04:00
<mkdir dir= "@{outputDir}" />
2005-05-01 20:11:11 -04:00
<javacc
target="@{target}"
outputDirectory="@{outputDir}"
debugTokenManager="${javacc.debug.tokenmgr}"
debugParser="${javacc.debug.parser}"
debuglookahead="${javacc.debug.lookahead}"
javacchome="${javacc.home}"
2009-10-18 19:21:13 -04:00
jdkversion="${javac.source}"
2005-05-01 20:11:11 -04:00
/>
2007-03-13 16:50:56 -04:00
<fixcrlf srcdir= "@{outputDir}" includes= "*.java" >
<containsregexp expression= "Generated.*By.*JavaCC" />
</fixcrlf>
2005-05-01 20:11:11 -04:00
</sequential>
</macrodef>
2007-11-14 14:16:19 -05:00
<macrodef name= "invoke-javadoc" >
<element name= "sources" optional= "yes" />
<attribute name= "destdir" />
<attribute name= "title" default= "${Name} ${version} API" />
<sequential >
<javadoc
overview="src/java/overview.html"
packagenames="org.apache.lucene.*"
destdir="@{destdir}"
access="${javadoc.access}"
encoding="${build.encoding}"
2009-05-14 10:48:37 -04:00
charset="${javadoc.charset}"
docencoding="${javadoc.charset}"
2007-11-14 14:16:19 -05:00
author="true"
version="true"
use="true"
source="${ant.java.version}"
link="${javadoc.link}"
windowtitle="${Name} ${version} API"
doctitle="@{title}"
2009-12-08 05:37:30 -05:00
maxmemory="${javadoc.maxmemory}"
2007-11-14 14:16:19 -05:00
bottom="Copyright & copy; ${year} Apache Software Foundation. All Rights Reserved.">
<tag name= "todo" description= "To Do:" />
<tag name= "uml.property" description= "UML Property:" />
<link offline= "true" packagelistLoc= "${javadoc.dir}" />
<sources />
<classpath refid= "javadoc.classpath" />
</javadoc>
</sequential>
</macrodef>
2005-05-01 20:11:11 -04:00
2008-01-29 18:55:10 -05:00
</project>