2001-09-18 12:31:24 -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.
|
|
|
|
-->
|
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<project name="core" default="default" basedir=".">
|
2003-09-20 13:45:32 -04:00
|
|
|
|
2005-05-12 14:11:04 -04:00
|
|
|
<property name="junit.includes" value="**/Test*.java"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<import file="common-build.xml"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
|
2007-06-04 00:03:24 -04:00
|
|
|
<property name="build.demo.template" value="src/demo/demo-build.template"/>
|
2003-09-10 21:51:33 -04:00
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<property name="demo.name" value="lucene-demos-${version}"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
<property name="demo.war.name" value="luceneweb"/>
|
|
|
|
<property name="javadoc.link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
|
2007-06-04 21:18:48 -04:00
|
|
|
<!-- Type of checksum to compute for distribution files -->
|
|
|
|
<property name="checksum.algorithm" value="md5" />
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- Build classpath -->
|
|
|
|
<path id="classpath">
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/java"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</path>
|
|
|
|
|
2007-05-05 01:36:49 -04:00
|
|
|
<!-- Javadoc classpath -->
|
|
|
|
<path id="javadoc.classpath">
|
|
|
|
<path refid="classpath"/>
|
|
|
|
<pathelement location="${ant.home}/lib/ant.jar"/>
|
2007-05-09 14:14:43 -04:00
|
|
|
|
|
|
|
<!-- NOTE: gdata jars only used with jdk 5 but include them even for lower jdk -->
|
|
|
|
<fileset dir="contrib">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
2007-05-05 01:36:49 -04:00
|
|
|
</path>
|
|
|
|
|
2002-11-07 12:31:27 -05:00
|
|
|
<path id="demo.classpath">
|
|
|
|
<path refid="classpath"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/demo"/>
|
2002-11-07 12:31:27 -05:00
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="demo.classpath"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/test"/>
|
2002-11-07 12:31:27 -05:00
|
|
|
</path>
|
|
|
|
|
2004-12-05 13:24:35 -05:00
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<path id="junit.classpath">
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/test"/>
|
|
|
|
<pathelement location="${build.dir}/classes/java"/>
|
2003-09-25 17:23:18 -04:00
|
|
|
<pathelement location="${build.dir}/classes/demo"/>
|
2003-09-18 12:56:18 -04:00
|
|
|
<pathelement path="${java.class.path}"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</path>
|
|
|
|
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset id="src.dist.patterns"
|
2005-05-02 06:00:44 -04:00
|
|
|
includes="src/,build.xml,*build*.xml,docs/,*.txt,contrib/,"
|
2007-02-22 18:45:34 -05:00
|
|
|
excludes="contrib/db/*/lib/,contrib/*/ext-libs/,src/site/build/"
|
2005-05-01 21:06:14 -04:00
|
|
|
/>
|
|
|
|
<patternset id="binary.build.dist.patterns"
|
|
|
|
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/,contrib/*/*.jar"
|
|
|
|
/>
|
|
|
|
<patternset id="binary.root.dist.patterns"
|
2007-06-04 00:03:24 -04:00
|
|
|
includes="src/demo/,src/jsp/,docs/,*.txt"
|
|
|
|
excludes="${build.demo.template}"
|
2005-05-01 21:06:14 -04:00
|
|
|
/>
|
|
|
|
|
2004-12-05 13:24:35 -05:00
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Prepares the build directory -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<!-- Overrides common.compile-core to add rmic -->
|
|
|
|
<target name="compile-core" depends="common.compile-core"
|
|
|
|
description="Compiles core classes, including rmic">
|
2002-09-19 22:17:14 -04:00
|
|
|
<rmic classname="org.apache.lucene.search.RemoteSearchable"
|
2005-11-22 05:07:42 -05:00
|
|
|
base="${build.dir}/classes/java" stubversion="1.2">
|
2002-09-19 22:17:14 -04:00
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</rmic>
|
|
|
|
</target>
|
|
|
|
|
2007-05-30 03:18:29 -04:00
|
|
|
<target name="test-core" depends="common.test"
|
|
|
|
description="Runs unit tests for the core Lucene code"
|
|
|
|
/>
|
|
|
|
<target name="test" depends="test-core, test-contrib"
|
|
|
|
description="Runs all unit tests"
|
|
|
|
/>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A R -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="jar-demo" depends="compile-demo">
|
2002-09-19 22:17:14 -04:00
|
|
|
<jar
|
2003-09-20 13:45:32 -04:00
|
|
|
destfile="${build.dir}/${demo.name}.jar"
|
|
|
|
basedir="${build.dir}/classes/demo"
|
2007-06-05 15:54:38 -04:00
|
|
|
excludes="**/*.java">
|
2007-06-06 20:48:32 -04:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
|
|
|
|
<!-- spec version must match "digit+{.digit+}*" -->
|
|
|
|
<attribute name="Specification-Version" value="${version}"/>
|
|
|
|
<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"
|
|
|
|
value="${version}"/>
|
|
|
|
<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>
|
2007-06-05 15:54:38 -04:00
|
|
|
<metainf dir="${common.dir}">
|
|
|
|
<include name="LICENSE.txt"/>
|
|
|
|
<include name="NOTICE.txt"/>
|
|
|
|
</metainf>
|
|
|
|
</jar>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="war-demo" depends="jar-core,jar-demo">
|
2003-12-28 11:05:53 -05:00
|
|
|
<war destfile="${build.dir}/${demo.war.name}.war"
|
|
|
|
webxml="src/jsp/WEB-INF/web.xml">
|
|
|
|
<fileset dir="src/jsp" excludes="WEB-INF/web.xml"/>
|
|
|
|
<lib dir="${build.dir}" includes="${demo.name}.jar"/>
|
|
|
|
<lib dir="${build.dir}" includes="${final.name}.jar"/>
|
2007-06-06 20:48:32 -04:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
|
|
|
|
<!-- spec version must match "digit+{.digit+}*" -->
|
|
|
|
<attribute name="Specification-Version" value="${version}"/>
|
|
|
|
<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"
|
|
|
|
value="${version}"/>
|
|
|
|
<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>
|
2007-06-05 15:54:38 -04:00
|
|
|
<metainf dir="${common.dir}">
|
|
|
|
<include name="LICENSE.txt"/>
|
|
|
|
<include name="NOTICE.txt"/>
|
|
|
|
</metainf>
|
2003-12-28 11:05:53 -05:00
|
|
|
</war>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2007-06-06 20:48:32 -04:00
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- B U I L D D E M O -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="compile-demo" depends="compile-core">
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/classes/demo"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2005-04-22 06:21:15 -04:00
|
|
|
<compile
|
2003-09-20 13:45:32 -04:00
|
|
|
srcdir="src/demo"
|
2005-04-22 06:21:15 -04:00
|
|
|
destdir="${build.dir}/classes/demo">
|
2002-11-07 12:31:27 -05:00
|
|
|
<classpath refid="demo.classpath"/>
|
2005-04-22 06:21:15 -04:00
|
|
|
</compile>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2004-09-20 14:16:50 -04:00
|
|
|
<!-- GCJ -->
|
|
|
|
<target name="gcj" depends="jar,jar-demo">
|
|
|
|
<exec executable="make" dir="src/gcj" failonerror="true"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<!-- TODO: Remove dependency on demo from test -->
|
2007-05-04 15:54:30 -04:00
|
|
|
<target name="compile-test" depends="compile-demo,common.compile-test"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
|
2003-09-18 14:09:28 -04:00
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D O C U M E N T A T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2005-10-08 07:01:09 -04:00
|
|
|
<target name="docs" description="Build the website">
|
2007-03-09 17:29:00 -05:00
|
|
|
<echo>DEPRECATED - Doing Nothing. See http://wiki.apache.org/lucene-java/HowToUpdateTheWebsite</echo>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2007-05-10 13:19:31 -04:00
|
|
|
<target name="javadocs" description="Generate javadoc" depends="build-contrib">
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/docs/api"/>
|
2005-04-19 20:38:57 -04:00
|
|
|
<invoke-javadoc
|
2005-04-20 15:46:10 -04:00
|
|
|
access="protected"
|
2003-09-20 13:45:32 -04:00
|
|
|
destdir="${build.dir}/docs/api"
|
2005-04-19 20:38:57 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2007-05-10 13:19:31 -04:00
|
|
|
<target name="javadocs-internal" depends="build-contrib">
|
2004-08-17 16:38:46 -04:00
|
|
|
<mkdir dir="${build.dir}/docs/api-internal"/>
|
2005-04-19 20:38:57 -04:00
|
|
|
<invoke-javadoc
|
2005-04-20 15:46:10 -04:00
|
|
|
access="package"
|
2004-08-17 16:38:46 -04:00
|
|
|
destdir="${build.dir}/docs/api-internal"
|
2005-04-19 20:38:57 -04:00
|
|
|
/>
|
2004-08-17 16:38:46 -04:00
|
|
|
</target>
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2006-12-20 22:14:02 -05:00
|
|
|
<target name="package" depends="jar-core, javadocs, war-demo, build-contrib, init-dist">
|
2007-06-04 00:03:24 -04:00
|
|
|
<copy file="${build.demo.template}" tofile="${build.dir}/build-demo.xml">
|
|
|
|
<filterset begintoken="@PLACEHOLDER_" endtoken="@">
|
|
|
|
<filter token="version" value="${version}"/>
|
|
|
|
<filter token="javac.source" value="${javac.source}"/>
|
|
|
|
<filter token="javac.target" value="${javac.target}"/>
|
|
|
|
</filterset>
|
|
|
|
</copy>
|
2005-05-01 20:51:18 -04:00
|
|
|
</target>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2006-01-25 16:45:56 -05:00
|
|
|
<target name="nightly" depends="test, package-tgz">
|
|
|
|
</target>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the distribution with zip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-zip" depends="package"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene distribution as .zip">
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<delete file="${dist.dir}/lucene-${version}.zip"/>
|
|
|
|
<zip destfile="${dist.dir}/lucene-${version}.zip">
|
|
|
|
<zipfileset prefix="lucene-${version}" dir=".">
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset refid="binary.root.dist.patterns"/>
|
|
|
|
</zipfileset>
|
2007-06-04 00:03:24 -04:00
|
|
|
<zipfileset dir="${build.dir}" includes="build-demo.xml" fullpath="lucene-${version}/build.xml"/>
|
2005-05-06 19:43:54 -04:00
|
|
|
<zipfileset prefix="lucene-${version}" dir="${build.dir}">
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset refid="binary.build.dist.patterns"/>
|
|
|
|
</zipfileset>
|
2003-09-20 13:45:32 -04:00
|
|
|
</zip>
|
2007-06-04 21:18:48 -04:00
|
|
|
<lucene-checksum file="${dist.dir}/lucene-${version}.zip"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- packages the distribution with tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-tgz" depends="package"
|
|
|
|
description="--> Generates the lucene distribution as .tar.gz">
|
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<delete file="${build.dir}/lucene-${version}.tar"/>
|
|
|
|
<delete file="${dist.dir}/lucene-${version}.tar.gz"/>
|
|
|
|
<tar tarfile="${build.dir}/lucene-${version}.tar">
|
|
|
|
<tarfileset prefix="lucene-${version}" dir=".">
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset refid="binary.root.dist.patterns"/>
|
|
|
|
</tarfileset>
|
2007-06-04 00:03:24 -04:00
|
|
|
<tarfileset dir="${build.dir}" includes="build-demo.xml" fullpath="lucene-${version}/build.xml"/>
|
2005-05-06 19:43:54 -04:00
|
|
|
<tarfileset prefix="lucene-${version}" dir="${build.dir}">
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset refid="binary.build.dist.patterns"/>
|
|
|
|
</tarfileset>
|
2003-09-20 13:45:32 -04:00
|
|
|
</tar>
|
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<gzip zipfile="${dist.dir}/lucene-${version}.tar.gz"
|
|
|
|
src="${build.dir}/lucene-${version}.tar"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2007-06-04 21:18:48 -04:00
|
|
|
<lucene-checksum file="${dist.dir}/lucene-${version}.tar.gz"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- packages the distribution with zip and tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="package-all-binary" depends="package-zip, package-tgz"
|
|
|
|
description="--> Generates the .tar.gz and .zip distributions"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- same as package-all. it is just here for compatibility. -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="dist" depends="package-all-binary"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- S O U R C E D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
2006-12-20 22:14:02 -05:00
|
|
|
<target name="init-dist" >
|
2006-12-20 22:32:42 -05:00
|
|
|
|
2006-12-20 22:14:02 -05:00
|
|
|
<!-- Package is not called first if packaging src standalone, so the dist.dir may not exist -->
|
2006-12-20 22:32:42 -05:00
|
|
|
<mkdir dir="${build.dir}"/>
|
2006-12-20 22:14:02 -05:00
|
|
|
<mkdir dir="${dist.dir}"/>
|
|
|
|
</target>
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2006-12-20 22:14:02 -05:00
|
|
|
<target name="package-zip-src" depends="init, init-dist"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene sources as .zip">
|
2005-05-06 19:43:54 -04:00
|
|
|
<zip destfile="${dist.dir}/lucene-${version}-src.zip">
|
|
|
|
<zipfileset prefix="lucene-${version}" dir=".">
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset refid="src.dist.patterns"/>
|
|
|
|
</zipfileset>
|
2003-09-20 13:45:32 -04:00
|
|
|
</zip>
|
2007-06-04 21:18:48 -04:00
|
|
|
<lucene-checksum file="${dist.dir}/lucene-${version}-src.zip"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2006-12-20 22:14:02 -05:00
|
|
|
<target name="package-tgz-src" depends="init, init-dist"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene distribution as .tar.gz">
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<delete file="${build.dir}/lucene-${version}-src.tar"/>
|
|
|
|
<delete file="${dist.dir}/lucene-${version}-src.tar.gz"/>
|
|
|
|
<tar tarfile="${build.dir}/lucene-${version}-src.tar">
|
|
|
|
<tarfileset prefix="lucene-${version}" dir=".">
|
2005-05-01 21:06:14 -04:00
|
|
|
<patternset refid="src.dist.patterns"/>
|
|
|
|
</tarfileset>
|
2003-09-20 13:45:32 -04:00
|
|
|
</tar>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<gzip zipfile="${dist.dir}/lucene-${version}-src.tar.gz"
|
|
|
|
src="${build.dir}/lucene-${version}-src.tar"
|
2005-05-01 21:06:14 -04:00
|
|
|
/>
|
2007-06-04 21:18:48 -04:00
|
|
|
<lucene-checksum file="${dist.dir}/lucene-${version}-src.tar.gz"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip and tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-all-src" depends="package-zip-src, package-tgz-src"
|
2003-09-18 13:42:35 -04:00
|
|
|
description="--> Generates the .tar.gz and .zip source distributions"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- same as package-all-src. it is just here for compatibility. -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="dist-src" depends="package-all-src"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="dist-all" depends="dist, dist-src"/>
|
|
|
|
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- ================================================================== -->
|
2003-10-13 10:15:14 -04:00
|
|
|
<!-- Build the JavaCC files into the source tree -->
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- ================================================================== -->
|
2005-03-07 11:08:02 -05:00
|
|
|
<target name="jjdoc">
|
|
|
|
<mkdir dir="${build.dir}/docs/grammars"/>
|
|
|
|
<jjdoc target="src/java/org/apache/lucene/queryParser/QueryParser.jj"
|
|
|
|
outputfile="${build.dir}/docs/grammars/QueryParser.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
<jjdoc target="src/java/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
|
|
|
|
outputfile="${build.dir}/docs/grammars/StandardTokenizer.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
<jjdoc target="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"
|
|
|
|
outputfile="${build.dir}/docs/grammars/HTMLParser.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2005-03-07 15:28:25 -05:00
|
|
|
<target name="clean-javacc">
|
|
|
|
<delete>
|
2007-03-13 16:50:56 -04:00
|
|
|
<fileset dir="src/java/org/apache/lucene/analysis/standard" includes="*.java">
|
|
|
|
<containsregexp expression="Generated.*By.*JavaCC"/>
|
|
|
|
<exclude name="ParseException.java"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="src/java/org/apache/lucene/queryParser" includes="*.java">
|
|
|
|
<containsregexp expression="Generated.*By.*JavaCC"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="src/demo/org/apache/lucene/demo/html" includes="*.java">
|
|
|
|
<containsregexp expression="Generated.*By.*JavaCC"/>
|
2005-03-07 15:28:25 -05:00
|
|
|
</fileset>
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
2005-07-18 14:20:30 -04:00
|
|
|
<target name="javacc" depends="clean-javacc,javacc-StandardAnalyzer,javacc-QueryParser,javacc-HTMLParser"/>
|
2005-03-07 11:08:02 -05:00
|
|
|
|
2003-09-18 12:56:18 -04:00
|
|
|
<target name="javacc-StandardAnalyzer" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<!-- generate this in a build directory so we can exclude ParseException -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/gen/org/apache/lucene/analysis/standard"/>
|
2005-03-07 11:08:02 -05:00
|
|
|
|
|
|
|
<invoke-javacc target="src/java/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
|
|
|
|
outputDir="${build.dir}/gen/org/apache/lucene/analysis/standard"
|
|
|
|
/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<copy todir="src/java/org/apache/lucene/analysis/standard">
|
|
|
|
<fileset dir="${build.dir}/gen/org/apache/lucene/analysis/standard">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.java"/>
|
|
|
|
<exclude name="ParseException.java"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
|
2005-03-07 11:08:02 -05:00
|
|
|
<invoke-javacc target="src/java/org/apache/lucene/queryParser/QueryParser.jj"
|
|
|
|
outputDir="src/java/org/apache/lucene/queryParser"
|
|
|
|
/>
|
2003-09-18 12:56:18 -04:00
|
|
|
</target>
|
2005-03-07 11:08:02 -05:00
|
|
|
|
|
|
|
<target name="javacc-HTMLParser" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<invoke-javacc target="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"
|
|
|
|
outputDir="src/demo/org/apache/lucene/demo/html"
|
|
|
|
/>
|
2003-09-18 12:56:18 -04:00
|
|
|
</target>
|
2005-04-26 00:41:54 -04:00
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<macrodef name="contrib-crawl">
|
|
|
|
<attribute name="target" default=""/>
|
2007-05-30 03:18:29 -04:00
|
|
|
<attribute name="failonerror" default="true"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
<sequential>
|
2007-05-30 03:18:29 -04:00
|
|
|
<subant target="@{target}" failonerror="@{failonerror}">
|
2005-05-01 20:11:11 -04:00
|
|
|
<fileset dir="."
|
|
|
|
includes="contrib/*/build.xml"
|
|
|
|
/>
|
|
|
|
</subant>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2005-04-26 00:41:54 -04:00
|
|
|
<target name="build-contrib" depends="compile-test">
|
2005-05-01 20:11:11 -04:00
|
|
|
<contrib-crawl/>
|
2005-04-26 00:41:54 -04:00
|
|
|
</target>
|
2003-09-10 21:51:33 -04:00
|
|
|
|
2005-05-12 14:11:04 -04:00
|
|
|
<target name="test-contrib" depends="compile-test">
|
2007-05-30 03:18:29 -04:00
|
|
|
<!-- don't fail on error, instead check for flag file so we run
|
|
|
|
all the tests possible and can "ant generate-test-reports"
|
|
|
|
for all of them
|
|
|
|
-->
|
|
|
|
<contrib-crawl target="test" failonerror="false"/>
|
|
|
|
<available property="contribs.failed" file="junitfailed.flag">
|
|
|
|
<filepath>
|
|
|
|
<dirset dir="${build.dir}/contrib/">
|
|
|
|
<include name="**/test/" />
|
|
|
|
</dirset>
|
|
|
|
</filepath>
|
|
|
|
</available>
|
|
|
|
<fail if="contribs.failed">Contrib tests failed!</fail>
|
2005-05-12 14:11:04 -04:00
|
|
|
</target>
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<macrodef name="invoke-javadoc">
|
|
|
|
<attribute name="access"/>
|
|
|
|
<attribute name="destdir"/>
|
|
|
|
<sequential>
|
2006-06-14 14:54:28 -04:00
|
|
|
|
2006-12-14 17:02:03 -05:00
|
|
|
<dirset dir="contrib/gdata-server/src/core/src/java" id="gdata-server-core">
|
2007-05-31 16:58:55 -04:00
|
|
|
<include name="**" if="build-1-5-contrib" />
|
2006-06-14 14:54:28 -04:00
|
|
|
</dirset>
|
2006-12-14 17:02:03 -05:00
|
|
|
<dirset dir="contrib/gdata-server/src/gom/src/java" id="gdata-server-gom">
|
2007-05-31 16:58:55 -04:00
|
|
|
<include name="**" if="build-1-5-contrib" />
|
2006-12-14 17:02:03 -05:00
|
|
|
</dirset>
|
|
|
|
<dirset dir="contrib/gdata-server/src/hivemind/src/java" id="gdata-server-hivemind">
|
2007-05-31 16:58:55 -04:00
|
|
|
<include name="**" if="build-1-5-contrib" />
|
2006-12-14 17:02:03 -05:00
|
|
|
</dirset>
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<javadoc
|
|
|
|
overview="src/java/overview.html"
|
|
|
|
packagenames="org.apache.lucene.*"
|
|
|
|
destdir="@{destdir}"
|
|
|
|
access="@{access}"
|
|
|
|
encoding="${build.encoding}"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
2006-12-12 15:56:44 -05:00
|
|
|
source="${ant.java.version}"
|
2005-05-01 20:11:11 -04:00
|
|
|
link="${javadoc.link}"
|
|
|
|
windowtitle="${Name} ${version} API"
|
|
|
|
doctitle="${Name} ${version} API"
|
|
|
|
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved.">
|
|
|
|
<tag name="todo" description="To Do:"/>
|
|
|
|
|
|
|
|
<!-- TODO: find a dynamic way to do include multiple source roots -->
|
2007-05-04 15:54:30 -04:00
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<packageset dir="src/java"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
|
2007-05-04 15:54:30 -04:00
|
|
|
<packageset dir="src/demo"/>
|
|
|
|
|
2007-05-09 13:45:58 -04:00
|
|
|
<!-- please keep this list up to date, and in alpha order... -->
|
|
|
|
<!-- with the minor exception of gdata which is managed by ref -->
|
|
|
|
|
|
|
|
<!-- ie: `find contrib/* -path \*src/java | grep -v gdata | sort` -->
|
|
|
|
|
|
|
|
<!-- if you make changes to the list of package sets, also -->
|
|
|
|
<!-- make sure the group list below is updated. -->
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<packageset dir="contrib/analyzers/src/java"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
<packageset dir="contrib/ant/src/java"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<packageset dir="contrib/benchmark/src/java"/>
|
|
|
|
<packageset dir="contrib/db/bdb-je/src/java"/>
|
|
|
|
<packageset dir="contrib/db/bdb/src/java"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
<packageset dir="contrib/highlighter/src/java"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
<packageset dir="contrib/lucli/src/java"/>
|
|
|
|
<packageset dir="contrib/memory/src/java"/>
|
|
|
|
<packageset dir="contrib/miscellaneous/src/java"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<packageset dir="contrib/queries/src/java"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
<packageset dir="contrib/regex/src/java"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<packageset dir="contrib/similarity/src/java"/>
|
2006-02-20 13:11:02 -05:00
|
|
|
<packageset dir="contrib/snowball/src/java"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
<packageset dir="contrib/spellchecker/src/java"/>
|
|
|
|
<packageset dir="contrib/surround/src/java"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
<packageset dir="contrib/swing/src/java"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
<packageset dir="contrib/wordnet/src/java"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<packageset dir="contrib/xml-query-parser/src/java"/>
|
|
|
|
<!-- end alpha sort -->
|
2006-12-14 17:02:03 -05:00
|
|
|
<packageset refid="gdata-server-core" />
|
|
|
|
<packageset refid="gdata-server-gom" />
|
|
|
|
<packageset refid="gdata-server-hivemind" />
|
2005-05-01 20:11:11 -04:00
|
|
|
|
2007-05-09 13:45:58 -04:00
|
|
|
<!-- If the main javadoc Group listing includes an "Other -->
|
|
|
|
<!-- Packages" group after the ones listed here, then those -->
|
|
|
|
<!-- packages are not being matched by any of these rules -->
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<group title="Core" packages="org.apache.*:org.apache.lucene.analysis:org.apache.lucene.analysis.standard*"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
|
|
|
|
<group title="Demo" packages="org.apache.lucene.demo*"/>
|
|
|
|
|
2006-02-27 14:54:13 -05:00
|
|
|
<group title="contrib: Analysis" packages="org.apache.lucene.analysis.*"/>
|
|
|
|
<group title="contrib: Ant" packages="org.apache.lucene.ant*"/>
|
2007-05-05 01:36:49 -04:00
|
|
|
<group title="contrib: Benchmark" packages="org.apache.lucene.benchmark*"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<group title="contrib: DB" packages="org.apache.lucene.store.db*:org.apache.lucene.store.je*:com.sleepycat*"/>
|
2006-02-27 14:54:13 -05:00
|
|
|
<group title="contrib: Highlighter" packages="org.apache.lucene.search.highlight*"/>
|
2006-06-14 14:54:28 -04:00
|
|
|
<group title="contrib: GData Server (Java1.5)" packages="org.apache.lucene.gdata.*"/>
|
2006-02-27 14:54:13 -05:00
|
|
|
<group title="contrib: Lucli" packages="lucli*"/>
|
|
|
|
<group title="contrib: Memory" packages="org.apache.lucene.index.memory*"/>
|
|
|
|
<group title="contrib: Miscellaneous " packages="org.apache.lucene.misc*:org.apache.lucene.queryParser.analyzing*:org.apache.lucene.queryParser.precedence*"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<group title="contrib: Queries" packages="org.apache.lucene.search.similar*"/>
|
2006-02-27 14:54:13 -05:00
|
|
|
<group title="contrib: RegEx" packages="org.apache.lucene.search.regex*:org.apache.regexp*"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<!-- no group for similarity. -->
|
|
|
|
<!-- nothing in there at the moment, so no package structure -->
|
2006-02-27 14:54:13 -05:00
|
|
|
<group title="contrib: Snowball" packages="org.apache.lucene.analysis.snowball*:net.sf.snowball*"/>
|
2006-12-12 08:44:09 -05:00
|
|
|
|
2007-05-04 15:54:30 -04:00
|
|
|
<group title="contrib: SpellChecker" packages="org.apache.lucene.search.spell*"/>
|
|
|
|
<group title="contrib: Surround Parser" packages="org.apache.lucene.queryParser.surround*"/>
|
2006-02-27 14:54:13 -05:00
|
|
|
<group title="contrib: Swing" packages="org.apache.lucene.swing*"/>
|
|
|
|
<group title="contrib: WordNet" packages="org.apache.lucene.wordnet*"/>
|
2007-05-09 13:45:58 -04:00
|
|
|
<group title="contrib: XML Query Parser" packages="org.apache.lucene.xmlparser*"/>
|
2006-02-27 14:50:18 -05:00
|
|
|
|
2007-05-04 15:54:30 -04:00
|
|
|
|
2007-05-05 01:36:49 -04:00
|
|
|
<classpath refid="javadoc.classpath"/>
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
</javadoc>
|
2007-05-05 01:36:49 -04:00
|
|
|
|
2007-05-04 15:54:30 -04:00
|
|
|
</sequential>
|
2005-05-01 20:11:11 -04:00
|
|
|
</macrodef>
|
2007-06-04 21:18:48 -04:00
|
|
|
|
|
|
|
<!-- Macro for building checksum files
|
|
|
|
This is only needed until the "format" option is supported
|
|
|
|
by ant's built in checksum task
|
|
|
|
-->
|
|
|
|
<macrodef name="lucene-checksum">
|
|
|
|
<attribute name="file"/>
|
|
|
|
<!-- NOTE: we use the value of @{file} in the names any properties
|
|
|
|
set because macro's don't have variables, and otherwise we
|
|
|
|
wouldn't be able to checksum more then one file per build
|
|
|
|
-->
|
|
|
|
<sequential>
|
|
|
|
<checksum file="@{file}"
|
|
|
|
property="@{file}.sum"
|
|
|
|
algorithm="${checksum.algorithm}" />
|
|
|
|
<basename file="@{file}" property="@{file}.base" />
|
|
|
|
<concat destfile="@{file}.${checksum.algorithm}"
|
|
|
|
force="yes"
|
|
|
|
append="false"
|
|
|
|
fixlastline="yes">
|
|
|
|
<header trimleading="yes">${@{file}.sum} </header>
|
|
|
|
<!-- empty fileset to trick concat -->
|
|
|
|
<fileset dir="." excludes="**" />
|
|
|
|
<footer trimleading="yes">${@{file}.base}
|
|
|
|
</footer>
|
|
|
|
</concat>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2001-09-11 17:44:36 -04:00
|
|
|
</project>
|