2001-09-18 12:31:24 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="Lucene" default="jar" basedir=".">
|
|
|
|
|
|
|
|
<property file="${user.home}/build.properties"/>
|
|
|
|
<property file="build.properties"/>
|
|
|
|
|
|
|
|
<!-- Build classpath -->
|
|
|
|
<path id="classpath">
|
|
|
|
<pathelement location="${build.classes}"/>
|
2001-09-18 13:21:38 -04:00
|
|
|
<pathelement location="${build.demo.classes}"/>
|
2001-09-18 13:35:57 -04:00
|
|
|
<pathelement location="${build.test.classes}"/>
|
2001-09-18 12:31:24 -04:00
|
|
|
<pathelement location="."/>
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="junit.classpath">
|
|
|
|
<pathelement location="${junit.classes}" />
|
|
|
|
<pathelement location="${build.classes}"/>
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
<pathelement path="${java.class.path}" />
|
|
|
|
</path>
|
|
|
|
|
2001-10-10 12:36:12 -04:00
|
|
|
<path id="anakia.classpath">
|
|
|
|
<fileset dir="${jakarta.site2.home}/lib">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Prepares the build directory -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="init">
|
|
|
|
<mkdir dir="${build.dir}"/>
|
|
|
|
<mkdir dir="${build.classes}"/>
|
|
|
|
<mkdir dir="${build.src}"/>
|
|
|
|
|
|
|
|
<available
|
|
|
|
property="javacc.present"
|
|
|
|
classname="COM.sun.labs.javacc.Main"
|
|
|
|
classpath="${javacc.zip}"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<available
|
|
|
|
property="junit.present"
|
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc_check" depends="init" unless="javacc.present">
|
|
|
|
<echo>
|
|
|
|
##################################################################
|
|
|
|
JavaCC not found.
|
|
|
|
JavaCC Home: ${javacc.home}
|
|
|
|
JavaCC Zip: ${javacc.zip}
|
|
|
|
|
|
|
|
Please download and install JavaCC 2.0 from:
|
|
|
|
|
|
|
|
<http://www.webgain.com/products/metamata/java_doc.html>
|
|
|
|
|
|
|
|
Then, create a .ant.properties file either in your home
|
|
|
|
directory, or within the Lucene directory and set the javacc.home
|
|
|
|
property to the path where JavaCC.zip is located. For example,
|
|
|
|
if you installed JavaCC in /usr/local/java/javacc2.0, then set the
|
|
|
|
javacc.home property to:
|
|
|
|
|
|
|
|
javacc.home=/usr/local/java/javacc2.0/bin/lib
|
|
|
|
|
|
|
|
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: COM/sun/labs/javacc/Main
|
|
|
|
##################################################################
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- C O M P I L E -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="compile" depends="init,javacc_check" if="javacc.present">
|
|
|
|
<mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
|
|
|
|
<javacc
|
|
|
|
target="${src.dir}/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
|
|
|
|
javacchome="${javacc.zip.dir}"
|
|
|
|
outputdirectory="${build.src}/org/apache/lucene/analysis/standard"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<delete file="${build.src}/org/apache/lucene/analysis/standard/ParseException.java"/>
|
|
|
|
<mkdir dir="${build.src}/org/apache/lucene/queryParser"/>
|
|
|
|
<javacc
|
|
|
|
target="${src.dir}/org/apache/lucene/queryParser/QueryParser.jj"
|
|
|
|
javacchome="${javacc.zip.dir}"
|
|
|
|
outputdirectory="${build.src}/org/apache/lucene/queryParser"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<javac
|
|
|
|
srcdir="${src.dir}:${build.src}"
|
|
|
|
includes="org/**/*.java"
|
|
|
|
destdir="${build.classes}"
|
|
|
|
debug="${debug}">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A R -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="jar" depends="compile" if="javacc.present">
|
|
|
|
<jar
|
|
|
|
jarfile="${build.dir}/${final.name}.jar"
|
|
|
|
basedir="${build.classes}"
|
2001-11-18 20:19:23 -05:00
|
|
|
excludes="**/*.java"
|
2001-09-18 12:31:24 -04:00
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2002-01-26 10:01:32 -05:00
|
|
|
<target name="jardemo" depends="compile,demo" if="javacc.present">
|
|
|
|
<jar
|
|
|
|
jarfile="${build.demo}/${build.demo.name}.jar"
|
|
|
|
basedir="${build.demo.classes}"
|
|
|
|
excludes="**/*.java"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="wardemo" depends="compile,demo,jar,jardemo" if="javacc.present">
|
|
|
|
<mkdir dir="${build.demo}/${build.war.name}"/>
|
|
|
|
<mkdir dir="${build.demo}/${build.war.name}/WEB-INF"/>
|
|
|
|
<mkdir dir="${build.demo}/${build.war.name}/WEB-INF/lib"/>
|
|
|
|
|
|
|
|
<copy todir="${build.demo}/${build.war.name}">
|
|
|
|
<fileset dir="${demo.jsp}">
|
|
|
|
<include name="**/*.jsp"/>
|
|
|
|
<include name="**/*.xml"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<copy todir="${build.demo}/${build.war.name}/WEB-INF/lib">
|
|
|
|
<fileset dir="${build.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<copy todir="${build.demo}/${build.war.name}/WEB-INF/lib">
|
|
|
|
<fileset dir="${build.demo}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<jar
|
|
|
|
jarfile="${build.demo}/${build.war.name}.war"
|
|
|
|
basedir="${build.demo}/${build.war.name}"
|
|
|
|
excludes="**/*.java"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2001-11-04 17:37:25 -05:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A R S O U R C E -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2001-11-18 20:19:23 -05:00
|
|
|
<target name="jar-src" depends="init,javacc_check" if="javacc.present">
|
|
|
|
<mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
|
|
|
|
<javacc
|
|
|
|
target="${src.dir}/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
|
|
|
|
javacchome="${javacc.zip.dir}"
|
|
|
|
outputdirectory="${build.src}/org/apache/lucene/analysis/standard"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<delete file="${build.src}/org/apache/lucene/analysis/standard/ParseException.java"/>
|
|
|
|
<mkdir dir="${build.src}/org/apache/lucene/queryParser"/>
|
|
|
|
<javacc
|
|
|
|
target="${src.dir}/org/apache/lucene/queryParser/QueryParser.jj"
|
|
|
|
javacchome="${javacc.zip.dir}"
|
|
|
|
outputdirectory="${build.src}/org/apache/lucene/queryParser"
|
|
|
|
/>
|
|
|
|
|
2001-11-04 17:37:25 -05:00
|
|
|
<jar jarfile="${build.dir}/${final.name}-src.jar">
|
2001-11-18 20:19:23 -05:00
|
|
|
<fileset dir="${build.dir}" includes="**/*.java"/>
|
2001-11-04 17:37:25 -05:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- B U I L D D E M O -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="demo" depends="compile" if="javacc.present">
|
|
|
|
<mkdir dir="${build.demo}"/>
|
2001-09-18 13:04:21 -04:00
|
|
|
|
2001-09-18 13:35:57 -04:00
|
|
|
<copy todir="${build.demo.src}">
|
2001-09-18 13:04:21 -04:00
|
|
|
<fileset dir="${demo.src}">
|
|
|
|
<include name="**/*.java"/>
|
|
|
|
<include name="**/*.jj"/>
|
2001-09-18 12:31:24 -04:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<javacc
|
2002-01-26 10:01:32 -05:00
|
|
|
target="${build.demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"
|
2001-09-18 12:31:24 -04:00
|
|
|
javacchome="${javacc.zip.dir}"
|
2002-01-26 10:01:32 -05:00
|
|
|
outputdirectory="${build.demo.src}/org/apache/lucene/demo/html"
|
2001-09-18 12:31:24 -04:00
|
|
|
/>
|
2001-09-18 13:21:38 -04:00
|
|
|
|
2001-09-18 13:35:57 -04:00
|
|
|
<mkdir dir="${build.demo.classes}"/>
|
2001-09-18 13:21:38 -04:00
|
|
|
|
2001-09-18 12:31:24 -04:00
|
|
|
<javac
|
2001-09-18 13:35:57 -04:00
|
|
|
srcdir="${build.demo.src}"
|
2001-09-18 13:21:38 -04:00
|
|
|
includes="**/*.java"
|
2001-09-18 13:35:57 -04:00
|
|
|
destdir="${build.demo.classes}"
|
2001-09-18 12:31:24 -04:00
|
|
|
debug="${debug}">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- B U I L D T E S T -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2001-09-18 13:35:57 -04:00
|
|
|
<target name="test" depends="compile,demo">
|
2001-09-18 12:31:24 -04:00
|
|
|
<mkdir dir="${build.test}"/>
|
2001-09-18 13:35:57 -04:00
|
|
|
|
|
|
|
<copy todir="${build.test.src}">
|
|
|
|
<fileset dir="${test.src}">
|
|
|
|
<include name="**/*.java"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<mkdir dir="${build.test.classes}"/>
|
|
|
|
|
2001-09-18 12:31:24 -04:00
|
|
|
<javac
|
2001-09-18 13:35:57 -04:00
|
|
|
srcdir="${build.test.src}"
|
|
|
|
includes="**/*.java"
|
|
|
|
destdir="${build.test.classes}"
|
2001-09-18 12:31:24 -04:00
|
|
|
debug="${debug}">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- R U N T E S T S -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2001-10-31 20:13:00 -05:00
|
|
|
<target name="test-unit" depends="compile,test" if="junit.present">
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- Import JUnit task -->
|
|
|
|
<taskdef
|
|
|
|
name="junit"
|
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<mkdir dir="${junit.classes}"/>
|
|
|
|
<mkdir dir="${junit.reports}"/>
|
|
|
|
<javac
|
|
|
|
srcdir="${junit.src}"
|
|
|
|
includes="**/*.java"
|
|
|
|
destdir="${junit.classes}"
|
|
|
|
debug="${debug}">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<junit printsummary="yes" haltonfailure="no" >
|
|
|
|
<classpath refid="junit.classpath"/>
|
|
|
|
<formatter type="plain" />
|
|
|
|
<batchtest fork="yes" todir="${junit.reports}">
|
|
|
|
<fileset dir="${junit.src}" includes="**/Test*.java" />
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D O C U M E N T A T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2001-09-18 13:49:23 -04:00
|
|
|
<target name="docs-prepare">
|
2001-09-18 12:31:24 -04:00
|
|
|
<available
|
|
|
|
classname="org.apache.velocity.anakia.AnakiaTask"
|
|
|
|
property="AnakiaTask.present"
|
2001-10-10 12:36:12 -04:00
|
|
|
classpathref="anakia.classpath"
|
2001-09-18 12:31:24 -04:00
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target depends="docs-prepare" name="prepare-error" unless="AnakiaTask.present">
|
|
|
|
<echo>
|
|
|
|
AnakiaTask is not present! Please check to make sure that
|
2001-10-10 12:36:12 -04:00
|
|
|
you have jakarta.site2.home set correctly.
|
2001-09-18 12:31:24 -04:00
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="docs" depends="prepare-error" if="AnakiaTask.present">
|
2001-09-18 13:49:23 -04:00
|
|
|
<taskdef
|
|
|
|
name="anakia"
|
|
|
|
classname="org.apache.velocity.anakia.AnakiaTask"
|
|
|
|
>
|
2001-10-10 12:36:12 -04:00
|
|
|
<classpath refid="anakia.classpath"/>
|
2001-09-18 13:49:23 -04:00
|
|
|
</taskdef>
|
|
|
|
|
2001-09-18 12:31:24 -04:00
|
|
|
<anakia
|
|
|
|
basedir="${docs.src}"
|
|
|
|
destdir="${docs.dest}/"
|
|
|
|
extension=".html" style="./site.vsl"
|
|
|
|
projectFile="stylesheets/project.xml"
|
|
|
|
excludes="**/stylesheets/** empty.xml"
|
|
|
|
includes="**/*.xml"
|
|
|
|
lastModifiedCheck="true"
|
2001-10-10 12:36:12 -04:00
|
|
|
templatePath="${jakarta.site2.home}/xdocs/stylesheets"
|
2001-09-18 12:31:24 -04:00
|
|
|
>
|
|
|
|
</anakia>
|
|
|
|
|
|
|
|
<copy todir="${docs.dest}/images" filtering="no">
|
|
|
|
<fileset dir="${docs.src}/images">
|
|
|
|
<include name="**/*.gif"/>
|
|
|
|
<include name="**/*.jpeg"/>
|
|
|
|
<include name="**/*.jpg"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- In case we have CSS someday
|
|
|
|
<copy todir="${docs.dest}" filtering="no">
|
|
|
|
<fileset dir="${docs.src}">
|
|
|
|
<include name="**/*.css"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
-->
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A V A D O C -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="javadocs" depends="compile" if="javacc.present">
|
|
|
|
<mkdir dir="${build.javadocs}"/>
|
|
|
|
<javadoc
|
2001-10-02 11:54:16 -04:00
|
|
|
sourcepath="${src.dir}:${build.src}"
|
|
|
|
overview="${src.dir}/overview.html"
|
2001-09-18 12:31:24 -04:00
|
|
|
packagenames="${packages}"
|
|
|
|
destdir="${build.javadocs}"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
2001-09-25 15:07:06 -04:00
|
|
|
link="${javadoc.link}"
|
2001-09-18 12:31:24 -04:00
|
|
|
windowtitle="${Name} ${version} API"
|
|
|
|
doctitle="${Name} ${version} API"
|
2001-09-25 15:07:06 -04:00
|
|
|
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved."
|
2001-09-18 12:31:24 -04:00
|
|
|
>
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2002-01-26 10:01:32 -05:00
|
|
|
<target name="package" depends="jar, javadocs, demo, wardemo">
|
2001-09-18 12:31:24 -04:00
|
|
|
<mkdir dir="${dist.dir}"/>
|
|
|
|
<mkdir dir="${dist.dir}/docs"/>
|
|
|
|
<mkdir dir="${dist.dir}/docs/api"/>
|
2002-01-27 18:20:04 -05:00
|
|
|
<mkdir dir="${dist.dir}/src/demo"/>
|
|
|
|
<mkdir dir="${dist.dir}/src/jsp"/>
|
2001-09-18 12:31:24 -04:00
|
|
|
|
|
|
|
<copy todir="${dist.dir}/docs">
|
|
|
|
<fileset dir="${docs.dir}"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}/docs/api">
|
|
|
|
<fileset dir="${build.javadocs}"/>
|
|
|
|
</copy>
|
2002-01-26 10:01:32 -05:00
|
|
|
|
2002-01-27 18:20:04 -05:00
|
|
|
<copy todir="${dist.dir}/src/demo">
|
|
|
|
<fileset dir="src/demo"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}/src/jsp">
|
|
|
|
<fileset dir="src/jsp"/>
|
2001-10-19 13:15:19 -04:00
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}/lib">
|
|
|
|
<fileset dir="lib"/>
|
2001-10-02 14:31:22 -04:00
|
|
|
</copy>
|
2001-11-04 12:23:04 -05:00
|
|
|
<copy todir="${dist.dir}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="*.txt" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2001-09-18 12:31:24 -04:00
|
|
|
<copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/>
|
2002-01-26 10:01:32 -05:00
|
|
|
<copy file="${build.demo}/${build.demo.name}.jar" todir="${dist.dir}"/>
|
|
|
|
<copy file="${build.demo}/${build.war.name}.war" todir="${dist.dir}"/>
|
2001-09-18 12:31:24 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
2001-11-18 20:19:23 -05:00
|
|
|
<!-- Packages the distribution with zip -->
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-zip" depends="package"
|
2001-11-18 20:19:23 -05:00
|
|
|
description="--> Generates the Lucene distribution as .zip">
|
2001-09-18 12:31:24 -04:00
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}.zip"/>
|
|
|
|
<zip
|
|
|
|
zipfile="${basedir}/${final.name}.zip"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}/**"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
2001-11-18 20:19:23 -05:00
|
|
|
<!-- packages the distribution with tar-gzip -->
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-tgz" depends="package"
|
2001-11-18 20:19:23 -05:00
|
|
|
description="--> generates the lucene distribution as .tar.gz">
|
2001-09-18 12:31:24 -04:00
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}.tar.gz"/>
|
|
|
|
<tar
|
|
|
|
tarfile="${basedir}/${final.name}.tar"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}/**"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<gzip
|
|
|
|
zipfile="${basedir}/${final.name}.tar.gz"
|
|
|
|
src="${basedir}/${final.name}.tar"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
2001-11-18 20:19:23 -05:00
|
|
|
<!-- packages the distribution with zip and tar-gzip -->
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-all" depends="package-zip, package-tgz"
|
|
|
|
description="--> generates the .tar.gz and .zip distributions">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
2001-11-18 20:19:23 -05:00
|
|
|
<!-- same as package-all. it is just here for compatibility. -->
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="dist" depends="package-all">
|
|
|
|
</target>
|
|
|
|
|
2001-11-18 20:19:23 -05:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- S O U R C E D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-src" depends="jar-src">
|
|
|
|
<mkdir dir="${dist-src.dir}"/>
|
|
|
|
<copy todir="${dist-src.dir}/src">
|
|
|
|
<fileset dir="src"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist-src.dir}/lib">
|
|
|
|
<fileset dir="lib"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist-src.dir}/" file="build.xml"/>
|
|
|
|
<copy todir="${dist-src.dir}/" file="build.properties"/>
|
|
|
|
<copy todir="${dist-src.dir}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="*.txt" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy file="${build.dir}/${final.name}-src.jar" todir="${dist-src.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-zip-src" depends="package-src"
|
|
|
|
description="--> Generates the Lucene sources as .zip">
|
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}-src.zip"/>
|
|
|
|
<zip
|
|
|
|
zipfile="${basedir}/${final.name}-src.zip"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}-src/**"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-tgz-src" depends="package-src"
|
|
|
|
description="--> Generates the Lucene distribution as .tar.gz">
|
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar.gz"/>
|
|
|
|
<tar
|
|
|
|
tarfile="${basedir}/${final.name}-src.tar"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}-src/**"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<gzip
|
|
|
|
zipfile="${basedir}/${final.name}-src.tar.gz"
|
|
|
|
src="${basedir}/${final.name}-src.tar"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip and tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-all-src" depends="package-zip-src, package-tgz-src"
|
|
|
|
description="--> Generates the .tar.gz and .zip source distributions">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- same as package-all-src. it is just here for compatibility. -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="dist-src" depends="package-all-src">
|
|
|
|
</target>
|
|
|
|
|
2001-09-18 12:31:24 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- C L E A N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="clean" depends="init">
|
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
<delete dir="${dist.dir}"/>
|
|
|
|
<delete file="${basedir}/${final.name}.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}.tar.gz"/>
|
|
|
|
<delete file="${basedir}/${final.name}.zip"/>
|
2002-01-27 18:20:04 -05:00
|
|
|
<delete dir="${dist.dir}-src"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar.gz"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.zip"/>
|
2001-09-18 12:31:24 -04:00
|
|
|
</target>
|
2001-09-11 17:44:36 -04:00
|
|
|
</project>
|