mirror of https://github.com/apache/lucene.git
major build process cleanup
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ad878e900
commit
aad53f0dba
396
build.xml
396
build.xml
|
@ -7,13 +7,37 @@
|
||||||
<property file="${user.home}/lucene.build.properties"/>
|
<property file="${user.home}/lucene.build.properties"/>
|
||||||
<property file="${user.home}/build.properties"/>
|
<property file="${user.home}/build.properties"/>
|
||||||
<property file="${basedir}/build.properties"/>
|
<property file="${basedir}/build.properties"/>
|
||||||
<property file="${basedir}/default.properties"/>
|
|
||||||
|
|
||||||
|
<property name="name" value="lucene"/>
|
||||||
|
<property name="Name" value="Lucene"/>
|
||||||
|
<property name="version" value="1.3-rc2-dev"/>
|
||||||
|
<property name="year" value="2000-2003"/> <!-- todo: make this dynamic -->
|
||||||
|
<property name="final.name" value="${name}-${version}"/>
|
||||||
|
<property name="javac.debug" value="on"/>
|
||||||
|
<property name="project.name" value="site"/> <!-- todo: is this used by anakia or something else? -->
|
||||||
|
<property name="javadoc.link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
|
||||||
|
<property name="build.compiler.pedantic" value="false"/>
|
||||||
|
<property name="build.encoding" value="ISO-8859-1"/>
|
||||||
|
|
||||||
|
<property name="build.dir" location="build"/>
|
||||||
|
<property name="dist.dir" location="dist"/>
|
||||||
|
|
||||||
|
<property name="demo.name" value="${name}-demos-${version}"/>
|
||||||
|
<property name="demo.war.name" value="luceneweb"/>
|
||||||
|
|
||||||
|
<property name="javacc.home" location="."/>
|
||||||
|
<property name="javacc.jar.dir" location="${javacc.home}/bin/lib"/>
|
||||||
|
<property name="javacc.jar" location="${javacc.jar.dir}/javacc.jar"/>
|
||||||
<property name="javacc.main.class" value="org.javacc.parser.Main"/>
|
<property name="javacc.main.class" value="org.javacc.parser.Main"/>
|
||||||
|
|
||||||
|
<property name="jakarta.site2.home" location="../jakarta-site2"/>
|
||||||
|
|
||||||
|
<property name="junit.output.dir" location="${build.dir}/test"/>
|
||||||
|
<property name="junit.reports" location="${build.dir}/test/reports"/>
|
||||||
|
|
||||||
<!-- Build classpath -->
|
<!-- Build classpath -->
|
||||||
<path id="classpath">
|
<path id="classpath">
|
||||||
<pathelement location="${build.classes}"/>
|
<pathelement location="${build.dir}/classes/java"/>
|
||||||
<fileset dir="lib">
|
<fileset dir="lib">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
|
@ -21,17 +45,17 @@
|
||||||
|
|
||||||
<path id="demo.classpath">
|
<path id="demo.classpath">
|
||||||
<path refid="classpath"/>
|
<path refid="classpath"/>
|
||||||
<pathelement location="${build.demo.classes}"/>
|
<pathelement location="${build.dir}/classes/demo"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<path id="test.classpath">
|
<path id="test.classpath">
|
||||||
<path refid="demo.classpath"/>
|
<path refid="demo.classpath"/>
|
||||||
<pathelement location="${build.test.classes}"/>
|
<pathelement location="${build.dir}/classes/test"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<path id="junit.classpath">
|
<path id="junit.classpath">
|
||||||
<pathelement location="${build.test.classes}"/>
|
<pathelement location="${build.dir}/classes/test"/>
|
||||||
<pathelement location="${build.classes}"/>
|
<pathelement location="${build.dir}/classes/java"/>
|
||||||
<fileset dir="lib">
|
<fileset dir="lib">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
|
@ -49,8 +73,7 @@
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<mkdir dir="${build.dir}"/>
|
<mkdir dir="${build.dir}"/>
|
||||||
<mkdir dir="${build.classes}"/>
|
<mkdir dir="${dist.dir}"/>
|
||||||
<mkdir dir="${build.src}"/>
|
|
||||||
|
|
||||||
<available
|
<available
|
||||||
property="javacc.present"
|
property="javacc.present"
|
||||||
|
@ -74,7 +97,7 @@
|
||||||
##################################################################
|
##################################################################
|
||||||
JavaCC not found.
|
JavaCC not found.
|
||||||
JavaCC Home: ${javacc.home}
|
JavaCC Home: ${javacc.home}
|
||||||
JavaCC Zip: ${javacc.jar}
|
JavaCC JAR: ${javacc.jar}
|
||||||
|
|
||||||
Please download and install JavaCC from:
|
Please download and install JavaCC from:
|
||||||
|
|
||||||
|
@ -82,11 +105,11 @@
|
||||||
|
|
||||||
Then, create a build.properties file either in your home
|
Then, create a build.properties file either in your home
|
||||||
directory, or within the Lucene directory and set the javacc.home
|
directory, or within the Lucene directory and set the javacc.home
|
||||||
property to the path where JavaCC.zip is located. For example,
|
property to the path where JavaCC is installed. For example,
|
||||||
if you installed JavaCC in /usr/local/java/javacc3.2, then set the
|
if you installed JavaCC in /usr/local/java/javacc-3.2, then set the
|
||||||
javacc.home property to:
|
javacc.home property to:
|
||||||
|
|
||||||
javacc.home=/usr/local/java/javacc2.0/bin
|
javacc.home=/usr/local/java/javacc-3.2
|
||||||
|
|
||||||
If you get an error like the one below, then you have not installed
|
If you get an error like the one below, then you have not installed
|
||||||
things correctly. Please check all your paths and try again.
|
things correctly. Please check all your paths and try again.
|
||||||
|
@ -103,17 +126,18 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="compile-core" depends="init">
|
<target name="compile-core" depends="init">
|
||||||
|
<mkdir dir="${build.dir}/classes/java"/>
|
||||||
<javac
|
<javac
|
||||||
encoding="${build.encoding}"
|
encoding="${build.encoding}"
|
||||||
srcdir="${src.dir}"
|
srcdir="src/java"
|
||||||
includes="org/**/*.java"
|
includes="org/**/*.java"
|
||||||
destdir="${build.classes}"
|
destdir="${build.dir}/classes/java"
|
||||||
debug="${debug}">
|
debug="${javac.debug}">
|
||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<rmic classname="org.apache.lucene.search.RemoteSearchable"
|
<rmic classname="org.apache.lucene.search.RemoteSearchable"
|
||||||
base="${build.classes}">
|
base="${build.dir}/classes/java">
|
||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
</rmic>
|
</rmic>
|
||||||
</target>
|
</target>
|
||||||
|
@ -126,8 +150,8 @@
|
||||||
<target name="jar-core" depends="compile-core">
|
<target name="jar-core" depends="compile-core">
|
||||||
|
|
||||||
<jar
|
<jar
|
||||||
jarfile="${build.dir}/${final.name}.jar"
|
destfile="${build.dir}/${final.name}.jar"
|
||||||
basedir="${build.classes}"
|
basedir="${build.dir}/classes/java"
|
||||||
excludes="**/*.java">
|
excludes="**/*.java">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Created-By" value="Apache Jakarta"/>
|
<attribute name="Created-By" value="Apache Jakarta"/>
|
||||||
|
@ -142,57 +166,22 @@
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
|
||||||
Manifest-Version: 1.0
|
|
||||||
Ant-Version: Apache Ant 1.6alpha
|
|
||||||
Created-By: Apache Jakarta
|
|
||||||
|
|
||||||
Name: org/apache/lucene
|
|
||||||
Specification-Title: Lucene Search Engine
|
|
||||||
Specification-Version: 1.3-rc2-dev
|
|
||||||
Specification-Vendor: Lucene
|
|
||||||
Implementation-Title: org.apache.lucene
|
|
||||||
Implementation-Version: build 2003-09-18 13:08:01
|
|
||||||
Implementation-Vendor: Lucene
|
|
||||||
-->
|
|
||||||
|
|
||||||
<target name="jar-demo" depends="compile-demo">
|
<target name="jar-demo" depends="compile-demo">
|
||||||
<jar
|
<jar
|
||||||
jarfile="${build.demo}/${build.demo.name}.jar"
|
destfile="${build.dir}/${demo.name}.jar"
|
||||||
basedir="${build.demo.classes}"
|
basedir="${build.dir}/classes/demo"
|
||||||
excludes="**/*.java"
|
excludes="**/*.java"
|
||||||
/>
|
/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="war-demo" depends="jar-core,jar-demo">
|
<target name="war-demo" depends="jar-core,jar-demo">
|
||||||
<mkdir dir="${build.demo}/${build.demo.war.name}"/>
|
<!-- todo: convert this to use war task instead -->
|
||||||
<mkdir dir="${build.demo}/${build.demo.war.name}/WEB-INF"/>
|
<jar destfile="${build.dir}/${demo.war.name}.war">
|
||||||
<mkdir dir="${build.demo}/${build.demo.war.name}/WEB-INF/lib"/>
|
<fileset dir="src/jsp"/>
|
||||||
|
<zipfileset prefix="WEB-INF/lib" dir="${build.dir}" includes="${demo.name}.jar"/>
|
||||||
<copy todir="${build.demo}/${build.demo.war.name}">
|
<zipfileset prefix="WEB-INF/lib" dir="${build.dir}" includes="${final.name}.jar"/>
|
||||||
<fileset dir="${demo.jsp}">
|
</jar>
|
||||||
<include name="**/*.jsp"/>
|
|
||||||
<include name="**/*.xml"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${build.demo}/${build.demo.war.name}/WEB-INF/lib">
|
|
||||||
<fileset dir="${build.dir}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${build.demo}/${build.demo.war.name}/WEB-INF/lib">
|
|
||||||
<fileset dir="${build.demo}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<jar
|
|
||||||
jarfile="${build.demo}/${build.demo.war.name}.war"
|
|
||||||
basedir="${build.demo}/${build.demo.war.name}"
|
|
||||||
excludes="**/*.java"
|
|
||||||
/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
@ -201,9 +190,8 @@ Implementation-Vendor: Lucene
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="jar-src" depends="init">
|
<target name="jar-src" depends="init">
|
||||||
<mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
|
<jar destfile="${build.dir}/${final.name}-src.jar">
|
||||||
<jar jarfile="${build.dir}/${final.name}-src.jar">
|
<fileset dir="." includes="src/"/>
|
||||||
<fileset dir="${build.dir}" includes="**/*.java"/>
|
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -213,24 +201,14 @@ Implementation-Vendor: Lucene
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="compile-demo" depends="compile-core">
|
<target name="compile-demo" depends="compile-core">
|
||||||
<mkdir dir="${build.demo}"/>
|
<mkdir dir="${build.dir}/classes/demo"/>
|
||||||
<mkdir dir="${build.demo.src}"/>
|
|
||||||
|
|
||||||
<copy todir="${build.demo.src}">
|
|
||||||
<fileset dir="${demo.src}">
|
|
||||||
<include name="**/*.java"/>
|
|
||||||
<include name="**/*.jj"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<mkdir dir="${build.demo.classes}"/>
|
|
||||||
|
|
||||||
<javac
|
<javac
|
||||||
encoding="${build.encoding}"
|
encoding="${build.encoding}"
|
||||||
srcdir="${build.demo.src}"
|
srcdir="src/demo"
|
||||||
includes="**/*.java"
|
includes="**/*.java"
|
||||||
destdir="${build.demo.classes}"
|
destdir="${build.dir}/classes/demo"
|
||||||
debug="${debug}">
|
debug="${javac.debug}">
|
||||||
<classpath refid="demo.classpath"/>
|
<classpath refid="demo.classpath"/>
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
@ -241,12 +219,12 @@ Implementation-Vendor: Lucene
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="compile-test" depends="compile-core,compile-demo">
|
<target name="compile-test" depends="compile-core,compile-demo">
|
||||||
<mkdir dir="${build.test.classes}"/>
|
<mkdir dir="${build.dir}/classes/test"/>
|
||||||
<javac
|
<javac
|
||||||
encoding="${build.encoding}"
|
encoding="${build.encoding}"
|
||||||
srcdir="${test.src}"
|
srcdir="src/test"
|
||||||
includes="**/*.java"
|
includes="**/*.java"
|
||||||
destdir="${build.test.classes}"
|
destdir="${build.dir}/classes/test"
|
||||||
debug="true">
|
debug="true">
|
||||||
<classpath refid="test.classpath"/>
|
<classpath refid="test.classpath"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
@ -258,18 +236,18 @@ Implementation-Vendor: Lucene
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="test" depends="compile-test" if="junit.present">
|
<target name="test" depends="compile-test" if="junit.present">
|
||||||
<mkdir dir="${junit.reports}"/>
|
<mkdir dir="${junit.output.dir}"/>
|
||||||
<junit printsummary="off" haltonfailure="no"
|
<junit printsummary="off" haltonfailure="no"
|
||||||
errorProperty="tests.failed" failureProperty="tests.failed">
|
errorProperty="tests.failed" failureProperty="tests.failed">
|
||||||
<classpath refid="junit.classpath"/>
|
<classpath refid="junit.classpath"/>
|
||||||
<formatter type="plain"/>
|
<!-- <formatter type="plain"/> todo: does anyone use these text files? -->
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<batchtest fork="yes" todir="${junit.reports}" unless="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
||||||
<fileset dir="${junit.src}" includes="**/Test*.java"/>
|
<fileset dir="src/test" includes="**/Test*.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<batchtest fork="yes" todir="${junit.reports}" if="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
||||||
<fileset dir="${junit.src}" includes="**/${testcase}.java"/>
|
<fileset dir="src/test" includes="**/${testcase}.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
</junit>
|
</junit>
|
||||||
|
|
||||||
|
@ -280,12 +258,12 @@ Implementation-Vendor: Lucene
|
||||||
<target name="test-unit" depends="test"/>
|
<target name="test-unit" depends="test"/>
|
||||||
|
|
||||||
<target name="generate-test-reports" description="Generate test reports">
|
<target name="generate-test-reports" description="Generate test reports">
|
||||||
<mkdir dir="${junit.reports}/html"/>
|
<mkdir dir="${junit.reports}"/>
|
||||||
<junitreport todir="${junit.reports}">
|
<junitreport todir="${junit.output.dir}">
|
||||||
<fileset dir="${junit.reports}">
|
<fileset dir="${junit.output.dir}">
|
||||||
<include name="TEST-*.xml"/>
|
<include name="TEST-*.xml"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
<report format="frames" todir="${junit.reports}/html"/>
|
<report format="frames" todir="${junit.reports}"/>
|
||||||
</junitreport>
|
</junitreport>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -318,8 +296,8 @@ Implementation-Vendor: Lucene
|
||||||
</taskdef>
|
</taskdef>
|
||||||
|
|
||||||
<anakia
|
<anakia
|
||||||
basedir="${docs.src}"
|
basedir="xdocs"
|
||||||
destdir="${docs.dest}/"
|
destdir="docs/"
|
||||||
extension=".html" style="./site.vsl"
|
extension=".html" style="./site.vsl"
|
||||||
projectFile="stylesheets/project.xml"
|
projectFile="stylesheets/project.xml"
|
||||||
excludes="**/stylesheets/** empty.xml"
|
excludes="**/stylesheets/** empty.xml"
|
||||||
|
@ -329,21 +307,14 @@ Implementation-Vendor: Lucene
|
||||||
>
|
>
|
||||||
</anakia>
|
</anakia>
|
||||||
|
|
||||||
<copy todir="${docs.dest}/images" filtering="no">
|
<copy todir="docs/images" filtering="no">
|
||||||
<fileset dir="${docs.src}/images">
|
<fileset dir="xdocs/images">
|
||||||
<include name="**/*.gif"/>
|
<include name="**/*.gif"/>
|
||||||
<include name="**/*.jpeg"/>
|
<include name="**/*.jpeg"/>
|
||||||
<include name="**/*.jpg"/>
|
<include name="**/*.jpg"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<!-- In case we have CSS someday
|
|
||||||
<copy todir="${docs.dest}" filtering="no">
|
|
||||||
<fileset dir="${docs.src}">
|
|
||||||
<include name="**/*.css"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
-->
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
@ -352,12 +323,12 @@ Implementation-Vendor: Lucene
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="javadocs">
|
<target name="javadocs">
|
||||||
<mkdir dir="${build.javadocs}"/>
|
<mkdir dir="${build.dir}/docs/api"/>
|
||||||
<javadoc
|
<javadoc
|
||||||
sourcepath="${src.dir}:${build.src}"
|
sourcepath="src/java"
|
||||||
overview="${src.dir}/overview.html"
|
overview="src/java/overview.html"
|
||||||
packagenames="${packages}"
|
packagenames="org.apache.lucene.*"
|
||||||
destdir="${build.javadocs}"
|
destdir="${build.dir}/docs/api"
|
||||||
encoding="${build.encoding}"
|
encoding="${build.encoding}"
|
||||||
author="true"
|
author="true"
|
||||||
version="true"
|
version="true"
|
||||||
|
@ -376,38 +347,7 @@ Implementation-Vendor: Lucene
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="package" depends="jar-core, javadocs, war-demo">
|
<target name="package" depends="jar-core, javadocs, war-demo"/>
|
||||||
<mkdir dir="${dist.dir}"/>
|
|
||||||
<mkdir dir="${dist.dir}/docs"/>
|
|
||||||
<mkdir dir="${dist.dir}/docs/api"/>
|
|
||||||
<mkdir dir="${dist.dir}/src/demo"/>
|
|
||||||
<mkdir dir="${dist.dir}/src/jsp"/>
|
|
||||||
|
|
||||||
<copy todir="${dist.dir}/docs">
|
|
||||||
<fileset dir="${docs.dir}"/>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${dist.dir}/docs/api">
|
|
||||||
<fileset dir="${build.javadocs}"/>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${dist.dir}/src/demo">
|
|
||||||
<fileset dir="src/demo"/>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${dist.dir}/src/jsp">
|
|
||||||
<fileset dir="src/jsp"/>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${dist.dir}/lib">
|
|
||||||
<fileset dir="lib"/>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${dist.dir}">
|
|
||||||
<fileset dir=".">
|
|
||||||
<include name="*.txt"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/>
|
|
||||||
<copy file="${build.demo}/${build.demo.name}.jar" todir="${dist.dir}"/>
|
|
||||||
<copy file="${build.demo}/${build.demo.war.name}.war" todir="${dist.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- Packages the distribution with zip -->
|
<!-- Packages the distribution with zip -->
|
||||||
|
@ -417,13 +357,13 @@ Implementation-Vendor: Lucene
|
||||||
<target name="package-zip" depends="package"
|
<target name="package-zip" depends="package"
|
||||||
description="--> Generates the Lucene distribution as .zip">
|
description="--> Generates the Lucene distribution as .zip">
|
||||||
|
|
||||||
<delete file="${basedir}/${final.name}.zip"/>
|
<delete file="${dist.dir}/${final.name}.zip"/>
|
||||||
<zip
|
<zip destfile="${dist.dir}/${final.name}.zip">
|
||||||
zipfile="${basedir}/${final.name}.zip"
|
<zipfileset prefix="${final.name}" dir="."
|
||||||
basedir="${basedir}/"
|
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"/>
|
||||||
includes="**/${final.name}/**"
|
<zipfileset prefix="${final.name}" dir="${build.dir}"
|
||||||
excludes="**/junit*jar"
|
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/"/>
|
||||||
/>
|
</zip>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
@ -434,18 +374,18 @@ Implementation-Vendor: Lucene
|
||||||
<target name="package-tgz" depends="package"
|
<target name="package-tgz" depends="package"
|
||||||
description="--> Generates the lucene distribution as .tar.gz">
|
description="--> Generates the lucene distribution as .tar.gz">
|
||||||
|
|
||||||
<delete file="${basedir}/${final.name}.tar"/>
|
<!-- todo: make includes patterns below into property to reuse in package-zip -->
|
||||||
<delete file="${basedir}/${final.name}.tar.gz"/>
|
<delete file="${build.dir}/${final.name}.tar"/>
|
||||||
<tar
|
<delete file="${dist.dir}/${final.name}.tar.gz"/>
|
||||||
tarfile="${basedir}/${final.name}.tar"
|
<tar tarfile="${build.dir}/${final.name}.tar">
|
||||||
basedir="${basedir}/"
|
<tarfileset prefix="${final.name}" dir="."
|
||||||
includes="**/${final.name}/**"
|
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"/>
|
||||||
excludes="**/junit*jar"
|
<tarfileset prefix="${final.name}" dir="${build.dir}"
|
||||||
/>
|
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/"/>
|
||||||
|
</tar>
|
||||||
|
|
||||||
<gzip
|
<gzip zipfile="${dist.dir}/${final.name}.tar.gz"
|
||||||
zipfile="${basedir}/${final.name}.tar.gz"
|
src="${build.dir}/${final.name}.tar"
|
||||||
src="${basedir}/${final.name}.tar"
|
|
||||||
/>
|
/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -454,54 +394,31 @@ Implementation-Vendor: Lucene
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="package-all" depends="package-zip, package-tgz"
|
<target name="package-all-binary" depends="package-zip, package-tgz"
|
||||||
description="--> Generates the .tar.gz and .zip distributions">
|
description="--> Generates the .tar.gz and .zip distributions"/>
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- same as package-all. it is just here for compatibility. -->
|
<!-- same as package-all. it is just here for compatibility. -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="dist" depends="package-all"/>
|
<target name="dist" depends="package-all-binary"/>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- S O U R C E D I S T R I B U T I O N -->
|
<!-- 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="default.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 -->
|
<!-- Packages the sources with zip -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="package-zip-src" depends="package-src"
|
<target name="package-zip-src" depends="init"
|
||||||
description="--> Generates the Lucene sources as .zip">
|
description="--> Generates the Lucene sources as .zip">
|
||||||
|
<zip destfile="${dist.dir}/${final.name}-src.zip">
|
||||||
<delete file="${basedir}/${final.name}-src.zip"/>
|
<zipfileset prefix="${final.name}" dir="."
|
||||||
<zip
|
includes="src/,build.xml,lib/,docs/,*.txt"/>
|
||||||
zipfile="${basedir}/${final.name}-src.zip"
|
</zip>
|
||||||
basedir="${basedir}/"
|
|
||||||
includes="**/${final.name}-src/**"
|
|
||||||
/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
@ -509,20 +426,18 @@ Implementation-Vendor: Lucene
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="package-tgz-src" depends="package-src"
|
<target name="package-tgz-src" depends="init"
|
||||||
description="--> Generates the Lucene distribution as .tar.gz">
|
description="--> Generates the Lucene distribution as .tar.gz">
|
||||||
|
|
||||||
<delete file="${basedir}/${final.name}-src.tar"/>
|
<delete file="${build.dir}/${final.name}-src.tar"/>
|
||||||
<delete file="${basedir}/${final.name}-src.tar.gz"/>
|
<delete file="${dist.dir}/${final.name}-src.tar.gz"/>
|
||||||
<tar
|
<tar tarfile="${build.dir}/${final.name}-src.tar">
|
||||||
tarfile="${basedir}/${final.name}-src.tar"
|
<tarfileset prefix="${final.name}" dir="."
|
||||||
basedir="${basedir}/"
|
includes="src/,build.xml,lib/,docs/,*.txt"/>
|
||||||
includes="**/${final.name}-src/**"
|
</tar>
|
||||||
/>
|
|
||||||
|
|
||||||
<gzip
|
<gzip zipfile="${dist.dir}/${final.name}-src.tar.gz"
|
||||||
zipfile="${basedir}/${final.name}-src.tar.gz"
|
src="${build.dir}/${final.name}-src.tar"
|
||||||
src="${basedir}/${final.name}-src.tar"
|
|
||||||
/>
|
/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -541,6 +456,8 @@ Implementation-Vendor: Lucene
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="dist-src" depends="package-all-src"/>
|
<target name="dist-src" depends="package-all-src"/>
|
||||||
|
|
||||||
|
<target name="dist-all" depends="dist, dist-src"/>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- C L E A N -->
|
<!-- C L E A N -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
@ -549,71 +466,8 @@ Implementation-Vendor: Lucene
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<delete dir="${build.dir}"/>
|
<delete dir="${build.dir}"/>
|
||||||
<delete dir="${dist.dir}"/>
|
<delete dir="${dist.dir}"/>
|
||||||
<delete file="${basedir}/${final.name}.tar"/>
|
|
||||||
<delete file="${basedir}/${final.name}.tar.gz"/>
|
|
||||||
<delete file="${basedir}/${final.name}.zip"/>
|
|
||||||
<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"/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- Build the Ant index task -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!--
|
|
||||||
<target name="anttask-init">
|
|
||||||
<property name="anttask.classes" location="${build.dir}/anttask/classes"/>
|
|
||||||
<mkdir dir="${anttask.classes}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="anttask-compile" depends="compile,anttask-init">
|
|
||||||
<javac
|
|
||||||
srcdir="${anttask.src}"
|
|
||||||
destdir="${anttask.classes}"
|
|
||||||
debug="${debug}">
|
|
||||||
<classpath refid="classpath"/>
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- Build the DocWeb app -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<target name="docweb-init">
|
|
||||||
<!-- <mkdir dir="${}"/> -->
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<target name="docweb-index" depends="javadocs,anttask-compile,docweb-init">
|
|
||||||
<taskdef name="index"
|
|
||||||
classname="org.apache.lucene.ant.IndexTask">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${anttask.classes}"/>
|
|
||||||
<path refid="classpath"/>
|
|
||||||
</classpath>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<index index="${build.docweb}/index"
|
|
||||||
overwrite="false">
|
|
||||||
<fileset dir="${docs.dir}"/>
|
|
||||||
<fileset dir="${build.javadocs}"/>
|
|
||||||
</index>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="docweb-war" depends="jar,jardemo,docweb-index">
|
|
||||||
<war warfile="${build.docweb}/${build.docweb.war.name}.war"
|
|
||||||
webxml="${demo.jsp}/WEB-INF/web.xml">
|
|
||||||
<fileset dir="${demo.jsp}" excludes="WEB-INF/"/>
|
|
||||||
<lib dir="${build.demo}" includes="*.jar"/>
|
|
||||||
<lib dir="${build.dir}" includes="*.jar"/>
|
|
||||||
<webinf dir="${build.docweb}" includes="index/"/>
|
|
||||||
</war>
|
|
||||||
</target>
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- Build the JavaCC files into the source tree -->
|
<!-- Build the JavaCC files into the source tree -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
@ -621,13 +475,13 @@ Implementation-Vendor: Lucene
|
||||||
|
|
||||||
<target name="javacc-StandardAnalyzer" depends="init,javacc-check" if="javacc.present">
|
<target name="javacc-StandardAnalyzer" depends="init,javacc-check" if="javacc.present">
|
||||||
<!-- generate this in a build directory so we can exclude ParseException -->
|
<!-- generate this in a build directory so we can exclude ParseException -->
|
||||||
<mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
|
<mkdir dir="${build.dir}/gen/org/apache/lucene/analysis/standard"/>
|
||||||
<antcall target="invoke-javacc">
|
<antcall target="invoke-javacc">
|
||||||
<param name="target" location="${src.dir}/org/apache/lucene/analysis/standard/StandardTokenizer.jj"/>
|
<param name="target" location="src/java/org/apache/lucene/analysis/standard/StandardTokenizer.jj"/>
|
||||||
<param name="output.dir" location="${build.src}/org/apache/lucene/analysis/standard"/>
|
<param name="output.dir" location="${build.dir}/gen/org/apache/lucene/analysis/standard"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<copy todir="${src.dir}/org/apache/lucene/analysis/standard">
|
<copy todir="src/java/org/apache/lucene/analysis/standard">
|
||||||
<fileset dir="${build.src}/org/apache/lucene/analysis/standard">
|
<fileset dir="${build.dir}/gen/org/apache/lucene/analysis/standard">
|
||||||
<include name="*.java"/>
|
<include name="*.java"/>
|
||||||
<exclude name="ParseException.java"/>
|
<exclude name="ParseException.java"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
|
@ -636,15 +490,15 @@ Implementation-Vendor: Lucene
|
||||||
|
|
||||||
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
|
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
|
||||||
<antcall target="invoke-javacc">
|
<antcall target="invoke-javacc">
|
||||||
<param name="target" location="${src.dir}/org/apache/lucene/queryParser/QueryParser.jj"/>
|
<param name="target" location="src/java/org/apache/lucene/queryParser/QueryParser.jj"/>
|
||||||
<param name="output.dir" location="${src.dir}/org/apache/lucene/queryParser"/>
|
<param name="output.dir" location="src/java/org/apache/lucene/queryParser"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="javacc-HTMLParser" depends="init,javacc-check" if="javacc.present">
|
<target name="javacc-HTMLParser" depends="init,javacc-check" if="javacc.present">
|
||||||
<antcall target="invoke-javacc">
|
<antcall target="invoke-javacc">
|
||||||
<param name="target" location="${demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"/>
|
<param name="target" location="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"/>
|
||||||
<param name="output.dir" location="${demo.src}/org/apache/lucene/demo/html"/>
|
<param name="output.dir" location="src/demo/org/apache/lucene/demo/html"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
# -------------------------------------------------------------
|
|
||||||
# D E F A U L T L U C E N E B U I L D P R O P E R T I E S
|
|
||||||
# -------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# DO NOT EDIT THIS FILE IN ORDER TO CUSTOMIZE BUILD PROPERTIES.
|
|
||||||
# CREATE AND EDIT build.properties FILE INSTEAD.
|
|
||||||
#
|
|
||||||
name=lucene
|
|
||||||
Name=Lucene
|
|
||||||
version=1.3-rc2-dev
|
|
||||||
year=2000-2002
|
|
||||||
final.name=${name}-${version}
|
|
||||||
debug=on
|
|
||||||
|
|
||||||
project.name = site
|
|
||||||
docs.src = ./xdocs
|
|
||||||
docs.dest = ./docs
|
|
||||||
|
|
||||||
src.dir = ./src/java
|
|
||||||
demo.src = ./src/demo
|
|
||||||
demo.jsp = ./src/jsp
|
|
||||||
test.src = ./src/test
|
|
||||||
docs.dir = ./docs
|
|
||||||
dist.dir=${final.name}
|
|
||||||
dist-src.dir = ${final.name}-src
|
|
||||||
|
|
||||||
# javadoc packages
|
|
||||||
packages=org.apache.lucene.*
|
|
||||||
|
|
||||||
# javadoc link
|
|
||||||
javadoc.link=http://java.sun.com/j2se/1.4/docs/api/
|
|
||||||
|
|
||||||
build.compiler.pedantic=false
|
|
||||||
|
|
||||||
build.dir = ./bin
|
|
||||||
build.classes = ${build.dir}/classes
|
|
||||||
build.lib = ${build.dir}/lib
|
|
||||||
build.javadocs = ${build.dir}/docs/api
|
|
||||||
build.src = ${build.dir}/src
|
|
||||||
build.encoding = ISO-8859-1
|
|
||||||
build.manifest = ${build.classes}/MANIFEST.MF
|
|
||||||
|
|
||||||
build.demo = ${build.dir}/demo
|
|
||||||
build.demo.src = ${build.demo}/src
|
|
||||||
build.demo.classes = ${build.demo}/classes
|
|
||||||
build.demo.name = ${name}-demos-${version}
|
|
||||||
build.demo.war.name = luceneweb
|
|
||||||
|
|
||||||
build.docweb = ${build.dir}/docweb
|
|
||||||
build.docweb.war.name = lucenedocweb
|
|
||||||
|
|
||||||
build.test = ${build.dir}/test
|
|
||||||
build.test.classes = ${build.test}/classes
|
|
||||||
|
|
||||||
junit.src = ${basedir}/src/test
|
|
||||||
junit.classes = ${build.dir}/unit-classes
|
|
||||||
junit.reports = ${build.dir}/unit-reports
|
|
||||||
|
|
||||||
# Home directory of JavaCC
|
|
||||||
javacc.home = .
|
|
||||||
javacc.zip.dir = ${javacc.home}/bin/lib
|
|
||||||
javacc.jar = ${javacc.zip.dir}/javacc.jar
|
|
||||||
|
|
||||||
# Home directory of jakarta-site2
|
|
||||||
jakarta.site2.home = ../jakarta-site2
|
|
Loading…
Reference in New Issue