Revert "LUCENE-9433: Remove Ant support from trunk"

This reverts commit 37cd17dc
This commit is contained in:
Erick Erickson 2020-08-21 16:57:26 -04:00
parent 77ca552cc6
commit c9c75810c2
149 changed files with 14322 additions and 83 deletions

View File

@ -38,6 +38,6 @@ Please review the following and check all that apply:
- [ ] I have created a Jira issue and added the issue ID to my pull request title.
- [ ] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
- [ ] I have developed this patch against the `master` branch.
- [ ] I have run `./gradlew check`.
- [ ] I have run `ant precommit` and the appropriate test suite.
- [ ] I have added tests for my changes.
- [ ] I have added documentation for the [Ref Guide](https://github.com/apache/lucene-solr/tree/master/solr/solr-ref-guide) (for Solr changes only).

View File

@ -20,7 +20,7 @@
Apache Lucene is a high-performance, full featured text search engine library
written in Java.
Apache Solr is an enterprise search platform written in Java and using Apache Lucene.
Apache Solr is an enterprise search platform written using Apache Lucene.
Major features include full-text search, index replication and sharding, and
result faceting and highlighting.
@ -40,30 +40,48 @@ comprehensive documentation, visit:
(You do not need to do this if you downloaded a pre-built package)
### Building with Ant
Lucene and Solr are built using [Apache Ant](http://ant.apache.org/). To build
Lucene and Solr, run:
`ant compile`
If you see an error about Ivy missing while invoking Ant (e.g., `.ant/lib does
not exist`), run `ant ivy-bootstrap` and retry.
Sometimes you may face issues with Ivy (e.g., an incompletely downloaded artifact).
Cleaning up the Ivy cache and retrying is a workaround for most of such issues:
`rm -rf ~/.ivy2/cache`
The Solr server can then be packaged and prepared for startup by running the
following command from the `solr/` directory:
`ant server`
### Building with Gradle
As of 9.0, Lucene/Solr uses [Gradle](https://gradle.org/) as the build
system. Ant build support has been removed.
There is ongoing work (see [LUCENE-9077](https://issues.apache.org/jira/browse/LUCENE-9077))
to switch the legacy ant-based build system to [gradle](https://gradle.org/).
Please give it a try!
At the moment of writing, the gradle build requires precisely Java 11
(it may or may not work with newer Java versions).
To build Lucene and Solr, run (`./` can be omitted on Windows):
`./gradlew assemble`
The command above packages a full distribution of Solr server; the
The command above also packages a full distribution of Solr server; the
package can be located at:
`solr/packaging/build/solr-*`
Note that the gradle build does not create or copy binaries throughout the
source repository so you need to switch to the packaging output folder above;
the rest of the instructions below remain identical. The packaging directory
is rewritten on each build.
For development, especially when you have created test indexes etc, use
the `./gradlew dev` task which will copy binaries to `./solr/packaging/build/dev`
but _only_ overwrite the binaries which will preserve your test setup.
source repository (like ant build does) so you need to switch to the
packaging output folder above; the rest of the instructions below remain
identical.
## Running Solr
@ -86,6 +104,16 @@ Common options are described in some detail in solr/README.txt. For an
exhaustive treatment of options, run `bin/solr start -h` from the `solr/`
directory.
## Development/IDEs
Ant can be used to generate project files compatible with most common IDEs.
Run the ant command corresponding to your IDE of choice before attempting to
import Lucene/Solr.
- *Eclipse* - `ant eclipse` (See [this](https://cwiki.apache.org/confluence/display/solr/HowToConfigureEclipse) for details)
- *IntelliJ* - `ant idea` (See [this](https://cwiki.apache.org/confluence/display/lucene/HowtoConfigureIntelliJ) for details)
- *Netbeans* - `ant netbeans` (See [this](https://cwiki.apache.org/confluence/display/lucene/HowtoConfigureNetbeans) for details)
### Gradle build and IDE support
- *IntelliJ* - IntelliJ idea can import the project out of the box.
@ -93,17 +121,23 @@ directory.
- *Eclipse* - Not tested.
- *Netbeans* - Not tested.
## Running Tests
The standard test suite can be run with the command:
`ant test`
Like Solr itself, the test-running can be customized or tailored in a number or
ways. For an exhaustive discussion of the options available, run:
`ant test-help`
### Gradle build and tests
`./gradlew assemble` will build a runnable Solr as noted above.
Run the following command to display an extensive help for running
tests with gradle:
`./gradlew check` will assemble Lucene/Solr and run all validation
tasks unit tests.
`./gradlew help` will print a list of help commands for high-level tasks. One
of these is `helpAnt` that shows the gradle tasks corresponding to ant
targets you may be familiar with.
`./gradlew helpTests`
## Contributing

697
build.xml Executable file
View File

@ -0,0 +1,697 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="lucene-solr" default="-projecthelp" basedir=".">
<import file="lucene/common-build.xml"/>
<property name="jgit-version" value="5.3.0.201903130848-r"/>
<property name="tests.heap-dump-dir" location="heapdumps"/>
<property name="maven-build-dir" value="maven-build"/>
<property name="maven-version" value="3.5.0"/>
<property name="maven.dependencies.filters.file" location="lucene/build/maven.dependencies.filters.properties"/>
<property name="smokeTestRelease.dir" location="lucene/build/smokeTestRelease/dist"/>
<property name="smokeTestRelease.tmp" location="lucene/build/smokeTestRelease/tmp"/>
<property name="smokeTestRelease.testArgs" value=""/>
<target name="-projecthelp">
<java fork="false" classname="org.apache.tools.ant.Main" taskname="-">
<arg value="-projecthelp"/>
<arg value="-f"/>
<arg value="${ant.file}"/>
</java>
</target>
<target name="test-help" description="Test runner help">
<subant buildpath="lucene" target="test-help" inheritall="false" failonerror="true"/>
</target>
<target name="precommit" description="Run basic checks before committing"
depends="check-working-copy,validate,documentation-lint"/>
<target name="test" description="Test both Lucene and Solr" depends="resolve-groovy">
<mkdir dir="lucene/build" />
<tempfile property="tests.totals.tmpfile"
destdir="lucene/build"
prefix=".test-totals-"
suffix=".tmp"
deleteonexit="true"
createfile="true" />
<subant target="test" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset>
<propertyset refid="uptodate.and.compiled.properties"/>
<propertyref name="tests.totals.tmpfile" />
</propertyset>
</subant>
<property name="tests.totals.toplevel" value="true" />
<antcall target="-check-totals" />
</target>
<target name="jacoco" depends="resolve-groovy" description="Generates JaCoCo code coverage reports">
<subant target="jacoco" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="pitest" depends="resolve-groovy" description="Run PITest on both Lucene and Solr">
<subant target="pitest" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="beast">
<fail message="The Beast only works inside of individual modules"/>
</target>
<target name="documentation" depends="resolve-markdown" description="Generate Lucene and Solr Documentation">
<subant target="documentation" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="documentation-lint" depends="resolve-markdown,-ecj-javadoc-lint-unsupported,-ecj-resolve" description="Validates the generated documentation (HTML errors, broken links,...)">
<subant target="documentation-lint" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="check-forbidden-apis" depends="-install-forbidden-apis" description="Check forbidden API calls in compiled class files.">
<subant target="check-forbidden-apis" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="validate" description="Validate dependencies, licenses, etc." depends="validate-source-patterns,resolve-groovy,rat-sources-typedef,-install-forbidden-apis">
<subant target="validate" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
<subant buildpath="lucene" target="check-lib-versions" inheritall="false" failonerror="true">
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="validate-source-patterns" description="Validate source code (invalid code patterns,...)" unless="disable.source-patterns" depends="resolve-groovy,rat-sources-typedef">
<groovy taskname="source-patterns" classpathref="rat.classpath" src="${common.dir}/tools/src/groovy/check-source-patterns.groovy"/>
</target>
<target name="rat-sources" description="Runs rat across all sources and tests" depends="common.rat-sources">
<subant target="rat-sources" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="resolve" description="Resolves all dependencies">
<subant target="resolve" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<!-- lucene/test-framework and solr/test-framework are excluded from compilation -->
<target name="compile" description="Compile Lucene and Solr">
<subant target="compile" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="compile-core" description="Compile Lucene Core">
<subant target="compile-core" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="compile-test" description="Compile Lucene and Solr tests and test-frameworks">
<subant target="compile-test" inheritAll="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="jar" description="Build Lucene and Solr Jar files">
<subant target="jar" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml"/>
<fileset dir="solr" includes="build.xml"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="jar-src" description="Build Lucene and Solr Source Jar files">
<subant target="jar-src" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml"/>
<fileset dir="solr" includes="build.xml"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="get-maven-poms" depends="resolve"
description="Copy Maven POMs from dev-tools/maven/ to maven-build/">
<ant dir="lucene" target="-get-maven-poms" inheritall="false"/>
</target>
<target name="clean-maven-build"
description="Clean up Maven POMs in working copy">
<delete failonerror="true" dir="${maven-build-dir}/"/>
</target>
<target name="generate-maven-artifacts" depends="resolve,resolve-groovy,resolve-markdown,install-maven-tasks"
description="Generate Maven Artifacts for Lucene and Solr">
<property name="maven.dist.dir" location="dist/maven" />
<mkdir dir="${maven.dist.dir}" />
<ant dir="lucene" inheritall="false">
<target name="-unpack-lucene-tgz"/>
<target name="-filter-pom-templates"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="solr" target="-unpack-solr-tgz" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<subant target="-dist-maven" inheritall="false" failonerror="true">
<property name="maven.dist.dir" location="${maven.dist.dir}" />
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="-install-maven-artifacts" depends="resolve,resolve-groovy,resolve-markdown,install-maven-tasks">
<ant dir="lucene" inheritall="false">
<target name="-unpack-lucene-tgz"/>
<target name="-filter-pom-templates"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="solr" target="-unpack-solr-tgz" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<subant target="-install-to-maven-local-repo" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="validate-maven-dependencies" depends="-install-maven-artifacts"
description="Validates maven dependencies, licenses, etc.">
<subant target="-validate-maven-dependencies" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml"/>
<fileset dir="solr" includes="build.xml"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="run-maven-build" depends="get-maven-poms,install-maven-tasks,resolve-groovy" description="Runs the Maven build using automatically generated POMs">
<groovy src="${common.dir}/tools/src/groovy/run-maven-build.groovy"/>
</target>
<target name="remove-maven-artifacts" description="Removes all Lucene/Solr Maven artifacts from the local repository">
<echo message="Removing all Lucene/Solr Maven artifacts from '${user.home}/.m2/repository'..."/>
<delete includeemptydirs="true">
<fileset dir="${user.home}/.m2/repository" erroronmissingdir="false">
<include name="org/apache/lucene/**"/>
<include name="org/apache/solr/**"/>
</fileset>
</delete>
</target>
<target name="netbeans" depends="resolve" description="Setup Netbeans configuration">
<pathconvert property="netbeans.fileset.sourcefolders" pathsep="|" dirsep="/">
<dirset dir="${basedir}/lucene" includes="**/src/java, **/src/examples, **/src/test, **/src/resources"
excludes="tools/**, build/**" />
<dirset dir="${basedir}/solr" includes="**/src/java, **/src/examples, **/src/test, **/src/resources"
excludes="build/**" />
<map from="${basedir}/" to=""/>
</pathconvert>
<!-- TODO: find a better way to exclude duplicate JAR files & fix the servlet-api mess! -->
<pathconvert property="netbeans.path.libs" pathsep=":" dirsep="/">
<fileset dir="${basedir}/lucene" includes="**/lib/*.jar"
excludes="**/*servlet-api*.jar, tools/**, build/**"/>
<fileset dir="${basedir}/solr" includes="**/test-lib/*.jar,**/lib/*.jar"
excludes="core/test-lib/*servlet-api*.jar, contrib/analysis-extras/**, test-framework/lib/junit*, test-framework/lib/ant*, test-framework/lib/randomizedtesting*, build/**, dist/**, package/**, server/solr-webapp/**" />
<map from="${basedir}/" to=""/>
</pathconvert>
<mkdir dir="nbproject"/>
<copy todir="nbproject" overwrite="true">
<fileset dir="dev-tools/netbeans/nbproject"/>
</copy>
<xslt in="${ant.file}" out="nbproject/project.xml" style="dev-tools/netbeans/nb-project.xsl" force="true">
<outputproperty name="indent" value="yes"/>
<param name="netbeans.fileset.sourcefolders" expression="${netbeans.fileset.sourcefolders}"/>
<param name="netbeans.path.libs" expression="${netbeans.path.libs}"/>
<param name="netbeans.source-level" expression="1.7"/>
</xslt>
</target>
<target name="clean-netbeans" description="Removes all Netbeans configuration files">
<delete dir="nbproject" failonerror="true"/>
<delete dir="nb-build" failonerror="true"/>
</target>
<target name="eclipse" depends="resolve" description="Setup Eclipse configuration">
<basename file="${basedir}" property="eclipseprojectname"/>
<copy file="dev-tools/eclipse/dot.project" tofile=".project" overwrite="false" encoding="UTF-8">
<filterset>
<filter token="ECLIPSEPROJECTNAME" value="${eclipseprojectname}"/>
</filterset>
</copy>
<copy overwrite="false" todir="eclipse-build" encoding="UTF-8">
<fileset dir="dev-tools/eclipse" includes="*.launch"/>
<filterset>
<filter token="ECLIPSEPROJECTNAME" value="${eclipseprojectname}"/>
</filterset>
</copy>
<mkdir dir=".settings"/>
<copy todir=".settings/" overwrite="true">
<fileset dir="dev-tools/eclipse/dot.settings" includes="*.prefs" />
</copy>
<pathconvert property="eclipse.fileset.sourcefolders" pathsep="|" dirsep="/">
<dirset dir="${basedir}/lucene" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="tools/**, build/**" />
<dirset dir="${basedir}/solr" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="build/**" />
<map from="${basedir}/" to=""/>
</pathconvert>
<!-- TODO: find a better way to exclude duplicate JAR files & fix the servlet-api mess! -->
<pathconvert property="eclipse.fileset.libs" pathsep="|" dirsep="/">
<fileset dir="${basedir}/lucene" includes="**/lib/*.jar" excludes="**/*servlet-api*.jar, tools/**, build/**"/>
<fileset dir="${basedir}/solr" includes="**/test-lib/*.jar,**/lib/*.jar" excludes="core/test-lib/*servlet-api*.jar, contrib/analysis-extras/**, test-framework/lib/junit*, test-framework/lib/ant*, test-framework/lib/randomizedtesting*, build/**, dist/**, package/**" />
<map from="${basedir}/" to=""/>
</pathconvert>
<pathconvert property="eclipse.fileset.webfolders" pathsep="|" dirsep="/">
<dirset dir="${basedir}/solr/server/contexts" excludes="**/*" />
<dirset dir="${basedir}/solr/server/etc" excludes="**/*" />
<dirset dir="${basedir}/solr/server/modules" excludes="**/*" />
<dirset dir="${basedir}/solr/server/solr" excludes="**/*" />
<dirset dir="${basedir}/solr/webapp/web" excludes="**/*" />
<map from="${basedir}/" to=""/>
</pathconvert>
<xslt in="${ant.file}" out=".classpath" style="dev-tools/eclipse/dot.classpath.xsl" force="true">
<outputproperty name="indent" value="yes"/>
<param name="eclipse.fileset.libs" expression="${eclipse.fileset.libs}"/>
<param name="eclipse.fileset.sourcefolders" expression="${eclipse.fileset.sourcefolders}"/>
<param name="eclipse.fileset.webfolders" expression="${eclipse.fileset.webfolders}"/>
</xslt>
<echo>
SUCCESS: You must right-click your project and choose Refresh.
Your project must use a Java 11 JRE.
</echo>
</target>
<target name="clean-eclipse" description="Removes all Eclipse configuration files">
<delete dir=".settings" failonerror="true"/>
<delete failonerror="true">
<fileset dir="." includes=".classpath,.project"/>
</delete>
<delete dir="eclipse-build" failonerror="true"/>
</target>
<target name="idea" depends="resolve" description="Setup IntelliJ IDEA configuration">
<condition property="idea.jdk.is.set">
<isset property="idea.jdk"/>
</condition>
<!-- Define ${idea.jdk} if it's not yet defined - otherwise literal "${idea.jdk}" is substituted -->
<property name="idea.jdk" value=""/>
<!-- delete those files first, so they are regenerated by the filtering below
(add more files with dynamic properties like versions here): -->
<delete dir=".idea" includes="misc.xml workspace.xml"/>
<!-- Copy files with filtering: -->
<copy todir="." overwrite="false" encoding="UTF-8">
<fileset dir="dev-tools/idea"/>
<filterset begintoken="subst.=&quot;" endtoken="&quot;">
<filter token="idea.jdk" value="${idea.jdk}"/>
</filterset>
<filterset>
<filter token="version" value="${version}"/>
<filter token="version.base" value="${version.base}"/>
</filterset>
</copy>
<antcall target="-post-idea-instructions"/>
</target>
<target name="-post-idea-instructions" unless="idea.jdk.is.set">
<echo>
To complete IntelliJ IDEA setup, you must manually configure
File | Project Structure | Project | Project SDK.
You won't have to do this in the future if you define property
$${idea.jdk}, e.g. in ~/lucene.build.properties, ~/build.properties
or lucene/build.properties, with a value consisting of the
following two XML attributes/values (adjust values according to
JDKs you have defined locally - see
File | Project Structure | Platform Settings | SDKs):
idea.jdk = project-jdk-name="11" project-jdk-type="JavaSDK"
</echo>
</target>
<target name="clean-idea"
description="Removes all IntelliJ IDEA configuration files">
<delete dir=".idea" failonerror="true"/>
<delete failonerror="true">
<fileset dir="." includes="*.iml,*.ipr,*.iws"/>
<fileset dir="solr" includes="**/*.iml"/>
<fileset dir="lucene" includes="**/*.iml"/>
</delete>
<delete dir="idea-build" failonerror="true"/>
</target>
<target name="clean" description="Clean Lucene and Solr build dirs">
<delete dir="dist" />
<delete dir="${tests.heap-dump-dir}" />
<subant target="clean" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="clean-jars" description="Remove all JAR files from lib folders in the checkout">
<delete failonerror="true">
<fileset dir=".">
<include name="**/*.jar"/>
<exclude name="*/build/**"/>
<exclude name="*/dist/**"/>
<exclude name="*/package/**"/>
<exclude name="*/example/exampledocs/**"/>
<exclude name="gradle/**" />
</fileset>
</delete>
</target>
<target name="jar-checksums" description="Recompute SHA1 checksums for all JAR files.">
<subant target="jar-checksums" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="-nightly-smoke-java12params" if="smokeTestRelease.java12">
<!-- convert path to UNIX style, so windows backslashes don't hurt escaping: -->
<pathconvert targetos="unix" property="-smokeTestRelease.java12params">
<regexpmapper from="^(.*)$" to="--test-java12 '\1'"/>
<path location="${smokeTestRelease.java12}"/>
</pathconvert>
</target>
<target name="nightly-smoke" description="Builds an unsigned release and smoke tests it (pass '-DsmokeTestRelease.java12=/path/to/jdk-12' to additionally test with Java 12 or later)"
depends="clean,resolve-groovy,resolve-markdown,install-maven-tasks,-nightly-smoke-java12params">
<fail message="To run nightly smoke, the JDK must be exactly Java 11, was: ${java.specification.version}">
<condition>
<not><equals arg1="${java.specification.version}" arg2="11"/></not>
</condition>
</fail>
<property name="-smokeTestRelease.java12params" value=""/><!-- (if not yet defined) -->
<exec executable="${python3.exe}" failonerror="true" taskname="python3">
<arg value="-V"/>
</exec>
<subant target="prepare-release-no-sign" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<!-- pass ${version.base} here to emulate a real release, without appendix like "-SNAPSHOT": -->
<property name="version" value="${version.base}" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
<mkdir dir="${smokeTestRelease.dir}"/>
<copy todir="${smokeTestRelease.dir}/lucene">
<fileset dir="lucene/dist"/>
</copy>
<copy todir="${smokeTestRelease.dir}/solr">
<fileset dir="solr/package"/>
</copy>
<local name="url"/>
<makeurl file="${smokeTestRelease.dir}" validate="false" property="url"/>
<exec executable="${python3.exe}" failonerror="true" taskname="smoker">
<arg value="-u"/>
<!-- Tell Python not to write any bytecode cache into the filesystem: -->
<arg value="-B"/>
<arg file="dev-tools/scripts/smokeTestRelease.py"/>
<arg line="${-smokeTestRelease.java12params}"/>
<arg value="--revision"/>
<arg value="skip"/>
<!-- pass ${version.base} here to emulate a real release, without appendix like "-SNAPSHOT": -->
<arg value="--version"/>
<arg value="${version.base}"/>
<arg value="--tmp-dir"/>
<arg file="${smokeTestRelease.tmp}"/>
<arg value="--not-signed"/>
<arg value="${url}"/>
<arg value="${smokeTestRelease.testArgs}"/>
</exec>
<delete dir="${smokeTestRelease.dir}"/>
<delete dir="${smokeTestRelease.tmp}"/>
</target>
<macrodef xmlns:ivy="antlib:org.apache.ivy.ant" name="wc-checker">
<attribute name="failonmodifications"/><!-- fail if modifications were found, otherwise it only fails on unversioned files -->
<sequential>
<local name="wc.unversioned.files"/>
<local name="wc.modified.files"/>
<ivy:cachepath xmlns:ivy="antlib:org.apache.ivy.ant" transitive="true" resolveId="jgit" pathid="jgit.classpath">
<ivy:dependency org="org.eclipse.jgit" name="org.eclipse.jgit" rev="${jgit-version}" conf="default" />
<ivy:dependency org="org.slf4j" name="slf4j-nop" rev="1.7.2" conf="default" />
</ivy:cachepath>
<groovy taskname="wc-checker" classpathref="jgit.classpath" src="${common.dir}/tools/src/groovy/check-working-copy.groovy"/>
<fail if="wc.unversioned.files"
message="Source checkout is dirty (unversioned/missing files) after running tests!!! Offending files:${line.separator}${wc.unversioned.files}"/>
<fail message="Source checkout is modified!!! Offending files:${line.separator}${wc.modified.files}">
<condition>
<and>
<istrue value="@{failonmodifications}"/>
<isset property="wc.modified.files"/>
</and>
</condition>
</fail>
</sequential>
</macrodef>
<target name="check-working-copy" description="Checks working copy for unversioned changes" depends="resolve-groovy">
<wc-checker failonmodifications="${is.jenkins.build}"/>
</target>
<target name="run-clover" description="Runs all tests to measure coverage and generates report (pass &quot;ANT_OPTS=-Xmx2G&quot; as environment)" depends="clean">
<antcall inheritAll="false">
<param name="run.clover" value="true"/>
<!-- must be 1, as clover does not like parallel test runs: -->
<param name="tests.jvms.override" value="1"/>
<!-- Also override some other props to be fast: -->
<param name="tests.multiplier" value="1"/>
<param name="tests.nightly" value="false"/>
<param name="tests.weekly" value="false"/>
<param name="tests.badapples" value="true"/>
<!-- The idea behind Clover is to determine test coverage, so be immune to failing tests: -->
<param name="tests.haltonfailure" value="false"/>
<target name="clover"/>
<target name="test"/>
<target name="-generate-clover-reports"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</antcall>
</target>
<!--
Run after Junit tests.
This target is in a separate file, as it needs to include common-build.xml,
but must run from top-level!
-->
<target name="-generate-clover-reports" depends="clover">
<fail unless="run.clover">Clover not enabled!</fail>
<mkdir dir="${clover.report.dir}"/>
<fileset dir="." id="clover.test.result.files">
<include name="*/build/**/test/TEST-*.xml"/>
</fileset>
<fileset dir="." id="clover.test.src.files">
<include name="**/src/test/**/*.java"/>
<!-- test framework source files are all test code: -->
<include name="*/test-framework/src/**/*.java"/>
</fileset>
<clover-report projectName="Apache Lucene/Solr">
<current outfile="${clover.report.dir}" title="Apache Lucene/Solr ${version}" numThreads="0">
<format type="html" filter="assert"/>
<testresults refid="clover.test.result.files"/>
<testsources refid="clover.test.src.files"/>
</current>
<current outfile="${clover.report.dir}/clover.xml" title="Apache Lucene/Solr ${version}">
<format type="xml" filter="assert"/>
<testresults refid="clover.test.result.files"/>
<testsources refid="clover.test.src.files"/>
</current>
</clover-report>
<echo>You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'.</echo>
</target>
<target name="test-with-heapdumps" depends="resolve-groovy,-test-with-heapdumps-enabled,-test-with-heapdumps-disabled" description="Runs tests with heap dumps on OOM enabled (if VM supports this)"/>
<condition property="vm.supports.heapdumps">
<or>
<contains string="${java.vm.name}" substring="hotspot" casesensitive="false"/>
<contains string="${java.vm.name}" substring="openjdk" casesensitive="false"/>
</or>
</condition>
<target name="-test-with-heapdumps-enabled" if="vm.supports.heapdumps">
<echo level="info" message="${java.vm.name}: Enabling heap dumps on OutOfMemoryError to dir '${tests.heap-dump-dir}'."/>
<mkdir dir="${tests.heap-dump-dir}"/>
<delete includeEmptyDirs="true">
<fileset dir="${tests.heap-dump-dir}" includes="**/*"/>
</delete>
<antcall inheritAll="false" target="test">
<param name="tests.heapdump.args" value="-XX:+HeapDumpOnOutOfMemoryError &quot;-XX:HeapDumpPath=${tests.heap-dump-dir}&quot;"/>
<propertyset refid="uptodate.and.compiled.properties"/>
</antcall>
<pathconvert property="heapdumps.list" setonempty="false" pathsep="${line.separator}">
<fileset dir="${tests.heap-dump-dir}"/>
<map from="${tests.heap-dump-dir}${file.separator}" to="* "/>
</pathconvert>
<fail if="heapdumps.list" message="Some of the tests produced a heap dump, but did not fail. Maybe a suppressed OutOfMemoryError? Dumps created:${line.separator}${heapdumps.list}"/>
<delete dir="${tests.heap-dump-dir}"/>
</target>
<target name="-test-with-heapdumps-disabled" unless="vm.supports.heapdumps">
<echo level="warning" message="WARN: The used JVM (${java.vm.name}) does not support HPROF heap dumps on OutOfMemoryError."/>
<antcall target="test">
<propertyset refid="uptodate.and.compiled.properties"/>
</antcall>
</target>
<target name="regenerate" description="Runs all code regenerators">
<subant target="regenerate" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<!-- todo:
<fileset dir="solr" includes="build.xml" />-->
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<!-- should only be called by jenkins, not precommit! -->
<target name="-check-after-regeneration" depends="resolve-groovy">
<wc-checker failonmodifications="true"/>
</target>
<!-- TODO: remove me when jenkins works -->
<target name="regenerateAndCheck" depends="regenerate,-check-after-regeneration"/>
<target name="-append-all-modules-dependencies-properties">
<delete file="lucene/build/module.dependencies.properties"/>
<subant target="-append-module-dependencies-properties" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
<propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<!-- Jenkins tasks -->
<target name="-jenkins-base" depends="-print-java-info,clean,test-with-heapdumps,validate,documentation-lint,jar-checksums,check-working-copy"/>
<target name="-print-java-info">
<echo level="info" taskname="java-info">java version &quot;${java.version}&quot;
${java.runtime.name} (${java.runtime.version}, ${java.vendor})
${java.vm.name} (${java.vm.version}, ${java.vm.vendor})
Test args: [${args}]</echo>
</target>
<target name="jenkins-hourly">
<antcall>
<param name="is.jenkins.build" value="true"/>
<param name="tests.haltonfailure" value="false"/>
<param name="tests.badapples" value="false"/>
<target name="-jenkins-base"/>
</antcall>
</target>
<target name="jenkins-badapples">
<antcall>
<param name="is.jenkins.build" value="true"/>
<param name="tests.haltonfailure" value="false"/>
<param name="tests.badapples" value="true"/>
<target name="-jenkins-base"/>
</antcall>
</target>
<target name="jenkins-nightly">
<antcall>
<param name="is.jenkins.build" value="true"/>
<param name="tests.haltonfailure" value="false"/>
<param name="tests.nightly" value="true"/>
<param name="tests.badapples" value="false"/>
<target name="-jenkins-base"/>
</antcall>
</target>
<target name="jenkins-nightly-badapples">
<antcall>
<param name="is.jenkins.build" value="true"/>
<param name="tests.haltonfailure" value="false"/>
<param name="tests.nightly" value="true"/>
<param name="tests.badapples" value="true"/>
<target name="-jenkins-base"/>
</antcall>
</target>
<target name="jenkins-maven-nightly" depends="-print-java-info,clean,clean-maven-build,resolve-groovy,resolve-markdown,install-maven-tasks">
<!-- step 1: build, install, validate and publish ANT-generated maven artifacts: -->
<antcall>
<param name="is.jenkins.build" value="true"/>
<target name="remove-maven-artifacts"/>
<target name="validate-maven-dependencies"/>
<target name="generate-maven-artifacts"/>
</antcall>
<!-- step 2: run the maven build to check that the pom templates also work to drive "mvn": -->
<antcall>
<param name="is.jenkins.build" value="true"/>
<target name="remove-maven-artifacts"/>
<target name="run-maven-build"/>
</antcall>
</target>
<target name="jenkins-clover" depends="-print-java-info">
<antcall>
<param name="is.jenkins.build" value="true"/>
<target name="run-clover"/>
</antcall>
</target>
<!-- useless targets (override common-build.xml): -->
<target name="generate-test-reports"/>
</project>

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/core/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/common/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/icu/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/kuromoji/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/morfologik/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/opennlp/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/phonetic/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/smartcn/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/analysis/stempel/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/benchmark/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/classification/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/codecs/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/demo/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/expressions/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/facet/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/grouping/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/highlighter/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/join/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/luke/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/luwak/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/memory/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/misc/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/queries/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/queryparser/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/replicator/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/sandbox/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/spatial/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/spatial-extras/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/suggest/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/test-framework/build.xml" />
<buildFile url="file://$PROJECT_DIR$/lucene/tools/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/core/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/analysis-extras/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/clustering/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/dataimporthandler-extras/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/dataimporthandler/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/extraction/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/langid/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/prometheus-exporter/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/velocity/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/solrj/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/test-framework/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/webapp/build.xml" />
</component>
</project>

View File

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="Ivy">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lucene/tools/lib/ivy-2.3.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -2,67 +2,78 @@
## Basic steps:
0. Install OpenJDK 11 (or greater)
1. Download Lucene/Solr from Apache and unpack it
2. Connect to the top-level of your installation (parent of the lucene top-level directory)
0. Install OpenJDK 11 (or greater), Ant 1.8.2+, Ivy 2.2.0
1. Download Lucene from Apache and unpack it
2. Connect to the top-level of your Lucene installation
3. Install JavaCC (optional)
4. Run gradle
4. Run ant
## Step 0) Set up your development environment (OpenJDK 11 or greater)
## Step 0) Set up your development environment (OpenJDK 11 or greater, Ant 1.8.2+, Ivy 2.2.0)
We'll assume that you know how to get and set up the JDK - if you
don't, then we suggest starting at https://www.oracle.com/java/ and learning
more about Java, before returning to this README. Lucene runs with
Java 11 and later.
Lucene uses [Gradle](https://gradle.org/) for build control; and includes Gradle wrapper script to download the correct version of it.
Like many Open Source java projects, Lucene uses Apache Ant for build
control. Specifically, you MUST use Ant version 1.8.2+.
NOTE: When Solr moves to a Top Level Project, it will no longer
be necessary to download Solr to build Lucene. You can track
progress at: https://issues.apache.org/jira/browse/SOLR-14497
Ant is "kind of like make without make's wrinkles". Ant is
implemented in java and uses XML-based configuration files. You can
get it at:
NOTE: Lucene changed from Ant to Gradle as of release 9.0. Prior releases
still use Ant.
https://ant.apache.org
## Step 1) Download/Checkout Lucene source code
You'll need to download the Ant binary distribution. Install it
according to the instructions at:
https://ant.apache.org/manual
Finally, you'll need to install ivy into your ant lib folder
(~/.ant/lib). You can get it from http://ant.apache.org/ivy/.
If you skip this step, the Lucene build system will offer to do it
for you.
## Step 1) Download Lucene from Apache
We'll assume you already did this, or you wouldn't be reading this
file. However, you might have received this file by some alternate
route, or you might have an incomplete copy of the Lucene, so: Lucene
releases are available as part of Solr for download at:
releases are available for download at:
https://lucene.apache.org/solr/downloads.html
See the note above for why it is necessary currently to download Solr
https://www.apache.org/dyn/closer.cgi/lucene/java/
Download either a zip or a tarred/gzipped version of the archive, and
uncompress it into a directory of your choice.
Or you can directly checkout the source code from GitHub:
## Step 2) From the command line, change (cd) into the top-level directory of your Lucene installation
https://github.com/apache/lucene-solr
Lucene's top-level directory contains the build.xml file. By default,
you do not need to change any of the settings in this file, but you do
need to run ant from this location so it knows where to find build.xml.
## Step 2) From the command line, change (cd) into the top-level directory of your Lucene/Solr installation
If you would like to change settings you can do so by creating one
or more of the following files and placing your own property settings
in there:
The parent directory for both Lucene and Solr contains the base configuration
file for the combined build, as well as the "gradle wrapper" (gradlew) that
makes invocation of Gradle easier. By default, you do not need to change any of
the settings in this file, but you do need to run Gradle from this location so
it knows where to find the necessary configurations.
~/lucene.build.properties
~/build.properties
lucene-x.y/build.properties
The first time you run Gradle, it will create a file "gradle.properties" that
contains machine-specific settings. Normally you can use this file as-is, but it
can be modified if necessary.
The first property which is found in the order with which the files are
loaded becomes the property setting which is used by the Ant build
system.
## Step 4) Run Gradle
NOTE: the ~ character represents your user account home directory.
Assuming you can exectue "./gradlew help" should show you the main tasks that
can be executed to show help sub-topics.
## Step 4) Run ant
If you want to build Lucene independent of Solr, type:
./gradlew -p lucene assemble
Assuming you have ant in your PATH and have set ANT_HOME to the
location of your ant installation, typing "ant" at the shell prompt
and command prompt should run ant. Ant will by default look for the
"build.xml" file in your current directory, and compile Lucene.
If you want to build the documentation, type "./gradlew buildSite".
If you want to build the documentation, type "ant documentation".
For further information on Lucene, go to:
@ -75,3 +86,7 @@ Please join the Lucene-User mailing list by visiting this site:
Please post suggestions, questions, corrections or additions to this
document to the lucene-user mailing list.
This file was originally written by Steven J. Owens <puff@darksleep.com>.
This file was modified by Jon S. Stevens <jon@latchkey.com>.
Copyright (c) 2001-2020 The Apache Software Foundation. All rights reserved.

View File

@ -158,8 +158,6 @@ Other
* LUCENE-9411: Fail complation on warnings, 9x gradle-only (Erick Erickson, Dawid Weiss)
Deserves mention here as well as Lucene CHANGES.txt since it affects both.
* LUCENE-9433: Remove Ant support from trunk (Erick Erickson)
======================= Lucene 8.7.0 =======================
API Changes

View File

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analysis-module-build">
<!-- submodule build for analyzers.
ensures that each submodule is built under build/
consistent with its source structure so that
binary packaging makes sense -->
<basename property="submodule.project.name" file="${basedir}"/>
<dirname file="${ant.file.analysis-module-build}" property="analysis.dir"/>
<property name="build.dir"
location="${analysis.dir}/../build/analysis/${submodule.project.name}"/>
<import file="../module-build.xml"/>
<target name="javadocs" depends="javadocs-analyzers-common, compile-core, check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../analyzers-common"/>
</links>
</invoke-module-javadoc>
</target>
</project>

172
lucene/analysis/build.xml Normal file
View File

@ -0,0 +1,172 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers" default="default">
<description>
Additional Analyzers
- common: Additional Analyzers
- icu: Analyzers that use functionality from ICU
- kuromoji: Japanese Morphological Analyzer
- morfologik: Morfologik Stemmer
- nori: Korean Morphological Analyzer
- smartcn: Smart Analyzer for Simplified Chinese Text
- stempel: Algorithmic Stemmer for Polish
</description>
<dirname file="${ant.file.analyzers}" property="analyzers.dir"/>
<macrodef name="forall-analyzers">
<attribute name="target" />
<sequential>
<subant target="@{target}" inheritall="false" failonerror="true">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="${analyzers.dir}" includes="*/build.xml" />
</subant>
</sequential>
</macrodef>
<propertyset id="uptodate.and.compiled.properties" dynamic="true">
<propertyref regex=".*\.uptodate$$"/>
<propertyref regex=".*\.compiled$$"/>
<propertyref regex=".*\.loaded$$"/>
<propertyref name="tests.totals.tmpfile" />
</propertyset>
<target name="common">
<ant dir="common" />
</target>
<target name="icu">
<ant dir="icu" />
</target>
<target name="kuromoji">
<ant dir="kuromoji" />
</target>
<target name="morfologik">
<ant dir="morfologik" />
</target>
<target name="nori">
<ant dir="nori" />
</target>
<target name="opennlp">
<ant dir="opennlp" />
</target>
<target name="phonetic">
<ant dir="phonetic" />
</target>
<target name="smartcn">
<ant dir="smartcn" />
</target>
<target name="stempel">
<ant dir="stempel" />
</target>
<target name="default" depends="compile"/>
<target name="compile" depends="common,icu,kuromoji,morfologik,nori,opennlp,phonetic,smartcn,stempel" />
<target name="clean">
<forall-analyzers target="clean"/>
</target>
<target name="resolve">
<forall-analyzers target="resolve"/>
</target>
<target name="validate">
<forall-analyzers target="validate"/>
</target>
<target name="compile-core">
<forall-analyzers target="compile-core"/>
</target>
<target name="compile-test">
<forall-analyzers target="compile-test"/>
</target>
<target name="compile-tools">
<forall-analyzers target="compile-tools"/>
</target>
<target name="test">
<forall-analyzers target="test"/>
</target>
<target name="test-nocompile">
<fail message="Target 'test-nocompile' will not run recursively. First change directory to the module you want to test."/>
</target>
<target name="beast">
<fail message="The Beast only works inside of individual modules"/>
</target>
<target name="jar">
<forall-analyzers target="jar-core"/>
</target>
<target name="jar-src">
<forall-analyzers target="jar-src"/>
</target>
<target name="jar-core" depends="jar"/>
<target name="build-artifacts-and-tests" depends="default,compile-test" />
<target name="-dist-maven">
<forall-analyzers target="-dist-maven"/>
</target>
<target name="-install-to-maven-local-repo">
<forall-analyzers target="-install-to-maven-local-repo"/>
</target>
<target name="-validate-maven-dependencies">
<forall-analyzers target="-validate-maven-dependencies"/>
</target>
<target name="javadocs">
<forall-analyzers target="javadocs"/>
</target>
<target name="javadocs-index.html">
<forall-analyzers target="javadocs-index.html"/>
</target>
<target name="rat-sources">
<forall-analyzers target="rat-sources"/>
</target>
<target name="-ecj-javadoc-lint">
<forall-analyzers target="-ecj-javadoc-lint"/>
</target>
<target name="regenerate">
<forall-analyzers target="regenerate"/>
</target>
<target name="-append-module-dependencies-properties">
<forall-analyzers target="-append-module-dependencies-properties"/>
</target>
<target name="check-forbidden-apis">
<forall-analyzers target="check-forbidden-apis"/>
</target>
<target name="jacoco">
<forall-analyzers target="jacoco"/>
</target>
</project>

View File

@ -0,0 +1,125 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-common" default="default">
<description>
Analyzers for indexing content in different languages and domains.
</description>
<!-- some files for testing that do not have license headers -->
<property name="rat.excludes" value="**/*.aff,**/*.dic,**/*.txt,**/charfilter/*.htm*,**/*LuceneResourcesWikiPage.html"/>
<property name="rat.additional-includes" value="src/tools/**"/>
<import file="../analysis-module-build.xml"/>
<property name="unicode-props-file" location="src/java/org/apache/lucene/analysis/util/UnicodeProps.java"/>
<!-- Because of a bug in JFlex's ant task, HTMLStripCharFilter has to be generated last. -->
<!-- Otherwise the "%apiprivate" option used in its specification will leak into following -->
<!-- ant task invocations. -->
<target name="jflex" depends="init,clean-jflex,-jflex-wiki-tokenizer,-jflex-ClassicAnalyzer,
-jflex-UAX29URLEmailTokenizer,-jflex-HTMLStripCharFilter"/>
<target name="-jflex-HTMLStripCharFilter" depends="-install-jflex,generate-jflex-html-char-entities">
<run-jflex dir="src/java/org/apache/lucene/analysis/charfilter" name="HTMLStripCharFilter"/>
<fixcrlf file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java" encoding="UTF-8" eol="lf"/>
</target>
<target name="generate-jflex-html-char-entities">
<exec dir="src/java/org/apache/lucene/analysis/charfilter"
output="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex"
executable="${python3.exe}" failonerror="true" logerror="true">
<!-- Tell Python not to write any bytecode cache into the filesystem: -->
<arg value="-B"/>
<arg value="htmlentity.py"/>
</exec>
<fixcrlf file="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex" encoding="UTF-8" eol="lf"/>
</target>
<target name="-jflex-wiki-tokenizer" depends="-install-jflex">
<run-jflex dir="src/java/org/apache/lucene/analysis/wikipedia" name="WikipediaTokenizerImpl"/>
</target>
<target name="-jflex-ClassicAnalyzer" depends="-install-jflex">
<run-jflex dir="src/java/org/apache/lucene/analysis/standard" name="ClassicTokenizerImpl"/>
</target>
<target name="-jflex-UAX29URLEmailTokenizer" depends="-install-jflex">
<run-jflex-and-disable-buffer-expansion
dir="src/java/org/apache/lucene/analysis/standard" name="UAX29URLEmailTokenizerImpl"/>
</target>
<target name="clean-jflex">
<delete>
<fileset dir="src/java/org/apache/lucene/analysis/charfilter" includes="*.java">
<containsregexp expression="generated.*by.*JFlex"/>
</fileset>
<fileset dir="src/java/org/apache/lucene/analysis/wikipedia" includes="*.java">
<containsregexp expression="generated.*by.*JFlex"/>
</fileset>
<fileset dir="src/java/org/apache/lucene/analysis/standard" includes="**/*.java">
<containsregexp expression="generated.*by.*JFlex"/>
</fileset>
</delete>
</target>
<target xmlns:ivy="antlib:org.apache.ivy.ant" name="-resolve-icu4j" unless="icu4j.resolved" depends="ivy-availability-check,ivy-configure">
<loadproperties prefix="ivyversions" srcFile="${common.dir}/ivy-versions.properties"/>
<ivy:cachepath organisation="com.ibm.icu" module="icu4j" revision="${ivyversions./com.ibm.icu/icu4j}"
inline="true" conf="default" transitive="true" pathid="icu4j.classpath"/>
<property name="icu4j.resolved" value="true"/>
</target>
<target name="unicode-data" depends="-resolve-icu4j,resolve-groovy">
<groovy classpathref="icu4j.classpath" src="src/tools/groovy/generate-unicode-data.groovy"/>
<fixcrlf file="${unicode-props-file}" encoding="UTF-8"/>
</target>
<property name="tld.zones" value="https://www.internic.net/zones/root.zone"/>
<property name="tld.output" location="src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro"/>
<target name="gen-tlds" depends="compile-tools">
<java
classname="org.apache.lucene.analysis.standard.GenerateJflexTLDMacros"
dir="."
fork="true"
failonerror="true">
<classpath>
<pathelement location="${build.dir}/classes/tools"/>
</classpath>
<arg value="${tld.zones}"/>
<arg value="${tld.output}"/>
<redirector alwayslog="true"/> <!-- stupid trick to get java class's stdout to ant's log -->
</java>
</target>
<target name="compile-tools" depends="common.compile-tools">
<compile
srcdir="src/tools/java"
destdir="${build.dir}/classes/tools">
<classpath refid="classpath"/>
</compile>
</target>
<target name="javadocs" depends="module-build.javadocs"/>
<target name="regenerate" depends="jflex,unicode-data"/>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-common"/>
</ivy-module>

View File

@ -0,0 +1,118 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-icu" default="default">
<description>
Analysis integration with ICU (International Components for Unicode).
</description>
<property name="rat.additional-includes" value="src/tools/**"/>
<import file="../analysis-module-build.xml"/>
<path id="icujar">
<fileset dir="lib"/>
</path>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<path refid="icujar"/>
<path refid="base.classpath"/>
</path>
<path id="test.classpath">
<path refid="test.base.classpath" />
<pathelement path="src/test-files" />
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
<property name="utr30.data.dir" location="src/data/utr30"/>
<target name="gen-utr30-data-files" depends="compile-tools">
<java
classname="org.apache.lucene.analysis.icu.GenerateUTR30DataFiles"
dir="${utr30.data.dir}"
fork="true"
failonerror="true">
<classpath>
<path refid="icujar"/>
<pathelement location="${build.dir}/classes/tools"/>
</classpath>
</java>
</target>
<property name="gennorm2.src.files"
value="nfc.txt nfkc.txt nfkc_cf.txt BasicFoldings.txt DiacriticFolding.txt DingbatFolding.txt HanRadicalFolding.txt NativeDigitFolding.txt"/>
<property name="gennorm2.tmp" value="${build.dir}/gennorm2/utr30.tmp"/>
<property name="gennorm2.dst" value="${resources.dir}/org/apache/lucene/analysis/icu/utr30.nrm"/>
<target name="gennorm2" depends="gen-utr30-data-files">
<echo>Note that the gennorm2 and icupkg tools must be on your PATH. These tools
are part of the ICU4C package. See http://site.icu-project.org/ </echo>
<mkdir dir="${build.dir}/gennorm2"/>
<exec executable="gennorm2" failonerror="true">
<arg value="-v"/>
<arg value="-s"/>
<arg value="${utr30.data.dir}"/>
<arg line="${gennorm2.src.files}"/>
<arg value="-o"/>
<arg value="${gennorm2.tmp}"/>
</exec>
<!-- now convert binary file to big-endian -->
<exec executable="icupkg" failonerror="true">
<arg value="-tb"/>
<arg value="${gennorm2.tmp}"/>
<arg value="${gennorm2.dst}"/>
</exec>
<delete file="${gennorm2.tmp}"/>
</target>
<property name="rbbi.src.dir" location="src/data/uax29"/>
<property name="rbbi.dst.dir" location="${resources.dir}/org/apache/lucene/analysis/icu/segmentation"/>
<target name="genrbbi" depends="compile-tools">
<mkdir dir="${rbbi.dst.dir}"/>
<java
classname="org.apache.lucene.analysis.icu.RBBIRuleCompiler"
dir="."
fork="true"
failonerror="true">
<classpath>
<path refid="icujar"/>
<pathelement location="${build.dir}/classes/tools"/>
</classpath>
<assertions>
<enable package="org.apache.lucene"/>
</assertions>
<arg value="${rbbi.src.dir}"/>
<arg value="${rbbi.dst.dir}"/>
</java>
</target>
<target name="compile-tools" depends="init,common.compile-tools">
<compile
srcdir="src/tools/java"
destdir="${build.dir}/classes/tools">
<classpath refid="classpath"/>
</compile>
</target>
<target name="regenerate" depends="gen-utr30-data-files,gennorm2,genrbbi"/>
</project>

View File

@ -0,0 +1,28 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-icu"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,98 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-kuromoji" default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Japanese Morphological Analyzer
</description>
<!-- currently whether rat detects this as binary or not
is platform dependent?! -->
<property name="rat.excludes" value="**/*.txt,**/bocchan.utf-8"/>
<!-- we don't want to pull in ipadic/naist etc -->
<property name="ivy.default.configuration" value="default"/>
<import file="../analysis-module-build.xml"/>
<!-- default configuration: uses mecab-ipadic -->
<property name="ipadic.type" value="ipadic"/>
<property name="ipadic.version" value="mecab-ipadic-2.7.0-20070801" />
<!-- alternative configuration: uses mecab-naist-jdic
<property name="ipadic.type" value="naist"/>
<property name="ipadic.version" value="mecab-naist-jdic-0.6.3b-20111013" />
-->
<property name="dict.src.file" value="${ipadic.version}.tar.gz" />
<property name="dict.src.dir" value="${build.dir}/${ipadic.version}" />
<property name="dict.encoding" value="euc-jp"/>
<property name="dict.format" value="ipadic"/>
<property name="dict.normalize" value="false"/>
<property name="dict.target.dir" location="${resources.dir}"/>
<available type="dir" file="${build.dir}/${ipadic.version}" property="dict.available"/>
<path id="classpath">
<dirset dir="${build.dir}">
<include name="classes/java"/>
</dirset>
<pathelement path="${analyzers-common.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
<target name="download-dict" depends="ivy-availability-check,ivy-fail,ivy-configure" unless="dict.available">
<ivy:retrieve pattern="${build.dir}/${dict.src.file}" conf="${ipadic.type}" symlink="${ivy.symlink}"/>
<!-- TODO: we should checksum too -->
<gunzip src="${build.dir}/${dict.src.file}"/>
<untar src="${build.dir}/${ipadic.version}.tar" dest="${build.dir}"/>
</target>
<target name="patch-dict" depends="download-dict">
<patch patchfile="src/tools/patches/Noun.proper.csv.patch"
originalfile="${dict.src.dir}/Noun.proper.csv"/>
</target>
<target name="build-dict" depends="compile, patch-dict">
<sequential>
<delete verbose="true">
<fileset dir="${resources.dir}/org/apache/lucene/analysis/ja/dict" includes="**/*"/>
</delete>
<!-- TODO: optimize the dictionary construction a bit so that you don't need 1G -->
<java fork="true" failonerror="true" maxmemory="1g" classname="org.apache.lucene.analysis.ja.util.DictionaryBuilder">
<classpath refid="classpath"/>
<assertions>
<enable package="org.apache.lucene"/>
</assertions>
<arg value="${dict.format}"/>
<arg value="${dict.src.dir}"/>
<arg value="${dict.target.dir}"/>
<arg value="${dict.encoding}"/>
<arg value="${dict.normalize}"/>
</java>
</sequential>
</target>
<target name="compile-test" depends="module-build.compile-test"/>
<target name="regenerate" depends="build-dict"/>
</project>

View File

@ -0,0 +1,37 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-kuromoji"/>
<configurations defaultconfmapping="ipadic->default;naist->default"> <!-- 'master' conf not available to map to -->
<conf name="default" description="explicitly declare this configuration in order to not download dictionaries unless explicitly called for"/>
<conf name="ipadic" description="ipadic dictionary" transitive="false"/>
<conf name="naist" description="naist-jdic dictionary" transitive="false"/>
</configurations>
<dependencies>
<dependency org="mecab" name="mecab-ipadic" rev="${/mecab/mecab-ipadic}" conf="ipadic">
<artifact name="ipadic" type=".tar.gz" url="https://jaist.dl.sourceforge.net/project/mecab/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz"/>
</dependency>
<dependency org="mecab" name="mecab-naist-jdic" rev="${/mecab/mecab-naist-jdic}" conf="naist">
<artifact name="mecab-naist-jdic" type=".tar.gz" url=" https://rwthaachen.dl.osdn.jp/naist-jdic/53500/mecab-naist-jdic-0.6.3b-20111013.tar.gz"/>
</dependency>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-morfologik" default="default">
<description>
Analyzer for dictionary stemming, built-in Polish dictionary
</description>
<import file="../analysis-module-build.xml"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<fileset dir="lib"/>
<path refid="base.classpath"/>
</path>
<path id="test.classpath">
<path refid="test.base.classpath" />
<pathelement path="src/test-files" />
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-morfologik"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.carrot2" name="morfologik-polish" rev="${/org.carrot2/morfologik-polish}" conf="compile"/>
<dependency org="org.carrot2" name="morfologik-fsa" rev="${/org.carrot2/morfologik-fsa}" conf="compile"/>
<dependency org="org.carrot2" name="morfologik-stemming" rev="${/org.carrot2/morfologik-stemming}" conf="compile"/>
<dependency org="ua.net.nlp" name="morfologik-ukrainian-search" rev="${/ua.net.nlp/morfologik-ukrainian-search}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,84 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-nori" default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Korean Morphological Analyzer
</description>
<!-- currently whether rat detects this as binary or not
is platform dependent?! -->
<property name="rat.excludes" value="**/*.txt,**/bocchan.utf-8"/>
<!-- we don't want to pull in ipadic/naist etc -->
<property name="ivy.default.configuration" value="default"/>
<import file="../analysis-module-build.xml"/>
<!-- default configuration for Korean: uses mecab-ko-dic -->
<property name="dict.type" value="mecab-ko-dic"/>
<property name="dict.version" value="mecab-ko-dic-2.0.3-20170922" />
<property name="dict.src.file" value="${dict.version}.tar.gz" />
<property name="dict.src.dir" value="${build.dir}/${dict.version}" />
<property name="dict.encoding" value="utf-8"/>
<property name="dict.normalize" value="false"/>
<property name="dict.target.dir" location="${resources.dir}"/>
<available type="dir" file="${build.dir}/${dict.version}" property="mecab-ko.dict.available"/>
<path id="classpath">
<dirset dir="${build.dir}">
<include name="classes/java"/>
</dirset>
<pathelement path="${analyzers-common.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
<target name="download-dict" depends="ivy-availability-check,ivy-fail,ivy-configure" unless="mecab-ko.dict.available">
<ivy:retrieve pattern="${build.dir}/${dict.src.file}" conf="${dict.type}" symlink="${ivy.symlink}"/>
<!-- TODO: we should checksum too -->
<gunzip src="${build.dir}/${dict.src.file}"/>
<untar src="${build.dir}/${dict.version}.tar" dest="${build.dir}"/>
</target>
<target name="build-dict" depends="compile, download-dict">
<sequential>
<delete verbose="true">
<fileset dir="${resources.dir}/org/apache/lucene/analysis/ko/dict" includes="**/*"/>
</delete>
<!-- TODO: optimize the dictionary construction a bit so that you don't need 1G -->
<java fork="true" failonerror="true" maxmemory="1g" classname="org.apache.lucene.analysis.ko.util.DictionaryBuilder">
<classpath refid="classpath"/>
<assertions>
<enable package="org.apache.lucene"/>
</assertions>
<arg value="${dict.src.dir}"/>
<arg value="${dict.target.dir}"/>
<arg value="${dict.encoding}"/>
<arg value="${dict.normalize}"/>
</java>
</sequential>
</target>
<target name="compile-test" depends="module-build.compile-test"/>
<target name="regenerate" depends="build-dict"/>
</project>

View File

@ -0,0 +1,33 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-nori"/>
<configurations defaultconfmapping="mecab-ko-dic->default"> <!-- 'master' conf not available to map to -->
<conf name="default" description="explicitly declare this configuration in order to not download dictionaries unless explicitly called for"/>
<conf name="mecab-ko-dic" description="mecab-ko dictionary for Korean" transitive="false"/>
</configurations>
<dependencies>
<dependency org="mecab" name="mecab-ko-dic" rev="${/mecab/mecab-ko-dic}" conf="mecab-ko-dic">
<artifact name="mecab-ko-dic" type=".tar.gz" url="https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.0.3-20170922.tar.gz" />
</dependency>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,118 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-opennlp" default="default">
<description>
OpenNLP Library Integration
</description>
<path id="opennlpjars">
<fileset dir="lib"/>
</path>
<property name="test.model.data.dir" location="src/tools/test-model-data"/>
<property name="tests.userdir" location="src/test-files"/>
<property name="test.model.dir" location="${tests.userdir}/org/apache/lucene/analysis/opennlp"/>
<import file="../analysis-module-build.xml"/>
<property name="analysis-extras.conf.dir"
location="${common.dir}/../solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<path refid="opennlpjars"/>
<path refid="base.classpath"/>
</path>
<path id="test.classpath">
<path refid="test.base.classpath"/>
<pathelement path="${tests.userdir}"/>
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
<!--
This does not create real NLP models, just small unencumbered ones for the unit tests.
All text taken from reuters corpus.
Tags applied with online demos at CCG Urbana-Champaign.
-->
<target name="train-test-models" description="Train all small test models for unit tests" depends="resolve">
<mkdir dir="${test.model.dir}"/>
<!-- https://opennlp.apache.org/docs/1.9.0/manual/opennlp.html#tools.sentdetect.training -->
<trainModel command="SentenceDetectorTrainer" lang="en" data="sentences.txt" model="en-test-sent.bin"/>
<copy file="${test.model.dir}/en-test-sent.bin" todir="${analysis-extras.conf.dir}"/>
<!-- https://opennlp.apache.org/docs/1.9.0/manual/opennlp.html#tools.tokenizer.training -->
<trainModel command="TokenizerTrainer" lang="en" data="tokenizer.txt" model="en-test-tokenizer.bin"/>
<copy file="${test.model.dir}/en-test-tokenizer.bin" todir="${analysis-extras.conf.dir}"/>
<!-- https://opennlp.apache.org/docs/1.9.0/manual/opennlp.html#tools.postagger.training -->
<trainModel command="POSTaggerTrainer" lang="en" data="pos.txt" model="en-test-pos-maxent.bin"/>
<!-- https://opennlp.apache.org/docs/1.9.0/manual/opennlp.html#tools.chunker.training -->
<trainModel command="ChunkerTrainerME" lang="en" data="chunks.txt" model="en-test-chunker.bin"/>
<!-- https://opennlp.apache.org/docs/1.9.0/manual/opennlp.html#tools.namefind.training -->
<trainModel command="TokenNameFinderTrainer" lang="en" data="ner.txt" model="en-test-ner.bin">
<extra-args>
<arg value="-params"/>
<arg value="ner_TrainerParams.txt"/>
</extra-args>
</trainModel>
<copy file="${test.model.dir}/en-test-ner.bin" todir="${analysis-extras.conf.dir}"/>
<!-- https://opennlp.apache.org/docs/1.9.0/manual/opennlp.html#tools.lemmatizer.training -->
<trainModel command="LemmatizerTrainerME" lang="en" data="lemmas.txt" model="en-test-lemmatizer.bin"/>
</target>
<macrodef name="trainModel">
<attribute name="command"/>
<attribute name="lang"/>
<attribute name="data"/>
<attribute name="model"/>
<element name="extra-args" optional="true"/>
<sequential>
<java classname="opennlp.tools.cmdline.CLI"
dir="${test.model.data.dir}"
fork="true"
failonerror="true">
<classpath>
<path refid="opennlpjars"/>
</classpath>
<arg value="@{command}"/>
<arg value="-lang"/>
<arg value="@{lang}"/>
<arg value="-data"/>
<arg value="@{data}"/>
<arg value="-model"/>
<arg value="${test.model.dir}/@{model}"/>
<extra-args/>
</java>
</sequential>
</macrodef>
<target name="regenerate" depends="train-test-models"/>
</project>

View File

@ -0,0 +1,28 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-opennlp" />
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.apache.opennlp" name="opennlp-tools" rev="${/org.apache.opennlp/opennlp-tools}" transitive="false" conf="compile" />
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}" />
</dependencies>
</ivy-module>

View File

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-phonetic" default="default">
<description>
Analyzer for indexing phonetic signatures (for sounds-alike search)
</description>
<import file="../analysis-module-build.xml"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<fileset dir="lib"/>
<path refid="base.classpath"/>
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
</project>

View File

@ -0,0 +1,28 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-phonetic"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="commons-codec" name="commons-codec" rev="${/commons-codec/commons-codec}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-smartcn" default="default">
<description>
Analyzer for indexing Chinese
</description>
<import file="../analysis-module-build.xml"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-smartcn"/>
</ivy-module>

View File

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="analyzers-stempel" default="default">
<description>
Analyzer for indexing Polish
</description>
<import file="../analysis-module-build.xml"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="compile-core" depends="jar-analyzers-common, common.compile-core"/>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="analyzers-stempel"/>
</ivy-module>

View File

@ -0,0 +1,26 @@
<!--
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.
-->
<project name="backward-codecs" default="default">
<description>
Codecs for older versions of Lucene.
</description>
<import file="../module-build.xml"/>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="backward-codecs"/>
</ivy-module>

289
lucene/benchmark/build.xml Normal file
View File

@ -0,0 +1,289 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="benchmark" default="default">
<description>
System for benchmarking Lucene
</description>
<import file="../module-build.xml"/>
<property name="working.dir" location="work"/>
<!-- benchmark creates lots of sysout stuff, so dont run forbidden! -->
<target name="-check-forbidden-sysout"/>
<target name="check-files">
<available file="temp/news20.tar.gz" property="news20.exists"/>
<available file="${working.dir}/20_newsgroup" property="news20.expanded"/>
<available file="temp/reuters21578.tar.gz" property="reuters.exists"/>
<available file="${working.dir}/reuters" property="reuters.expanded"/>
<available file="${working.dir}/reuters-out" property="reuters.extracted"/>
<available file="temp/20news-18828.tar.gz" property="20news-18828.exists"/>
<available file="${working.dir}/20news-18828" property="20news-18828.expanded"/>
<available file="${working.dir}/mini_newsgroups" property="mini.expanded"/>
<available file="temp/allCountries.txt.bz2" property="geonames.exists"/>
<available file="${working.dir}/geonames" property="geonames.expanded"/>
<available file="temp/enwiki-20070527-pages-articles.xml.bz2" property="enwiki.exists"/>
<available file="temp/enwiki-20070527-pages-articles.xml" property="enwiki.expanded"/>
<available file="${working.dir}/enwiki.txt" property="enwiki.extracted"/>
<available file="temp/${top.100k.words.archive.filename}"
property="top.100k.words.archive.present"/>
<available file="${working.dir}/top100k-out"
property="top.100k.word.files.expanded"/>
</target>
<target name="enwiki-files" depends="check-files">
<mkdir dir="temp"/>
<antcall target="get-enwiki"/>
<antcall target="expand-enwiki"/>
</target>
<target name="get-enwiki" unless="enwiki.exists">
<get src="https://home.apache.org/~dsmiley/data/enwiki-20070527-pages-articles.xml.bz2"
dest="temp/enwiki-20070527-pages-articles.xml.bz2"/>
</target>
<target name="expand-enwiki" unless="enwiki.expanded">
<bunzip2 src="temp/enwiki-20070527-pages-articles.xml.bz2" dest="temp"/>
</target>
<target name="geonames-files" depends="check-files" description="Get data for spatial.alg">
<mkdir dir="temp"/>
<antcall target="get-geonames"/>
<antcall target="expand-geonames"/>
</target>
<target name="get-geonames" unless="geonames.exists">
<!-- note: latest data is at: https://download.geonames.org/export/dump/allCountries.zip
and then randomize with: gsort -R -S 1500M file.txt > file_random.txt
and then compress with: bzip2 -9 -k file_random.txt -->
<get src="https://home.apache.org/~dsmiley/data/geonames_20130921_randomOrder_allCountries.txt.bz2"
dest="temp/allCountries.txt.bz2"/>
</target>
<target name="expand-geonames" unless="geonames.expanded">
<mkdir dir="${working.dir}/geonames"/>
<bunzip2 src="temp/allCountries.txt.bz2" dest="${working.dir}/geonames"/>
</target>
<target name="get-news-20" unless="20news-18828.exists">
<get src="https://www-2.cs.cmu.edu/afs/cs.cmu.edu/project/theo-20/www/data/news20.tar.gz"
dest="temp/news20.tar.gz"/>
</target>
<target name="get-reuters" unless="reuters.exists">
<!-- Please note: there is no HTTPS url. As this is only test data, we don't care: -->
<get src="http://www.daviddlewis.com/resources/testcollections/reuters21578/reuters21578.tar.gz"
dest="temp/reuters21578.tar.gz"/>
</target>
<target name="expand-news-20" unless="news20.expanded">
<gunzip src="temp/news20.tar.gz" dest="temp"/>
<untar src="temp/news20.tar" dest="${working.dir}"/>
</target>
<target name="expand-reuters" unless="reuters.expanded">
<gunzip src="temp/reuters21578.tar.gz" dest="temp"/>
<mkdir dir="${working.dir}/reuters"/>
<untar src="temp/reuters21578.tar" dest="${working.dir}/reuters"/>
<delete >
<fileset dir="${working.dir}/reuters">
<include name="*.txt"/>
</fileset>
</delete>
</target>
<target name="extract-reuters" depends="check-files" unless="reuters.extracted">
<java classname="org.apache.lucene.benchmark.utils.ExtractReuters" maxmemory="1024M" fork="true">
<classpath refid="run.classpath"/>
<arg file="${working.dir}/reuters"/>
<arg file="${working.dir}/reuters-out"/>
</java>
</target>
<target name="get-20news-18828" unless="20news-18828.exists">
<!-- TODO: URL no longer works (404 Not found): -->
<get src="https://people.csail.mit.edu/u/j/jrennie/public_html/20Newsgroups/20news-18828.tar.gz"
dest="temp/20news-18828.tar.gz"/>
</target>
<target name="expand-20news-18828" unless="20news-18828.expanded">
<gunzip src="temp/20news-18828.tar.gz" dest="temp"/>
<untar src="temp/20news-18828.tar" dest="${working.dir}"/>
</target>
<target name="get-mini-news" unless="mini.exists">
<get src="https://kdd.ics.uci.edu/databases/20newsgroups/mini_newsgroups.tar.gz"
dest="temp/mini_newsgroups.tar.gz"/>
</target>
<target name="expand-mini-news" unless="mini.expanded">
<gunzip src="temp/mini_newsgroups.tar.gz" dest="temp"/>
<untar src="temp/mini_newsgroups.tar" dest="${working.dir}"/>
</target>
<property name="top.100k.words.archive.filename"
value="top.100k.words.de.en.fr.uk.wikipedia.2009-11.tar.bz2"/>
<property name="top.100k.words.archive.base.url"
value="https://home.apache.org/~rmuir/wikipedia"/>
<target name="get-top-100k-words-archive" unless="top.100k.words.archive.present">
<mkdir dir="temp"/>
<get src="${top.100k.words.archive.base.url}/${top.100k.words.archive.filename}"
dest="temp/${top.100k.words.archive.filename}"/>
</target>
<target name="expand-top-100k-word-files" unless="top.100k.word.files.expanded">
<mkdir dir="${working.dir}/top100k-out"/>
<untar src="temp/${top.100k.words.archive.filename}"
overwrite="true" compression="bzip2" dest="${working.dir}/top100k-out"/>
</target>
<target name="top-100k-wiki-word-files" depends="check-files">
<mkdir dir="${working.dir}"/>
<antcall target="get-top-100k-words-archive"/>
<antcall target="expand-top-100k-word-files"/>
</target>
<target name="get-files" depends="check-files">
<mkdir dir="temp"/>
<antcall target="get-reuters"/>
<antcall target="expand-reuters"/>
<antcall target="extract-reuters"/>
</target>
<path id="classpath">
<pathelement path="${memory.jar}"/>
<pathelement path="${highlighter.jar}"/>
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${queryparser.jar}"/>
<pathelement path="${facet.jar}"/>
<pathelement path="${spatial-extras.jar}"/>
<pathelement path="${queries.jar}"/>
<pathelement path="${codecs.jar}"/>
<pathelement path="${join.jar}"/>
<path refid="base.classpath"/>
<fileset dir="lib"/>
</path>
<path id="run.classpath">
<path refid="classpath"/>
<pathelement location="${build.dir}/classes/java"/>
<pathelement path="${benchmark.ext.classpath}"/>
</path>
<target name="javadocs" depends="javadocs-memory,javadocs-highlighter,javadocs-analyzers-common,
javadocs-queryparser,javadocs-facet,javadocs-spatial-extras,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../memory"/>
<link href="../highlighter"/>
<link href="../analyzers-common"/>
<link href="../queryparser"/>
<link href="../facet"/>
<link href="../spatial-extras"/>
</links>
</invoke-module-javadoc>
</target>
<property name="task.alg" location="conf/micro-standard.alg"/>
<property name="task.mem" value="140M"/>
<target name="run-task" depends="compile,check-files,get-files"
description="Run compound penalty perf test (optional: -Dtask.alg=your-algorithm-file -Dtask.mem=java-max-mem)">
<echo>Working Directory: ${working.dir}</echo>
<java classname="org.apache.lucene.benchmark.byTask.Benchmark" maxmemory="${task.mem}" fork="true">
<classpath refid="run.classpath"/>
<arg file="${task.alg}"/>
</java>
</target>
<target name="enwiki" depends="compile,check-files,enwiki-files">
<echo>Working Directory: ${working.dir}</echo>
<java classname="org.apache.lucene.benchmark.byTask.Benchmark" maxmemory="1024M" fork="true">
<assertions>
<enable/>
</assertions>
<classpath refid="run.classpath"/>
<arg file="conf/extractWikipedia.alg"/>
</java>
</target>
<property name="collation.alg.file" location="conf/collation.alg"/>
<property name="collation.output.file"
value="${working.dir}/collation.benchmark.output.txt"/>
<property name="collation.jira.output.file"
value="${working.dir}/collation.bm2jira.output.txt"/>
<path id="collation.runtime.classpath">
<path refid="run.classpath"/>
<pathelement path="${analyzers-icu.jar}"/>
</path>
<target name="collation" depends="compile,jar-analyzers-icu,top-100k-wiki-word-files">
<echo>Running benchmark with alg file: ${collation.alg.file}</echo>
<java fork="true" classname="org.apache.lucene.benchmark.byTask.Benchmark"
maxmemory="${task.mem}" output="${collation.output.file}">
<classpath refid="collation.runtime.classpath"/>
<arg file="${collation.alg.file}"/>
</java>
<echo>Benchmark output is in file: ${collation.output.file}</echo>
<echo>Converting to JIRA table format...</echo>
<exec executable="${perl.exe}" output="${collation.jira.output.file}" failonerror="true">
<arg value="-CSD"/>
<arg value="scripts/collation.bm2jira.pl"/>
<arg value="${collation.output.file}"/>
</exec>
<echo>Benchmark output in JIRA table format is in file: ${collation.jira.output.file}</echo>
</target>
<property name="shingle.alg.file" location="conf/shingle.alg"/>
<property name="shingle.output.file"
value="${working.dir}/shingle.benchmark.output.txt"/>
<property name="shingle.jira.output.file"
value="${working.dir}/shingle.bm2jira.output.txt"/>
<path id="shingle.runtime.classpath">
<path refid="run.classpath"/>
</path>
<target name="shingle" depends="compile,get-files">
<echo>Running benchmark with alg file: ${shingle.alg.file}</echo>
<java fork="true" classname="org.apache.lucene.benchmark.byTask.Benchmark"
maxmemory="${task.mem}" output="${shingle.output.file}">
<classpath refid="run.classpath"/>
<arg file="${shingle.alg.file}"/>
</java>
<echo>Benchmark output is in file: ${shingle.output.file}</echo>
<echo>Converting to JIRA table format...</echo>
<exec executable="${perl.exe}" output="${shingle.jira.output.file}" failonerror="true">
<arg value="-CSD"/>
<arg value="scripts/shingle.bm2jira.pl"/>
<arg value="${shingle.output.file}"/>
</exec>
<echo>Benchmark output in JIRA table format is in file: ${shingle.jira.output.file}</echo>
</target>
<target name="init" depends="module-build.init,jar-memory,jar-highlighter,jar-analyzers-common,jar-queryparser,jar-facet,jar-spatial-extras,jar-codecs,jar-join"/>
<target name="compile-test" depends="copy-alg-files-for-testing,module-build.compile-test"/>
<target name="copy-alg-files-for-testing" description="copy .alg files as resources for testing">
<copy todir="${build.dir}/classes/test/conf">
<fileset dir="conf"/>
</copy>
</target>
</project>

32
lucene/benchmark/ivy.xml Normal file
View File

@ -0,0 +1,32 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="benchmark"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.apache.commons" name="commons-compress" rev="${/org.apache.commons/commons-compress}" conf="compile"/>
<dependency org="xerces" name="xercesImpl" rev="${/xerces/xercesImpl}" conf="compile"/>
<dependency org="net.sourceforge.nekohtml" name="nekohtml" rev="${/net.sourceforge.nekohtml/nekohtml}" conf="compile"/>
<dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" conf="compile"/>
<dependency org="org.locationtech.spatial4j" name="spatial4j" rev="${/org.locationtech.spatial4j/spatial4j}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

586
lucene/build.xml Normal file
View File

@ -0,0 +1,586 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="lucene" default="default" basedir="."
xmlns:jacoco="antlib:org.jacoco.ant"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<import file="common-build.xml"/>
<path id="classpath">
<pathelement location="${common.dir}/build/core/classes/java"/>
</path>
<patternset id="binary.build.dist.patterns"
includes="docs/,**/*.jar,**/*.war"
excludes="poms/**,**/*-src.jar,**/*-javadoc.jar"
/>
<patternset id="binary.root.dist.patterns"
includes="LICENSE.txt,NOTICE.txt,README.md,
MIGRATE.md,JRE_VERSION_MIGRATION.md,
SYSTEM_REQUIREMENTS.md,
CHANGES.txt,
**/lib/*.jar,
licenses/**,
*/docs/,**/README*"
excludes="build/**,site/**,tools/**,**/lib/*servlet-api*.jar,dev-docs/**"
/>
<!-- ================================================================== -->
<!-- Prepares the build directory -->
<!-- ================================================================== -->
<target name="test-core" description="Runs unit tests for the core Lucene code">
<ant dir="${common.dir}/core" target="test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- "-clover.load" is *not* a useless dependency. do not remove -->
<target name="test" depends="-clover.load, -init-totals, test-core, test-test-framework, test-modules, -check-totals"
description="Runs all unit tests (core, modules and back-compat)"
/>
<target name="test-nocompile">
<fail message="Target 'test-nocompile' will not run recursively. First change directory to the module you want to test."/>
</target>
<target name="pitest" depends="pitest-modules"
description="Runs pitests (core, modules and back-compat)"
/>
<target name="beast">
<fail message="The Beast only works inside of individual modules"/>
</target>
<target name="compile-core" depends="compile-lucene-core"/>
<!-- lucene/test-framework is excluded from compilation -->
<target name="compile" depends="init,compile-lucene-core,compile-codecs"
description="Compiles core, codecs, and all modules">
<modules-crawl target="compile-core"/>
</target>
<!-- Validation (license/notice/api checks). -->
<target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
<!-- Validation here depends on compile-tools: but we want to compile modules' tools too -->
<target name="compile-tools" depends="common.compile-tools">
<modules-crawl target="compile-tools"/>
</target>
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
<property name="skipRegexChecksum" value=""/>
<license-check-macro dir="${basedir}" licensedir="${common.dir}/licenses">
<additional-filters>
<replaceregex pattern="^jetty([^/]+)$" replace="jetty" flags="gi" />
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
<replaceregex pattern="javax\.servlet([^/]+)$" replace="javax.servlet" flags="gi" />
<replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
</additional-filters>
</license-check-macro>
</target>
<target name="check-lib-versions" depends="compile-tools,resolve,load-custom-tasks"
description="Verify that the '/org/name' keys in ivy-versions.properties are sorted lexically and are neither duplicates nor orphans, and that all dependencies in all ivy.xml files use rev=&quot;$${/org/name}&quot; format.">
<lib-versions-check-macro dir="${common.dir}/.."
centralized.versions.file="${common.dir}/ivy-versions.properties"
top.level.ivy.settings.file="${common.dir}/top-level-ivy-settings.xml"
ivy.resolution-cache.dir="${ivy.resolution-cache.dir}"
ivy.lock-strategy="${ivy.lock-strategy}"
common.build.dir="${common.build.dir}"
ignore.conflicts.file="${common.dir}/ivy-ignore-conflicts.properties"/>
</target>
<!-- -install-forbidden-apis is *not* a useless dependency. do not remove -->
<target name="check-forbidden-apis" depends="-install-forbidden-apis" description="Check forbidden API calls in compiled class files">
<subant target="check-forbidden-apis" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
<fileset dir="tools" includes="build.xml"/>
</subant>
<modules-crawl target="check-forbidden-apis"/>
</target>
<target name="resolve">
<sequential>
<ant dir="test-framework" target="resolve" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="${common.dir}/tools" target="resolve" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<modules-crawl target="resolve"/>
</sequential>
</target>
<target name="documentation" description="Generate all documentation"
depends="javadocs,changes-to-html,process-webpages"/>
<target name="javadoc" depends="javadocs"/>
<target name="javadocs" description="Generate javadoc" depends="javadocs-lucene-core, javadocs-modules, javadocs-test-framework"/>
<target name="documentation-lint" depends="-ecj-javadoc-lint,-documentation-lint-unsupported" if="documentation-lint.supported"
description="Validates the generated documentation (HTML errors, broken links,...)">
<!-- we use antcall here, otherwise ANT will run all dependent targets: -->
<antcall target="-documentation-lint"/>
</target>
<!-- we check for broken links across all documentation -->
<target name="-documentation-lint" depends="documentation">
<echo message="Checking for broken links..."/>
<check-broken-links dir="build/docs"/>
<echo message="Checking for missing docs..."/>
<!-- TODO: change this level=method -->
<check-missing-javadocs dir="build/docs" level="class"/>
<!-- too many classes to fix overall to just enable
the above to be level="method" right now, but we
can prevent the modules that don't have problems
from getting any worse -->
<!-- analyzers-common: problems -->
<check-missing-javadocs dir="build/docs/analyzers-icu" level="method"/>
<!-- analyzers-kuromoji: problems -->
<check-missing-javadocs dir="build/docs/analyzers-morfologik" level="method"/>
<check-missing-javadocs dir="build/docs/analyzers-phonetic" level="method"/>
<!-- analyzers-smartcn: problems -->
<check-missing-javadocs dir="build/docs/analyzers-stempel" level="method"/>
<!-- benchmark: problems -->
<check-missing-javadocs dir="build/docs/classification" level="method"/>
<!-- codecs: problems -->
<!-- core: problems -->
<check-missing-javadocs dir="build/docs/demo" level="method"/>
<check-missing-javadocs dir="build/docs/expressions" level="method"/>
<check-missing-javadocs dir="build/docs/facet" level="method"/>
<!-- grouping: problems -->
<!-- highlighter: problems -->
<check-missing-javadocs dir="build/docs/join" level="method"/>
<check-missing-javadocs dir="build/docs/memory" level="method"/>
<!-- misc: problems -->
<!-- queries: problems -->
<!-- queryparser: problems -->
<!-- sandbox: problems -->
<!-- spatial-extras: problems -->
<check-missing-javadocs dir="build/docs/suggest" level="method"/>
<!-- test-framework: problems -->
<!-- too much to fix core/ for now, but enforce full javadocs for key packages -->
<check-missing-javadocs dir="build/docs/core/org/apache/lucene/util/automaton" level="method"/>
<check-missing-javadocs dir="build/docs/core/org/apache/lucene/analysis" level="method"/>
<check-missing-javadocs dir="build/docs/core/org/apache/lucene/document" level="method"/>
<check-missing-javadocs dir="build/docs/core/org/apache/lucene/search/similarities" level="method"/>
<check-missing-javadocs dir="build/docs/core/org/apache/lucene/index" level="method"/>
<check-missing-javadocs dir="build/docs/core/org/apache/lucene/codecs" level="method"/>
<check-missing-javadocs dir="build/docs/spatial3d" level="method"/>
</target>
<target name="-ecj-javadoc-lint" depends="compile,compile-test,-ecj-javadoc-lint-unsupported,-ecj-resolve" if="ecj-javadoc-lint.supported">
<subant target="-ecj-javadoc-lint" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
</subant>
<modules-crawl target="-ecj-javadoc-lint"/>
</target>
<target name="process-webpages" depends="resolve-markdown">
<makeurl property="process-webpages.buildfiles" separator="|">
<fileset dir="." includes="**/build.xml" excludes="build.xml,analysis/*,build/**,tools/**,site/**"/>
</makeurl>
<property name="Codec.java" location="core/src/java/org/apache/lucene/codecs/Codec.java"/>
<loadfile srcfile="${Codec.java}" property="defaultCodec" encoding="UTF-8">
<filterchain>
<!-- private static Codec defaultCodec = LOADER . lookup ( "LuceneXXX" ) ; -->
<containsregex pattern="^.*defaultCodec\s*=\s*LOADER\s*\.\s*lookup\s*\(\s*&quot;([^&quot;]+)&quot;\s*\)\s*;.*$" replace="\1"/>
<fixcrlf eol="unix" eof="remove" />
<deletecharacters chars="\n"/>
</filterchain>
</loadfile>
<!--
The XSL input file is ignored completely, but XSL expects one to be given,
so we pass ourself (${ant.file}) here. The list of module build.xmls is given
via string parameter, that must be splitted by the XSL at '|'.
-->
<xslt in="${ant.file}" out="${javadoc.dir}/index.html" style="site/xsl/index.xsl" force="true">
<outputproperty name="method" value="html"/>
<outputproperty name="version" value="4.0"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
<param name="buildfiles" expression="${process-webpages.buildfiles}"/>
<param name="version" expression="${version}"/>
<param name="defaultCodec" expression="${defaultCodec}"/>
</xslt>
<markdown todir="${javadoc.dir}">
<fileset dir="." includes="MIGRATE.md,JRE_VERSION_MIGRATION.md,SYSTEM_REQUIREMENTS.md"/>
<globmapper from="*.md" to="*.html"/>
</markdown>
<copy todir="${javadoc.dir}">
<fileset dir="site/html"/>
</copy>
</target>
<target name="javadocs-modules" description="Generate javadoc for modules classes">
<modules-crawl target="javadocs"/>
</target>
<!-- rat-sources-typedef is *not* a useless dependency. do not remove -->
<target name="rat-sources" depends="rat-sources-typedef,common.rat-sources">
<subant target="rat-sources" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
<fileset dir="tools" includes="build.xml"/>
</subant>
<modules-crawl target="rat-sources"/>
</target>
<!-- ================================================================== -->
<!-- D I S T R I B U T I O N -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package" depends="jar-core, jar-test-framework, build-modules, init-dist, documentation"/>
<target name="nightly" depends="test, package-tgz">
</target>
<!-- ================================================================== -->
<!-- Packages the distribution with zip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-zip" depends="package"
description="--> Generates the Lucene distribution as .zip">
<delete file="${dist.dir}/lucene-${version}.zip"/>
<zip destfile="${dist.dir}/lucene-${version}.zip">
<zipfileset prefix="lucene-${version}" dir=".">
<patternset refid="binary.root.dist.patterns"/>
</zipfileset>
<zipfileset prefix="lucene-${version}" dir="${build.dir}">
<patternset refid="binary.build.dist.patterns"/>
</zipfileset>
<zipfileset prefix="lucene-${version}" dir="${build.dir}" includes="**/*.sh,**/*.bat" filemode="755"/>
</zip>
<make-checksums file="${dist.dir}/lucene-${version}.zip"/>
</target>
<!-- ================================================================== -->
<!-- packages the distribution with tar-gzip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<!-- TODO: fix this stuff to not be a duplicate of the zip logic above! -->
<target name="package-tgz" depends="package"
description="--> Generates the lucene distribution as .tgz">
<delete file="${dist.dir}/lucene-${version}.tgz"/>
<tar tarfile="${dist.dir}/lucene-${version}.tgz"
longfile="gnu" compression="gzip">
<tarfileset prefix="lucene-${version}" dir=".">
<patternset refid="binary.root.dist.patterns"/>
</tarfileset>
<tarfileset prefix="lucene-${version}" dir="${build.dir}">
<patternset refid="binary.build.dist.patterns"/>
</tarfileset>
<tarfileset prefix="lucene-${version}" dir="${build.dir}" includes="**/*.sh,**/*.bat" filemode="755"/>
</tar>
<make-checksums file="${dist.dir}/lucene-${version}.tgz"/>
</target>
<!-- ================================================================== -->
<!-- packages the distribution with zip and tar-gzip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-all-binary" depends="package-zip, package-tgz"
description="--> Generates the .tgz and .zip distributions"/>
<!-- ================================================================== -->
<!-- same as package-all. it is just here for compatibility. -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<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 -->
<!-- ================================================================== -->
<target name="init-dist" >
<!-- Package is not called first if packaging src standalone, so the dist.dir may not exist -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${maven.dist.dir}"/>
</target>
<!-- ================================================================== -->
<!-- Packages the sources with tar-gzip -->
<!-- ================================================================== -->
<target name="package-tgz-src" depends="init-dist"
description="--> Generates the Lucene source distribution as .tgz">
<property name="source.package.file"
location="${dist.dir}/lucene-${version}-src.tgz"/>
<delete file="${source.package.file}"/>
<export-source source.dir="."/>
<!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->
<delete dir="${src.export.dir}/tools/javadoc/java8"/>
<!-- because we only package the "lucene/" folder, we have to adjust dir to work on: -->
<property name="local.src.export.dir" location="${src.export.dir}/lucene"/>
<build-changes changes.src.file="${local.src.export.dir}/CHANGES.txt"
changes.target.dir="${local.src.export.dir}/docs/changes"
changes.product="lucene"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset prefix="lucene-${version}" dir="${local.src.export.dir}"/>
</tar>
<make-checksums file="${source.package.file}"/>
</target>
<!-- ================================================================== -->
<!-- Packages the sources from local working copy with tar-gzip -->
<!-- ================================================================== -->
<target name="package-local-src-tgz" depends="init-dist"
description="--> Packages the Lucene source from the local working copy">
<mkdir dir="${common.dir}/build"/>
<property name="source.package.file"
value="${common.dir}/build/lucene-${version}-src.tgz"/>
<delete file="${source.package.file}"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset prefix="lucene-${version}" dir=".">
<patternset refid="lucene.local.src.package.patterns"/>
</tarfileset>
</tar>
</target>
<!-- ================================================================== -->
<!-- same as package-tgz-src. it is just here for compatibility. -->
<!-- ================================================================== -->
<target name="dist-src" depends="package-tgz-src"/>
<target name="dist-all" depends="dist, dist-src, -dist-changes"/>
<!-- copy changes/ to the release folder -->
<target name="-dist-changes">
<copy todir="${dist.dir}/changes">
<fileset dir="${build.dir}/docs/changes"/>
</copy>
</target>
<target name="prepare-release-no-sign" depends="clean, dist-all, generate-maven-artifacts"/>
<target name="prepare-release" depends="prepare-release-no-sign, sign-artifacts"/>
<target name="-dist-maven" depends="install-maven-tasks">
<sequential>
<m2-deploy pom.xml="${filtered.pom.templates.dir}/pom.xml"/> <!-- Lucene/Solr grandparent POM -->
<m2-deploy pom.xml="${filtered.pom.templates.dir}/lucene/pom.xml"/> <!-- Lucene parent POM -->
<subant target="-dist-maven" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="${common.dir}/core" includes="build.xml"/>
<fileset dir="${common.dir}/test-framework" includes="build.xml"/>
</subant>
<modules-crawl target="-dist-maven"/>
</sequential>
</target>
<target name="-install-to-maven-local-repo" depends="install-maven-tasks">
<sequential>
<m2-install pom.xml="${filtered.pom.templates.dir}/pom.xml"/> <!-- Lucene/Solr grandparent POM -->
<m2-install pom.xml="${filtered.pom.templates.dir}/lucene/pom.xml"/> <!-- Lucene parent POM -->
<subant target="-install-to-maven-local-repo" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="${common.dir}/core" includes="build.xml"/>
<fileset dir="${common.dir}/test-framework" includes="build.xml"/>
</subant>
<modules-crawl target="-install-to-maven-local-repo"/>
</sequential>
</target>
<target name="generate-maven-artifacts" depends="-unpack-lucene-tgz">
<ant dir=".." target="resolve" inheritall="false"/>
<antcall target="-filter-pom-templates" inheritall="false"/>
<antcall target="-dist-maven" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</antcall>
</target>
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
<sequential>
<subant target="-validate-maven-dependencies" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="${common.dir}/core" includes="build.xml"/>
<fileset dir="${common.dir}/test-framework" includes="build.xml"/>
</subant>
<modules-crawl target="-validate-maven-dependencies"/>
</sequential>
</target>
<!-- ================================================================== -->
<!-- support for signing the artifacts using gpg -->
<!-- ================================================================== -->
<target name="sign-artifacts">
<sign-artifacts-macro artifacts.dir="${dist.dir}"/>
</target>
<target name="build-modules" depends="compile-test"
description="Builds all additional modules and their tests">
<modules-crawl target="build-artifacts-and-tests"/>
</target>
<target name="compile-test" description="Builds core, codecs, test-framework, and modules tests">
<sequential>
<ant dir="core" target="compile-test" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="test-framework" target="compile-test" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<modules-crawl target="compile-test"/>
</sequential>
</target>
<target name="test-test-framework">
<ant dir="test-framework" target="test" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="test-modules">
<modules-crawl target="test"/>
</target>
<target name="changes-to-html">
<build-changes changes.product="lucene"/>
</target>
<target name="pitest-modules" depends="compile-test">
<modules-crawl target="pitest" failonerror="false"/>
</target>
<target name="jacoco" description="Generates JaCoCo code coverage reports" depends="-jacoco-install">
<!-- run jacoco for each module -->
<ant dir="${common.dir}/core" target="jacoco" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="${common.dir}/test-framework" target="jacoco" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<modules-crawl target="jacoco"/>
<!-- produce aggregate report -->
<property name="jacoco.output.dir" location="${jacoco.report.dir}/lucene-all"/>
<!-- try to clean output dir to prevent any confusion -->
<delete dir="${jacoco.output.dir}" failonerror="false"/>
<mkdir dir="${jacoco.output.dir}"/>
<jacoco:report>
<executiondata>
<fileset dir="${common.dir}/build" includes="**/jacoco.db"/>
</executiondata>
<structure name="${Name} aggregate JaCoCo coverage report">
<classfiles>
<fileset dir="${common.dir}/build">
<include name="**/classes/java/**/*.class"/>
<exclude name="tools/**"/>
</fileset>
</classfiles>
<!-- TODO: trying to specify source files could maybe work, but would
double the size of the reports -->
</structure>
<html destdir="${jacoco.output.dir}" footer="Copyright ${year} Apache Software Foundation. All Rights Reserved."/>
</jacoco:report>
</target>
<!--
Committer helpers
-->
<property name="patch.file" value="${basedir}/../patches/${patch.name}"/>
<!-- Apply a patch. Assumes patch can be applied in the basedir.
-Dpatch.name assumes the patch is located in ${basedir}/../patches/${patch.name}
-Dpatch.file means the patch can be located anywhere on the file system
-->
<target name="apply-patch" depends="clean" description="Apply a patch file. Set -Dpatch.file, or -Dpatch.name when the patch is in the directory ../patches/">
<patch patchfile="${patch.file}" strip="0"/>
</target>
<target name="jar-test-framework">
<ant dir="${common.dir}/test-framework" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Override common-build.xml definition to check for the jar already being up-to-date -->
<target name="jar-core" depends="check-lucene-core-uptodate,compile-lucene-core" unless="lucene-core.uptodate">
<ant dir="${common.dir}/core" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="core.compiled" value="true"/>
<property name="lucene-core.uptodate" value="true"/>
</target>
<target name="jar" depends="jar-core,jar-test-framework"
description="Jars core, codecs, test-framework, and all modules">
<modules-crawl target="jar-core"/>
</target>
<target name="jar-src" description="create source jars for all modules">
<ant dir="${common.dir}/core" target="jar-src" inheritAll="false" />
<ant dir="${common.dir}/test-framework" target="jar-src" inheritAll="false" />
<modules-crawl target="jar-src"/>
</target>
<target name="get-jenkins-line-docs" unless="enwiki.exists">
<sequential>
<!-- TODO: can get .lzma instead (it's ~17% smaller) but there's no builtin ant support...? -->
<get src="http://home.apache.org/~mikemccand/enwiki.random.lines.txt.bz2"
dest="enwiki.random.lines.txt.bz2"/>
<bunzip2 src="enwiki.random.lines.txt.bz2" dest="enwiki.random.lines.txt"/>
</sequential>
</target>
<target name="jar-checksums" depends="resolve">
<jar-checksum-macro srcdir="${common.dir}" dstdir="${common.dir}/licenses"/>
</target>
<target name="regenerate">
<subant target="regenerate" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
</subant>
<modules-crawl target="regenerate"/>
</target>
<target name="-append-module-dependencies-properties">
<sequential>
<ant dir="core" target="common.-append-module-dependencies-properties" inheritall="false"/>
<ant dir="test-framework" target="common.-append-module-dependencies-properties" inheritall="false"/>
<modules-crawl target="-append-module-dependencies-properties"/>
</sequential>
</target>
</project>

View File

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="classification" default="default">
<description>
Classification module for Lucene
</description>
<import file="../module-build.xml"/>
<path id="classpath">
<path refid="base.classpath"/>
<pathelement path="${queries.jar}"/>
<pathelement path="${grouping.jar}"/>
<pathelement path="${analyzers-common.jar}"/>
</path>
<path id="test.classpath">
<pathelement path="${analyzers-common.jar}"/>
<pathelement location="${codecs.jar}"/>
<path refid="test.base.classpath"/>
</path>
<target name="compile-core" depends="jar-grouping,jar-queries,jar-analyzers-common,common.compile-core" />
<target name="jar-core" depends="common.jar-core" />
<target name="javadocs" depends="javadocs-grouping,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../queries"/>
<link href="../analyzers-common"/>
<link href="../grouping"/>
</links>
</invoke-module-javadoc>
</target>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="classification"/>
</ivy-module>

28
lucene/codecs/build.xml Normal file
View File

@ -0,0 +1,28 @@
<!--
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.
-->
<project name="codecs" default="default">
<description>
Lucene codecs and postings formats.
</description>
<import file="../module-build.xml"/>
<target name="-dist-maven" depends="-dist-maven-src-java"/>
<target name="-install-to-maven-local-repo" depends="-install-src-java-to-maven-local-repo"/>
</project>

21
lucene/codecs/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="codecs"/>
</ivy-module>

2605
lucene/common-build.xml Normal file

File diff suppressed because it is too large Load Diff

235
lucene/core/build.xml Normal file
View File

@ -0,0 +1,235 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="core" default="default">
<description>Lucene core library</description>
<property name="build.dir" location="../build/core"/>
<!-- lucene core can use the minimal JDK profile -->
<property name="javac.profile.args" value="-profile compact1"/>
<import file="../common-build.xml"/>
<property name="moman.commit-hash" value="497c90e34e412b6494db6dabf0d95db8034bd325" />
<property name="moman.url" value="https://github.com/jpbarrette/moman/archive/${moman.commit-hash}.zip" />
<path id="classpath"/>
<path id="test.classpath">
<pathelement location="${common.dir}/build/codecs/classes/java"/>
<pathelement location="${common.dir}/build/test-framework/classes/java"/>
<path refid="junit-path"/>
<pathelement location="${build.dir}/classes/java"/>
<pathelement location="${build.dir}/classes/test"/>
</path>
<path id="junit.classpath">
<path refid="test.classpath"/>
</path>
<target name="test-core" depends="common.test"/>
<target name="javadocs-core" depends="javadocs"/>
<target name="javadocs" description="Generate javadoc for core classes"
depends="check-javadocs-uptodate" unless="javadocs-uptodate-${name}">
<sequential>
<mkdir dir="${javadoc.dir}/core"/>
<invoke-javadoc destdir="${javadoc.dir}/core" title="${Name} ${version} core API">
<sources>
<packageset dir="${src.dir}"/>
<link href=""/>
</sources>
</invoke-javadoc>
<mkdir dir="${build.dir}"/>
<jarify basedir="${javadoc.dir}/core" destfile="${build.dir}/${final.name}-javadoc.jar"/>
</sequential>
</target>
<target name="-dist-maven" depends="-dist-maven-src-java"/>
<target name="-install-to-maven-local-repo" depends="-install-src-java-to-maven-local-repo"/>
<macrodef name="createLevAutomaton">
<attribute name="n"/>
<sequential>
<exec dir="src/java/org/apache/lucene/util/automaton"
executable="${python3.exe}" failonerror="true">
<!-- Tell Python not to write any bytecode cache into the filesystem: -->
<arg value="-B"/>
<arg value="createLevAutomata.py"/>
<arg value="@{n}"/>
<arg value="True"/>
<!-- Hack while transitioning to Gradle build in 9.0 -->
<arg value="../../../../../../../../build/core/moman/finenight/python"/>
</exec>
<exec dir="src/java/org/apache/lucene/util/automaton"
executable="${python3.exe}" failonerror="true">
<!-- Tell Python not to write any bytecode cache into the filesystem: -->
<arg value="-B"/>
<arg value="createLevAutomata.py"/>
<arg value="@{n}"/>
<arg value="False"/>
<!-- Hack while transitioning to Gradle build in 9.0 -->
<arg value="../../../../../../../../build/core/moman/finenight/python"/>
</exec>
<fixcrlf srcdir="src/java/org/apache/lucene/util/automaton" includes="*ParametricDescription.java" encoding="UTF-8"/>
</sequential>
</macrodef>
<target name="createPackedIntSources">
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python3.exe}" failonerror="true">
<!-- Tell Python not to write any bytecode cache into the filesystem: -->
<arg value="-B"/>
<arg value="gen_BulkOperation.py"/>
</exec>
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python3.exe}" failonerror="true">
<!-- Tell Python not to write any bytecode cache into the filesystem: -->
<arg value="-B"/>
<arg value="gen_Packed64SingleBlock.py"/>
</exec>
<fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java,Packed64SingleBlock.java" encoding="UTF-8"/>
</target>
<target name="createLevAutomata" depends="check-moman,download-moman">
<createLevAutomaton n="1"/>
<createLevAutomaton n="2"/>
</target>
<target name="check-moman">
<available file="${build.dir}/moman" property="moman.downloaded"/>
</target>
<target name="download-moman" unless="moman.downloaded">
<mkdir dir="${build.dir}/moman"/>
<get src="${moman.url}" dest="${build.dir}/moman.zip"/>
<unzip dest="${build.dir}/moman" src="${build.dir}/moman.zip">
<cutdirsmapper dirs="1"/>
</unzip>
<delete file="${build.dir}/moman.zip"/>
</target>
<target name="regenerate" depends="createLevAutomata,createPackedIntSources,jflex"/>
<macrodef name="startLockStressTestClient">
<attribute name="clientId"/>
<attribute name="lockFactoryImpl"/>
<attribute name="lockFactoryDir"/>
<sequential>
<local name="lockverifyserver.port"/>
<groovy><![CDATA[
String port;
while ((port = System.getProperty("lockverifyserver.port")) == null) {
Thread.sleep(10L);
}
properties["lockverifyserver.port"] = port;
]]></groovy>
<java taskname="lockStressTest@{clientId}" fork="true" classpathref="test-lock.classpath" classname="org.apache.lucene.store.LockStressTest" failOnError="true">
<arg value="@{clientId}"/>
<arg value="${lockverifyserver.host}"/>
<arg value="${lockverifyserver.port}"/>
<arg value="@{lockFactoryImpl}"/>
<arg value="@{lockFactoryDir}"/>
<arg value="${lockverify.delay}"/>
<arg value="${lockverify.count}"/>
</java>
</sequential>
</macrodef>
<macrodef name="testLockFactory">
<attribute name="lockFactoryImpl"/>
<attribute name="lockFactoryDir"/>
<sequential>
<echo taskname="testLockFactory" message="Testing @{lockFactoryImpl}..."/>
<mkdir dir="@{lockFactoryDir}"/>
<parallel threadCount="3" failonany="false">
<sequential>
<!-- the server runs in-process, so we can wait for the sysproperty -->
<java taskname="lockVerifyServer" fork="false" classpathref="test-lock.classpath" classname="org.apache.lucene.store.LockVerifyServer" failOnError="true">
<arg value="${lockverifyserver.host}"/>
<arg value="2"/>
</java>
</sequential>
<sequential>
<startLockStressTestClient clientId="1" lockFactoryImpl="@{lockFactoryImpl}" lockFactoryDir="@{lockFactoryDir}" />
</sequential>
<sequential>
<startLockStressTestClient clientId="2" lockFactoryImpl="@{lockFactoryImpl}" lockFactoryDir="@{lockFactoryDir}" />
</sequential>
</parallel>
</sequential>
</macrodef>
<condition property="-ignore-test-lock-factory">
<or>
<!-- We ignore our ant-based lock factory test, if user applies test filtering: -->
<isset property="tests.class" />
<isset property="tests.method" />
<!-- Clover seems to deadlock if running instrumented code inside the Ant JVM: -->
<isset property="run.clover" />
</or>
</condition>
<target name="test-lock-factory" depends="resolve-groovy,compile-core" unless="-ignore-test-lock-factory"
description="Run LockStressTest with multiple JVMs">
<property name="lockverifyserver.host" value="127.0.0.1"/>
<property name="lockverify.delay" value="1"/>
<groovy taskname="lockVerifySetup"><![CDATA[
System.clearProperty("lockverifyserver.port"); // make sure it is undefined
if (!properties["lockverify.count"]) {
int count = Boolean.parseBoolean(properties["tests.nightly"]) ?
30000 : 500;
count *= Integer.parseInt(properties["tests.multiplier"]);
properties["lockverify.count"] = count;
}
task.log("Configuration properties:");
["lockverify.delay", "lockverify.count"].each {
k -> task.log(" " + k + "=" + properties[k]);
}
]]></groovy>
<path id="test-lock.classpath">
<path refid="classpath"/>
<pathelement location="${build.dir}/classes/java"/>
</path>
<testLockFactory lockFactoryImpl="org.apache.lucene.store.NativeFSLockFactory" lockFactoryDir="${build.dir}/lockfactorytest/native" />
<testLockFactory lockFactoryImpl="org.apache.lucene.store.SimpleFSLockFactory" lockFactoryDir="${build.dir}/lockfactorytest/simple" />
</target>
<target name="test" depends="common.test, test-lock-factory"/>
<target name="clean-jflex">
<delete>
<fileset dir="src/java/org/apache/lucene/analysis/standard" includes="**/*.java">
<containsregexp expression="generated.*by.*JFlex"/>
</fileset>
</delete>
</target>
<target name="jflex" depends="-install-jflex,clean-jflex,-jflex-StandardAnalyzer"/>
<target name="-jflex-StandardAnalyzer" depends="init,-install-jflex">
<run-jflex-and-disable-buffer-expansion
dir="src/java/org/apache/lucene/analysis/standard" name="StandardTokenizerImpl"/>
</target>
</project>

21
lucene/core/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="core"/>
</ivy-module>

View File

@ -0,0 +1,56 @@
<!--
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.
-->
<ivysettings>
<!-- This file is included by default by top-level-ivy-settings.xml,
which loads ivy-versions.properties as Ivy variables. -->
<settings defaultResolver="default"/>
<property name="local-maven2-dir" value="${user.home}/.m2/repository/" />
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
<caches lockStrategy="${ivy.lock-strategy}" resolutionCacheDir="${ivy.resolution-cache.dir}" />
<resolvers>
<ibiblio name="sonatype-releases" root="https://oss.sonatype.org/content/repositories/releases" m2compatible="true" />
<ibiblio name="maven.restlet.com" root="https://maven.restlet.com" m2compatible="true" />
<ibiblio name="releases.cloudera.com" root="https://repository.cloudera.com/artifactory/libs-release-local" m2compatible="true" />
<filesystem name="local-maven-2" m2compatible="true" local="true">
<artifact
pattern="${local-maven2-dir}/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" />
<ivy
pattern="${local-maven2-dir}/[organisation]/[module]/[revision]/[module]-[revision].pom" />
</filesystem>
<chain name="default" returnFirst="true" checkmodified="true" changingPattern=".*SNAPSHOT">
<resolver ref="local"/>
<!-- <resolver ref="local-maven-2" /> -->
<resolver ref="main"/>
<resolver ref="maven.restlet.com" />
<resolver ref="sonatype-releases" />
<resolver ref="releases.cloudera.com"/>
</chain>
</resolvers>
</ivysettings>

61
lucene/demo/build.xml Normal file
View File

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="demo" default="default" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<description>
Simple example code
</description>
<property name="demo.name" value="lucene-demos-${version}"/>
<import file="../module-build.xml"/>
<target name="init" depends="module-build.init,jar-lucene-core"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${queryparser.jar}"/>
<pathelement path="${lucene-core.jar}"/>
<pathelement path="${queries.jar}"/>
<pathelement path="${facet.jar}"/>
<pathelement path="${expressions.jar}"/>
<fileset dir="../expressions/lib"/>
</path>
<target name="javadocs" depends="javadocs-analyzers-common,javadocs-queryparser,javadocs-facet,javadocs-expressions,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<!-- we link the example source in the javadocs, as it's ref'ed elsewhere -->
<invoke-module-javadoc linksource="yes">
<links>
<link href="../analyzers-common"/>
<link href="../queryparser"/>
<link href="../queries"/>
<link href="../facet"/>
<link href="../expressions"/>
</links>
</invoke-module-javadoc>
</target>
<!-- we don't check for sysout in demo, because the demo is there to use sysout :-) -->
<target name="-check-forbidden-sysout"/>
<target name="compile-core" depends="jar-analyzers-common,jar-queryparser,jar-queries,jar-facet,jar-expressions,common.compile-core" />
</project>

21
lucene/demo/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="demo"/>
</ivy-module>

View File

@ -0,0 +1,120 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="expressions" default="default">
<description>
Dynamically computed values to sort/facet/search on based on a pluggable grammar.
</description>
<import file="../module-build.xml"/>
<path id="classpath">
<path refid="base.classpath"/>
<fileset dir="lib"/>
</path>
<path id="test.classpath">
<path refid="test.base.classpath"/>
<fileset dir="lib"/>
<pathelement path="src/test-files"/>
</path>
<target name="regenerate" depends="run-antlr"/>
<target name="resolve-antlr" xmlns:ivy="antlib:org.apache.ivy.ant">
<ivy:cachepath organisation="org.antlr" module="antlr4" revision="4.5.1-1"
inline="true" conf="default" type="jar" pathid="antlr.classpath"/>
</target>
<target name="run-antlr" depends="resolve-antlr">
<regen-grammar package="js" grammar="Javascript"/>
</target>
<macrodef name="replace-value">
<attribute name="value" />
<attribute name="property" />
<attribute name="from" />
<attribute name="to" />
<sequential>
<loadresource property="@{property}">
<string value="@{value}"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replacestring from="@{from}" to="@{to}"/>
</tokenfilter>
</filterchain>
</loadresource>
</sequential>
</macrodef>
<macrodef name="regen-grammar">
<attribute name="package" />
<attribute name="grammar" />
<sequential>
<local name="grammar.path"/>
<patternset id="grammar.@{grammar}.patternset">
<include name="@{grammar}Lexer.java" />
<include name="@{grammar}Parser.java" />
<include name="@{grammar}Visitor.java" />
<include name="@{grammar}BaseVisitor.java" />
</patternset>
<property name="grammar.path" location="src/java/org/apache/lucene/expressions/@{package}"/>
<!-- delete parser and lexer so files will be generated -->
<delete dir="${grammar.path}">
<patternset refid="grammar.@{grammar}.patternset"/>
</delete>
<!-- invoke ANTLR4 -->
<java classname="org.antlr.v4.Tool" fork="true" failonerror="true" classpathref="antlr.classpath" taskname="antlr">
<sysproperty key="file.encoding" value="UTF-8"/>
<sysproperty key="user.language" value="en"/>
<sysproperty key="user.country" value="US"/>
<sysproperty key="user.variant" value=""/>
<arg value="-package"/>
<arg value="org.apache.lucene.expressions.@{package}"/>
<arg value="-no-listener"/>
<arg value="-visitor"/>
<arg value="-o"/>
<arg path="${grammar.path}"/>
<arg path="${grammar.path}/@{grammar}.g4"/>
</java>
<!-- fileset with files to edit -->
<fileset id="grammar.fileset" dir="${grammar.path}">
<patternset refid="grammar.@{grammar}.patternset"/>
</fileset>
<!-- remove files that are not needed to compile or at runtime -->
<delete dir="${grammar.path}" includes="@{grammar}*.tokens"/>
<!-- make the generated classes package private -->
<replaceregexp match="public ((interface|class) \Q@{grammar}\E\w+)" replace="\1" encoding="UTF-8">
<fileset refid="grammar.fileset"/>
</replaceregexp>
<!-- nuke timestamps/filenames in generated files -->
<replaceregexp match="\Q// Generated from \E.*" replace="\/\/ ANTLR GENERATED CODE: DO NOT EDIT" encoding="UTF-8">
<fileset refid="grammar.fileset"/>
</replaceregexp>
<!-- remove tabs in antlr generated files -->
<replaceregexp match="\t" flags="g" replace=" " encoding="UTF-8">
<fileset refid="grammar.fileset"/>
</replaceregexp>
<!-- fix line endings -->
<fixcrlf srcdir="${grammar.path}">
<patternset refid="grammar.@{grammar}.patternset"/>
</fixcrlf>
</sequential>
</macrodef>
</project>

View File

@ -0,0 +1,30 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="expressions"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.antlr" name="antlr4-runtime" rev="${/org.antlr/antlr4-runtime}" conf="compile"/>
<dependency org="org.ow2.asm" name="asm" rev="${/org.ow2.asm/asm}" conf="compile"/>
<dependency org="org.ow2.asm" name="asm-commons" rev="${/org.ow2.asm/asm-commons}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

47
lucene/facet/build.xml Normal file
View File

@ -0,0 +1,47 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="facet" default="default">
<description>
Faceted indexing and search capabilities
</description>
<import file="../module-build.xml"/>
<path id="classpath">
<path refid="base.classpath"/>
<fileset dir="lib"/>
</path>
<path id="test.classpath">
<pathelement path="${queries.jar}"/>
<path refid="test.base.classpath"/>
</path>
<target name="compile-core" depends="jar-queries,common.compile-core"/>
<target name="run-encoding-benchmark" depends="compile-test">
<java classname="org.apache.lucene.util.encoding.EncodingSpeed" fork="true" failonerror="true">
<classpath refid="test.classpath" />
<classpath path="${build.dir}/classes/test" />
</java>
</target>
</project>

27
lucene/facet/ivy.xml Normal file
View File

@ -0,0 +1,27 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="facet"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="com.carrotsearch" name="hppc" rev="${/com.carrotsearch/hppc}" conf="compile"/>
</dependencies>
</ivy-module>

49
lucene/grouping/build.xml Normal file
View File

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="grouping" default="default">
<description>
Collectors for grouping search results.
</description>
<import file="../module-build.xml"/>
<path id="test.classpath">
<path refid="test.base.classpath" />
<pathelement path="${queries.jar}" />
</path>
<path id="classpath">
<pathelement path="${queries.jar}" />
<path refid="base.classpath"/>
</path>
<target name="init" depends="module-build.init,jar-queries"/>
<target name="javadocs" depends="javadocs-queries,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../queries"/>
</links>
</invoke-module-javadoc>
</target>
</project>

21
lucene/grouping/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="grouping"/>
</ivy-module>

View File

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="highlighter" default="default">
<description>
Highlights search keywords in results
</description>
<!-- some files for testing that do not have license headers -->
<property name="rat.excludes" value="**/*.utf8"/>
<import file="../module-build.xml"/>
<path id="classpath">
<pathelement path="${memory.jar}"/>
<pathelement path="${queries.jar}"/>
<path refid="base.classpath"/>
</path>
<path id="test.classpath">
<pathelement path="${memory.jar}"/>
<pathelement path="${queries.jar}"/>
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${queryparser.jar}"/>
<path refid="test.base.classpath"/>
</path>
<target name="compile-core" depends="jar-memory,jar-queries,jar-join,jar-analyzers-common,common.compile-core" />
<target name="javadocs" depends="javadocs-memory,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../memory"/>
</links>
</invoke-module-javadoc>
</target>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="highlighter"/>
</ivy-module>

View File

@ -0,0 +1,14 @@
# The /org/name keys in this file must be kept lexically sorted.
# Blank lines, comment lines, and keys that aren't in /org/name format are ignored
# when the lexical sort check is performed by the ant check-lib-versions target.
#
# The format is:
#
# /org/name = <version1> [, <version2> [ ... ] ]
#
# where each <versionX> is an indirect dependency version to ignore (i.e., not
# trigger a conflict) when the ant check-lib-versions target is run.
/com.google.guava/guava = 16.0.1
/org.ow2.asm/asm = 5.0_BETA

View File

@ -0,0 +1,334 @@
# The /org/name keys in this file must be kept lexically sorted.
# Blank lines, comment lines, and keys that aren't in /org/name format are ignored
# when the lexical sort check is performed by the ant check-lib-versions target.
/com.adobe.xmp/xmpcore = 5.1.3
com.carrotsearch.randomizedtesting.version = 2.7.6
/com.carrotsearch.randomizedtesting/junit4-ant = ${com.carrotsearch.randomizedtesting.version}
/com.carrotsearch.randomizedtesting/randomizedtesting-runner = ${com.carrotsearch.randomizedtesting.version}
/com.carrotsearch.thirdparty/simple-xml-safe = 2.7.1
/com.carrotsearch/hppc = 0.8.2
/com.cybozu.labs/langdetect = 1.1-20120112
/com.drewnoakes/metadata-extractor = 2.11.0
/com.epam/parso = 2.0.11
com.fasterxml.jackson.core.version = 2.10.1
/com.fasterxml.jackson.core/jackson-annotations = ${com.fasterxml.jackson.core.version}
/com.fasterxml.jackson.core/jackson-core = ${com.fasterxml.jackson.core.version}
/com.fasterxml.jackson.core/jackson-databind = ${com.fasterxml.jackson.core.version}
/com.fasterxml.jackson.dataformat/jackson-dataformat-smile = ${com.fasterxml.jackson.core.version}
/com.github.ben-manes.caffeine/caffeine = 2.8.4
/com.github.virtuald/curvesapi = 1.06
/com.github.zafarkhaja/java-semver = 0.9.0
/com.google.guava/guava = 25.1-jre
/com.google.protobuf/protobuf-java = 3.11.0
/com.google.re2j/re2j = 1.2
/com.googlecode.juniversalchardet/juniversalchardet = 1.0.3
/com.googlecode.mp4parser/isoparser = 1.1.22
/com.healthmarketscience.jackcess/jackcess = 3.0.1
/com.healthmarketscience.jackcess/jackcess-encrypt = 3.0.0
/com.ibm.icu/icu4j = 62.2
/com.jayway.jsonpath/json-path = 2.4.0
/com.lmax/disruptor = 3.4.2
/com.pff/java-libpst = 0.8.1
com.rometools.version = 1.12.2
/com.rometools/rome = ${com.rometools.version}
/com.rometools/rome-utils = ${com.rometools.version}
com.sun.jersey.version = 1.19
/com.sun.jersey/jersey-servlet = ${com.sun.jersey.version}
/com.sun.mail/gimap = 1.5.1
/com.sun.mail/javax.mail = 1.5.1
/com.tdunning/t-digest = 3.1
/com.vaadin.external.google/android-json = 0.0.20131108.vaadin1
/commons-cli/commons-cli = 1.4
/commons-codec/commons-codec = 1.13
/commons-collections/commons-collections = 3.2.2
/commons-io/commons-io = 2.6
# necessary to run test or embedded Zookeeper as of 3.6.1
commons.lang.version = 2.6
/commons-lang/commons-lang = ${commons.lang.version}
/commons-logging/commons-logging = 1.1.3
/de.l3s.boilerpipe/boilerpipe = 1.1.0
io.dropwizard.metrics.version = 4.1.5
/io.dropwizard.metrics/metrics-core = ${io.dropwizard.metrics.version}
/io.dropwizard.metrics/metrics-graphite = ${io.dropwizard.metrics.version}
/io.dropwizard.metrics/metrics-jetty9 = ${io.dropwizard.metrics.version}
/io.dropwizard.metrics/metrics-jmx = ${io.dropwizard.metrics.version}
/io.dropwizard.metrics/metrics-jvm = ${io.dropwizard.metrics.version}
io.jaegertracing.version = 1.1.0
/io.jaegertracing/jaeger-core = ${io.jaegertracing.version}
/io.jaegertracing/jaeger-thrift = ${io.jaegertracing.version}
io.netty.netty.version = 4.1.50.Final
/io.netty/netty-buffer = ${io.netty.netty.version}
/io.netty/netty-codec = ${io.netty.netty.version}
/io.netty/netty-common = ${io.netty.netty.version}
/io.netty/netty-handler = ${io.netty.netty.version}
/io.netty/netty-resolver = ${io.netty.netty.version}
/io.netty/netty-transport = ${io.netty.netty.version}
/io.netty/netty-transport-native-epoll = ${io.netty.netty.version}
/io.netty/netty-transport-native-unix-common = ${io.netty.netty.version}
io.opentracing.version = 0.33.0
/io.opentracing/opentracing-api = ${io.opentracing.version}
/io.opentracing/opentracing-mock = ${io.opentracing.version}
/io.opentracing/opentracing-noop = ${io.opentracing.version}
/io.opentracing/opentracing-util = ${io.opentracing.version}
io.prometheus.version = 0.2.0
/io.prometheus/simpleclient = ${io.prometheus.version}
/io.prometheus/simpleclient_common = ${io.prometheus.version}
/io.prometheus/simpleclient_httpserver = ${io.prometheus.version}
/io.sgr/s2-geometry-library-java = 1.0.0
/javax.activation/activation = 1.1.1
/javax.servlet/javax.servlet-api = 3.1.0
/junit/junit = 4.12
/mecab/mecab-ipadic = 2.7.0-20070801
/mecab/mecab-ko-dic = 2.0.3-20170922
/mecab/mecab-naist-jdic = 0.6.3b-20111013
/net.arnx/jsonic = 1.2.7
/net.bytebuddy/byte-buddy = 1.9.3
/net.hydromatic/eigenbase-properties = 1.1.5
net.sourceforge.argparse4j.version = 0.8.1
/net.sourceforge.argparse4j/argparse4j = ${net.sourceforge.argparse4j.version}
/net.sourceforge.nekohtml/nekohtml = 1.9.17
net.thisptr.version = 0.0.8
/net.thisptr/jackson-jq = ${net.thisptr.version}
/org.antlr/antlr4-runtime = 4.5.1-1
/org.apache.ant/ant = 1.8.2
org.apache.calcite.avatica.version = 1.13.0
/org.apache.calcite.avatica/avatica-core = ${org.apache.calcite.avatica.version}
org.apache.calcite.version = 1.18.0
/org.apache.calcite/calcite-core = ${org.apache.calcite.version}
/org.apache.calcite/calcite-linq4j = ${org.apache.calcite.version}
org.apache.commons.commons-collections4-rev = 4.4
/org.apache.commons/commons-collections4 = ${org.apache.commons.commons-collections4-rev}
/org.apache.commons/commons-compress = 1.19
/org.apache.commons/commons-configuration2 = 2.1.1
/org.apache.commons/commons-csv = 1.7
/org.apache.commons/commons-exec = 1.3
/org.apache.commons/commons-lang3 = 3.9
/org.apache.commons/commons-math3 = 3.6.1
/org.apache.commons/commons-text = 1.6
org.apache.curator.version = 2.13.0
/org.apache.curator/curator-client = ${org.apache.curator.version}
/org.apache.curator/curator-framework = ${org.apache.curator.version}
/org.apache.curator/curator-recipes = ${org.apache.curator.version}
/org.apache.derby/derby = 10.9.1.0
org.apache.hadoop.version = 3.2.0
/org.apache.hadoop/hadoop-annotations = ${org.apache.hadoop.version}
/org.apache.hadoop/hadoop-auth = ${org.apache.hadoop.version}
/org.apache.hadoop/hadoop-common = ${org.apache.hadoop.version}
/org.apache.hadoop/hadoop-hdfs = ${org.apache.hadoop.version}
/org.apache.hadoop/hadoop-hdfs-client = ${org.apache.hadoop.version}
/org.apache.hadoop/hadoop-minikdc = ${org.apache.hadoop.version}
/org.apache.htrace/htrace-core4 = 4.1.0-incubating
# The httpcore version is often different from the httpclient and httpmime versions,
# so the httpcore version value should not share the same symbolic name with them.
/org.apache.httpcomponents/httpclient = 4.5.10
/org.apache.httpcomponents/httpcore = 4.4.12
/org.apache.httpcomponents/httpmime = 4.5.10
/org.apache.ivy/ivy = 2.4.0
org.apache.james.apache.mime4j.version = 0.8.3
/org.apache.james/apache-mime4j-core = ${org.apache.james.apache.mime4j.version}
/org.apache.james/apache-mime4j-dom = ${org.apache.james.apache.mime4j.version}
org.apache.kerby.version = 1.0.1
/org.apache.kerby/kerb-admin = ${org.apache.kerby.version}
/org.apache.kerby/kerb-client = ${org.apache.kerby.version}
/org.apache.kerby/kerb-common = ${org.apache.kerby.version}
/org.apache.kerby/kerb-core = ${org.apache.kerby.version}
/org.apache.kerby/kerb-crypto = ${org.apache.kerby.version}
/org.apache.kerby/kerb-identity= ${org.apache.kerby.version}
/org.apache.kerby/kerb-server = ${org.apache.kerby.version}
/org.apache.kerby/kerb-simplekdc = ${org.apache.kerby.version}
/org.apache.kerby/kerb-util = ${org.apache.kerby.version}
/org.apache.kerby/kerby-asn1 = ${org.apache.kerby.version}
/org.apache.kerby/kerby-config = ${org.apache.kerby.version}
/org.apache.kerby/kerby-kdc = ${org.apache.kerby.version}
/org.apache.kerby/kerby-pkix = ${org.apache.kerby.version}
/org.apache.kerby/kerby-util = ${org.apache.kerby.version}
org.apache.logging.log4j.version = 2.13.2
/org.apache.logging.log4j/log4j-1.2-api = ${org.apache.logging.log4j.version}
/org.apache.logging.log4j/log4j-api = ${org.apache.logging.log4j.version}
/org.apache.logging.log4j/log4j-core = ${org.apache.logging.log4j.version}
/org.apache.logging.log4j/log4j-slf4j-impl = ${org.apache.logging.log4j.version}
/org.apache.logging.log4j/log4j-web = ${org.apache.logging.log4j.version}
/org.apache.opennlp/opennlp-tools = 1.9.1
org.apache.pdfbox.version = 2.0.17
/org.apache.pdfbox/fontbox = ${org.apache.pdfbox.version}
/org.apache.pdfbox/jempbox = 1.8.16
/org.apache.pdfbox/pdfbox = ${org.apache.pdfbox.version}
/org.apache.pdfbox/pdfbox-tools = ${org.apache.pdfbox.version}
org.apache.poi.version = 4.1.1
/org.apache.poi/poi = ${org.apache.poi.version}
/org.apache.poi/poi-ooxml = ${org.apache.poi.version}
/org.apache.poi/poi-ooxml-schemas = ${org.apache.poi.version}
/org.apache.poi/poi-scratchpad = ${org.apache.poi.version}
org.apache.thrift.version = 0.13.0
/org.apache.thrift/libthrift = ${org.apache.thrift.version}
org.apache.tika.version = 1.24
/org.apache.tika/tika-core = ${org.apache.tika.version}
/org.apache.tika/tika-java7 = ${org.apache.tika.version}
/org.apache.tika/tika-parsers = ${org.apache.tika.version}
/org.apache.tika/tika-xmp = ${org.apache.tika.version}
org.apache.velocity.tools.version = 3.0
/org.apache.velocity.tools/velocity-tools-generic = ${org.apache.velocity.tools.version}
/org.apache.velocity.tools/velocity-tools-view = ${org.apache.velocity.tools.version}
/org.apache.velocity.tools/velocity-tools-view-jsp = ${org.apache.velocity.tools.version}
/org.apache.velocity/velocity-engine-core = 2.0
/org.apache.xmlbeans/xmlbeans = 3.1.0
org.apache.zookeeper.version = 3.6.1
/org.apache.zookeeper/zookeeper = ${org.apache.zookeeper.version}
/org.apache.zookeeper/zookeeper-jute = ${org.apache.zookeeper.version}
# v1.6.2 of asciidoctor-ant includes asciidoctorj 1.6.2, which uses
# asciidoctor 1.5.8, and asciidoctorj-pdf 1.5.0-alpha.16, which is the same
# as asciidoctor-pdf 1.5.0-alpha.16
/org.asciidoctor/asciidoctor-ant = 1.6.2
/org.aspectj/aspectjrt = 1.8.0
/org.bitbucket.b_c/jose4j = 0.6.5
org.bouncycastle.version = 1.64
/org.bouncycastle/bcmail-jdk15on = ${org.bouncycastle.version}
/org.bouncycastle/bcpkix-jdk15on = ${org.bouncycastle.version}
/org.bouncycastle/bcprov-jdk15on = ${org.bouncycastle.version}
/org.brotli/dec = 0.1.2
/org.carrot2.attributes/attributes-binder = 1.3.3
/org.carrot2.shaded/carrot2-guava = 18.0
/org.carrot2/carrot2-mini = 3.16.2
org.carrot2.morfologik.version = 2.1.5
/org.carrot2/morfologik-fsa = ${org.carrot2.morfologik.version}
/org.carrot2/morfologik-polish = ${org.carrot2.morfologik.version}
/org.carrot2/morfologik-stemming = ${org.carrot2.morfologik.version}
/org.ccil.cowan.tagsoup/tagsoup = 1.2.1
org.codehaus.janino.version = 3.0.9
/org.codehaus.janino/commons-compiler = ${org.codehaus.janino.version}
/org.codehaus.janino/janino = ${org.codehaus.janino.version}
/org.codehaus.woodstox/stax2-api = 3.1.4
/org.codehaus.woodstox/woodstox-core-asl = 4.4.1
org.eclipse.jetty.version = 9.4.27.v20200227
/org.eclipse.jetty.http2/http2-client = ${org.eclipse.jetty.version}
/org.eclipse.jetty.http2/http2-common = ${org.eclipse.jetty.version}
/org.eclipse.jetty.http2/http2-hpack = ${org.eclipse.jetty.version}
/org.eclipse.jetty.http2/http2-http-client-transport = ${org.eclipse.jetty.version}
/org.eclipse.jetty.http2/http2-server = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-alpn-client = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-alpn-java-client = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-alpn-java-server = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-alpn-server = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-client = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-continuation = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-deploy = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-http = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-io = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-jmx = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-rewrite = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-security = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-server = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-servlet = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-servlets = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-start = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-util = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-webapp = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-xml = ${org.eclipse.jetty.version}
org.gagravarr.vorbis.java.version = 0.8
/org.gagravarr/vorbis-java-core = ${org.gagravarr.vorbis.java.version}
/org.gagravarr/vorbis-java-tika = ${org.gagravarr.vorbis.java.version}
/org.hamcrest/hamcrest = 2.2
/org.hsqldb/hsqldb = 2.4.0
/org.jdom/jdom2 = 2.0.6
/org.jsoup/jsoup = 1.12.1
/org.locationtech.jts/jts-core = 1.15.0
/org.locationtech.spatial4j/spatial4j = 0.7
/org.mockito/mockito-core = 2.23.4
/org.objenesis/objenesis = 2.6
org.ow2.asm.version = 7.2
/org.ow2.asm/asm = ${org.ow2.asm.version}
/org.ow2.asm/asm-commons = ${org.ow2.asm.version}
org.restlet.jee.version = 2.4.3
/org.restlet.jee/org.restlet = ${org.restlet.jee.version}
/org.restlet.jee/org.restlet.ext.servlet = ${org.restlet.jee.version}
/org.rrd4j/rrd4j = 3.5
org.slf4j.version = 1.7.24
/org.slf4j/jcl-over-slf4j = ${org.slf4j.version}
/org.slf4j/jul-to-slf4j = ${org.slf4j.version}
/org.slf4j/slf4j-api = ${org.slf4j.version}
/org.slf4j/slf4j-simple = ${org.slf4j.version}
/org.tallison/jmatio = 1.5
/org.tukaani/xz = 1.8
# required for instantiating a Zookeeper server in tests or embedded
org.xerial.snappy.version = 1.1.7.6
/org.xerial.snappy/snappy-java = ${org.xerial.snappy.version}
ua.net.nlp.morfologik-ukrainian-search.version = 4.9.1
/ua.net.nlp/morfologik-ukrainian-search = ${ua.net.nlp.morfologik-ukrainian-search.version}
/xerces/xercesImpl = 2.12.0

27
lucene/join/build.xml Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="join" default="default">
<description>
Index-time and Query-time joins for normalized content
</description>
<import file="../module-build.xml"/>
</project>

21
lucene/join/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="join"/>
</ivy-module>

View File

@ -0,0 +1 @@
fc33bf7cd8c5309dd7b81228e8626515ee42efd9

View File

@ -0,0 +1,272 @@
/*
* Apache License
* Version 2.0, January 2004
* http://www.apache.org/licenses/
*
* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
*
* 1. Definitions.
*
* "License" shall mean the terms and conditions for use, reproduction,
* and distribution as defined by Sections 1 through 9 of this document.
*
* "Licensor" shall mean the copyright owner or entity authorized by
* the copyright owner that is granting the License.
*
* "Legal Entity" shall mean the union of the acting entity and all
* other entities that control, are controlled by, or are under common
* control with that entity. For the purposes of this definition,
* "control" means (i) the power, direct or indirect, to cause the
* direction or management of such entity, whether by contract or
* otherwise, or (ii) ownership of fifty percent (50%) or more of the
* outstanding shares, or (iii) beneficial ownership of such entity.
*
* "You" (or "Your") shall mean an individual or Legal Entity
* exercising permissions granted by this License.
*
* "Source" form shall mean the preferred form for making modifications,
* including but not limited to software source code, documentation
* source, and configuration files.
*
* "Object" form shall mean any form resulting from mechanical
* transformation or translation of a Source form, including but
* not limited to compiled object code, generated documentation,
* and conversions to other media types.
*
* "Work" shall mean the work of authorship, whether in Source or
* Object form, made available under the License, as indicated by a
* copyright notice that is included in or attached to the work
* (an example is provided in the Appendix below).
*
* "Derivative Works" shall mean any work, whether in Source or Object
* form, that is based on (or derived from) the Work and for which the
* editorial revisions, annotations, elaborations, or other modifications
* represent, as a whole, an original work of authorship. For the purposes
* of this License, Derivative Works shall not include works that remain
* separable from, or merely link (or bind by name) to the interfaces of,
* the Work and Derivative Works thereof.
*
* "Contribution" shall mean any work of authorship, including
* the original version of the Work and any modifications or additions
* to that Work or Derivative Works thereof, that is intentionally
* submitted to Licensor for inclusion in the Work by the copyright owner
* or by an individual or Legal Entity authorized to submit on behalf of
* the copyright owner. For the purposes of this definition, "submitted"
* means any form of electronic, verbal, or written communication sent
* to the Licensor or its representatives, including but not limited to
* communication on electronic mailing lists, source code control systems,
* and issue tracking systems that are managed by, or on behalf of, the
* Licensor for the purpose of discussing and improving the Work, but
* excluding communication that is conspicuously marked or otherwise
* designated in writing by the copyright owner as "Not a Contribution."
*
* "Contributor" shall mean Licensor and any individual or Legal Entity
* on behalf of whom a Contribution has been received by Licensor and
* subsequently incorporated within the Work.
*
* 2. Grant of Copyright License. Subject to the terms and conditions of
* this License, each Contributor hereby grants to You a perpetual,
* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
* copyright license to reproduce, prepare Derivative Works of,
* publicly display, publicly perform, sublicense, and distribute the
* Work and such Derivative Works in Source or Object form.
*
* 3. Grant of Patent License. Subject to the terms and conditions of
* this License, each Contributor hereby grants to You a perpetual,
* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
* (except as stated in this section) patent license to make, have made,
* use, offer to sell, sell, import, and otherwise transfer the Work,
* where such license applies only to those patent claims licensable
* by such Contributor that are necessarily infringed by their
* Contribution(s) alone or by combination of their Contribution(s)
* with the Work to which such Contribution(s) was submitted. If You
* institute patent litigation against any entity (including a
* cross-claim or counterclaim in a lawsuit) alleging that the Work
* or a Contribution incorporated within the Work constitutes direct
* or contributory patent infringement, then any patent licenses
* granted to You under this License for that Work shall terminate
* as of the date such litigation is filed.
*
* 4. Redistribution. You may reproduce and distribute copies of the
* Work or Derivative Works thereof in any medium, with or without
* modifications, and in Source or Object form, provided that You
* meet the following conditions:
*
* (a) You must give any other recipients of the Work or
* Derivative Works a copy of this License; and
*
* (b) You must cause any modified files to carry prominent notices
* stating that You changed the files; and
*
* (c) You must retain, in the Source form of any Derivative Works
* that You distribute, all copyright, patent, trademark, and
* attribution notices from the Source form of the Work,
* excluding those notices that do not pertain to any part of
* the Derivative Works; and
*
* (d) If the Work includes a "NOTICE" text file as part of its
* distribution, then any Derivative Works that You distribute must
* include a readable copy of the attribution notices contained
* within such NOTICE file, excluding those notices that do not
* pertain to any part of the Derivative Works, in at least one
* of the following places: within a NOTICE text file distributed
* as part of the Derivative Works; within the Source form or
* documentation, if provided along with the Derivative Works; or,
* within a display generated by the Derivative Works, if and
* wherever such third-party notices normally appear. The contents
* of the NOTICE file are for informational purposes only and
* do not modify the License. You may add Your own attribution
* notices within Derivative Works that You distribute, alongside
* or as an addendum to the NOTICE text from the Work, provided
* that such additional attribution notices cannot be construed
* as modifying the License.
*
* You may add Your own copyright statement to Your modifications and
* may provide additional or different license terms and conditions
* for use, reproduction, or distribution of Your modifications, or
* for any such Derivative Works as a whole, provided Your use,
* reproduction, and distribution of the Work otherwise complies with
* the conditions stated in this License.
*
* 5. Submission of Contributions. Unless You explicitly state otherwise,
* any Contribution intentionally submitted for inclusion in the Work
* by You to the Licensor shall be under the terms and conditions of
* this License, without any additional terms or conditions.
* Notwithstanding the above, nothing herein shall supersede or modify
* the terms of any separate license agreement you may have executed
* with Licensor regarding such Contributions.
*
* 6. Trademarks. This License does not grant permission to use the trade
* names, trademarks, service marks, or product names of the Licensor,
* except as required for reasonable and customary use in describing the
* origin of the Work and reproducing the content of the NOTICE file.
*
* 7. Disclaimer of Warranty. Unless required by applicable law or
* agreed to in writing, Licensor provides the Work (and each
* Contributor provides its Contributions) on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied, including, without limitation, any warranties or conditions
* of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
* PARTICULAR PURPOSE. You are solely responsible for determining the
* appropriateness of using or redistributing the Work and assume any
* risks associated with Your exercise of permissions under this License.
*
* 8. Limitation of Liability. In no event and under no legal theory,
* whether in tort (including negligence), contract, or otherwise,
* unless required by applicable law (such as deliberate and grossly
* negligent acts) or agreed to in writing, shall any Contributor be
* liable to You for damages, including any direct, indirect, special,
* incidental, or consequential damages of any character arising as a
* result of this License or out of the use or inability to use the
* Work (including but not limited to damages for loss of goodwill,
* work stoppage, computer failure or malfunction, or any and all
* other commercial damages or losses), even if such Contributor
* has been advised of the possibility of such damages.
*
* 9. Accepting Warranty or Additional Liability. While redistributing
* the Work or Derivative Works thereof, You may choose to offer,
* and charge a fee for, acceptance of support, warranty, indemnity,
* or other liability obligations and/or rights consistent with this
* License. However, in accepting such obligations, You may act only
* on Your own behalf and on Your sole responsibility, not on behalf
* of any other Contributor, and only if You agree to indemnify,
* defend, and hold each Contributor harmless for any liability
* incurred by, or claims asserted against, such Contributor by reason
* of your accepting any such warranty or additional liability.
*
* END OF TERMS AND CONDITIONS
*
* APPENDIX: How to apply the Apache License to your work.
*
* To apply the Apache License to your work, attach the following
* boilerplate notice, with the fields enclosed by brackets "[]"
* replaced with your own identifying information. (Don't include
* the brackets!) The text should be enclosed in the appropriate
* comment syntax for the file format. We also recommend that a
* file or class name and description of purpose be included on the
* same "printed page" as the copyright notice for easier
* identification within third-party archives.
*
* Copyright [yyyy] [name of copyright owner]
*
* Licensed 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.
*/
W3C® SOFTWARE NOTICE AND LICENSE
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
This work (and included software, documentation such as READMEs, or other
related items) is being provided by the copyright holders under the following
license. By obtaining, using and/or copying this work, you (the licensee) agree
that you have read, understood, and will comply with the following terms and
conditions.
Permission to copy, modify, and distribute this software and its documentation,
with or without modification, for any purpose and without fee or royalty is
hereby granted, provided that you include the following on ALL copies of the
software and documentation or portions thereof, including modifications:
1. The full text of this NOTICE in a location viewable to users of the
redistributed or derivative work.
2. Any pre-existing intellectual property disclaimers, notices, or terms
and conditions. If none exist, the W3C Software Short Notice should be
included (hypertext is preferred, text is permitted) within the body
of any redistributed or derivative code.
3. Notice of any changes or modifications to the files, including the date
changes were made. (We recommend you provide URIs to the location from
which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in advertising or
publicity pertaining to the software without specific, written prior permission.
Title to copyright in this software and any associated documentation will at
all times remain with copyright holders.
____________________________________
This formulation of W3C's notice and license became active on December 31 2002.
This version removes the copyright ownership notice such that this license can
be used with materials other than those owned by the W3C, reflects that ERCIM
is now a host of the W3C, includes references to this specific dated version of
the license, and removes the ambiguous grant of "use". Otherwise, this version
is the same as the previous version and is written so as to preserve the Free
Software Foundation's assessment of GPL compatibility and OSI's certification
under the Open Source Definition. Please see our Copyright FAQ for common
questions about using materials from our site, including specific terms and
conditions for packages like libwww, Amaya, and Jigsaw. Other questions about
this notice can be directed to site-policy@w3.org.
Joseph Reagle <site-policy@w3.org>
This license came from: http://www.megginson.com/SAX/copying.html
However please note future versions of SAX may be covered
under http://saxproject.org/?selected=pd
SAX2 is Free!
I hereby abandon any property rights to SAX 2.0 (the Simple API for
XML), and release all of the SAX 2.0 source code, compiled code, and
documentation contained in this distribution into the Public Domain.
SAX comes with NO WARRANTY or guarantee of fitness for any
purpose.
David Megginson, david@megginson.com
2000-05-05

View File

@ -0,0 +1,26 @@
=========================================================================
== NOTICE file corresponding to the section 4 d of ==
== the Apache License, Version 2.0, ==
== in this case for the Apache Ant distribution. ==
=========================================================================
Apache Ant
Copyright 1999-2008 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
This product includes also software developed by :
- the W3C consortium (http://www.w3c.org) ,
- the SAX project (http://www.saxproject.org)
The <sync> task is based on code Copyright (c) 2002, Landmark
Graphics Corp that has been kindly donated to the Apache Software
Foundation.
Portions of this software were originally based on the following:
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
- voluntary contributions made by Paul Eng on behalf of the
Apache Software Foundation that were originally developed at iClick, Inc.,
software copyright (c) 1999.

View File

@ -0,0 +1 @@
5abe4c24bbe992a9ac07ca563d5bd3e8d569e9ed

View File

@ -0,0 +1,258 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
------------------------------------------------------------------------------
License for JCraft JSch package
------------------------------------------------------------------------------
Copyright (c) 2002,2003,2004,2005,2006,2007 Atsuhiko Yamanaka, JCraft,Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
License for jQuery
------------------------------------------------------------------------------
Copyright (c) 2007 John Resig, http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,16 @@
Apache Ivy (TM)
Copyright 2007-2013 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Portions of Ivy were originally developed by
Jayasoft SARL (http://www.jayasoft.fr/)
and are licensed to the Apache Software Foundation under the
"Software Grant License Agreement"
SSH and SFTP support is provided by the JCraft JSch package,
which is open source software, available under
the terms of a BSD style license.
The original software and related information is available
at http://www.jcraft.com/jsch/.

82
lucene/luke/build.xml Normal file
View File

@ -0,0 +1,82 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="luke" default="default">
<description>
Luke - Lucene Toolbox
</description>
<!-- use full Java SE API (project default 'compact2' does not include Swing) -->
<property name="javac.profile.args" value=""/>
<import file="../module-build.xml"/>
<target name="init" depends="module-build.init,jar-lucene-core"/>
<path id="classpath">
<pathelement path="${lucene-core.jar}"/>
<pathelement path="${codecs.jar}"/>
<pathelement path="${backward-codecs.jar}"/>
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${misc.jar}"/>
<pathelement path="${queryparser.jar}"/>
<pathelement path="${queries.jar}"/>
<fileset dir="lib"/>
<path refid="base.classpath"/>
</path>
<target name="javadocs" depends="compile-core,javadocs-lucene-core,javadocs-analyzers-common,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../analyzers-common"/>
</links>
</invoke-module-javadoc>
</target>
<target name="build-artifacts-and-tests" depends="jar, compile-test">
<!-- copy start scripts -->
<copy todir="${build.dir}">
<fileset dir="${common.dir}/luke/bin">
<include name="**/*.sh"/>
<include name="**/*.bat"/>
</fileset>
</copy>
</target>
<!-- launch Luke -->
<target name="run" depends="compile-core" description="Launch Luke GUI">
<java classname="org.apache.lucene.luke.app.desktop.LukeMain"
classpath="${build.dir}/classes/java"
fork="true"
maxmemory="512m">
<classpath refid="classpath"/>
</java>
</target>
<target name="compile-core"
depends="jar-codecs,jar-backward-codecs,jar-analyzers-common,jar-misc,jar-queryparser,jar-queries,jar-misc,common.compile-core"/>
<!-- Luke has no Maven artifacts -->
<target name="-dist-maven"/>
<target name="-install-to-maven-local-repo"/>
<target name="-validate-maven-dependencies"/>
<target name="-append-module-dependencies-properties"/>
</project>

34
lucene/luke/ivy.xml Normal file
View File

@ -0,0 +1,34 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="luke"/>
<configurations defaultconfmapping="compile->default;logging->default">
<conf name="compile" transitive="false"/>
<conf name="logging" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.apache.logging.log4j" name="log4j-api" rev="${/org.apache.logging.log4j/log4j-api}"
conf="logging"/>
<dependency org="org.apache.logging.log4j" name="log4j-core" rev="${/org.apache.logging.log4j/log4j-core}"
conf="logging"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

34
lucene/memory/build.xml Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="memory" default="default">
<description>
Single-document in-memory index implementation
</description>
<import file="../module-build.xml"/>
<path id="test.classpath">
<pathelement path="${queryparser.jar}"/>
<path refid="test.base.classpath"/>
</path>
<target name="compile-core" depends="jar-queryparser,common.compile-core" />
</project>

21
lucene/memory/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="memory"/>
</ivy-module>

52
lucene/misc/build.xml Normal file
View File

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="misc" default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Index tools and other miscellaneous code
</description>
<import file="../module-build.xml"/>
<target name="install-cpptasks" unless="cpptasks.uptodate" depends="ivy-availability-check,ivy-fail,ivy-configure">
<property name="cpptasks.uptodate" value="true"/>
<ivy:cachepath organisation="ant-contrib" module="cpptasks" revision="1.0b5"
inline="true" conf="master" type="jar" pathid="cpptasks.classpath"/>
<taskdef resource="cpptasks.tasks" classpathref="cpptasks.classpath"/>
</target>
<target name="build-native-unix" depends="install-cpptasks">
<mkdir dir="${common.build.dir}/native"/>
<cc outtype="shared" name="c++" subsystem="console" outfile="${common.build.dir}/native/NativePosixUtil" >
<fileset file="${src.dir}/org/apache/lucene/store/NativePosixUtil.cpp" />
<includepath>
<pathelement location="${java.home}/../include"/>
<pathelement location="${java.home}/include"/>
<pathelement location="${java.home}/../include/linux"/>
<pathelement location="${java.home}/../include/solaris"/>
</includepath>
<compilerarg value="-fPIC" />
<syslibset libs="stdc++"/>
</cc>
</target>
</project>

21
lucene/misc/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="misc"/>
</ivy-module>

721
lucene/module-build.xml Normal file
View File

@ -0,0 +1,721 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="module-build" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- TODO: adjust build.dir/dist.dir appropriately when a module is run individually -->
<dirname file="${ant.file.module-build}" property="module-build.dir"/>
<property name="build.dir" location="${module-build.dir}/build/${ant.project.name}"/>
<property name="dist.dir" location="${module-build.dir}/dist/${ant.project.name}"/>
<property name="maven.dist.dir" location="${module-build.dir}/dist/maven"/>
<import file="common-build.xml"/>
<!-- if you extend the classpath refid in one contrib's build.xml (add JARs), use this as basis: -->
<path id="base.classpath">
<pathelement location="${common.dir}/build/core/classes/java"/>
</path>
<!-- default classpath refid, can be overridden by contrib's build.xml (use the above base.classpath as basis): -->
<path id="classpath" refid="base.classpath"/>
<path id="test.base.classpath">
<pathelement location="${common.dir}/build/test-framework/classes/java"/>
<pathelement location="${common.dir}/build/codecs/classes/java"/>
<path refid="classpath"/>
<path refid="junit-path"/>
<pathelement location="${build.dir}/classes/java"/>
</path>
<path id="test.classpath" refid="test.base.classpath"/>
<path id="junit.classpath">
<pathelement location="${build.dir}/classes/test"/>
<path refid="test.classpath"/>
</path>
<target name="init" depends="common.init,compile-lucene-core"/>
<target name="compile-test" depends="init" if="module.has.tests">
<antcall target="common.compile-test" inheritRefs="true" />
</target>
<target name="test" depends="init" if="module.has.tests">
<antcall target="common.test" inheritRefs="true" />
</target>
<target name="build-artifacts-and-tests" depends="jar, compile-test" />
<!-- TODO: why does this previous depend on compile-core? -->
<target name="javadocs" depends="compile-core,javadocs-lucene-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc/>
</target>
<macrodef name="invoke-module-javadoc">
<!-- additional links for dependencies to other modules -->
<element name="links" optional="yes"/>
<!-- link source (don't do this unless it's example code) -->
<attribute name="linksource" default="no"/>
<sequential>
<mkdir dir="${javadoc.dir}/${name}"/>
<invoke-javadoc
destdir="${javadoc.dir}/${name}"
title="${Name} ${version} ${name} API"
linksource="@{linksource}">
<sources>
<link href="../core/"/>
<links/>
<link href=""/>
<packageset dir="${src.dir}"/>
</sources>
</invoke-javadoc>
<!-- fix for Java 11 Javadoc tool that cannot handle split packages between modules correctly (by removing all the packages which are part of lucene-core): -->
<!-- problem description: [https://issues.apache.org/jira/browse/LUCENE-8738?focusedCommentId=16818106&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16818106] -->
<local name="element-list-regex"/><!-- contains a regex for all package names which are in lucene-core's javadoc! -->
<loadfile property="element-list-regex" srcFile="${javadoc.dir}/core/element-list" encoding="utf-8">
<filterchain>
<tokenfilter delimoutput="|">
<replacestring from="." to="\."/>
</tokenfilter>
</filterchain>
</loadfile>
<!--<echo>Regex: ^(${element-list-regex})$</echo>-->
<replaceregexp encoding="utf-8" file="${javadoc.dir}/${name}/element-list" byline="true" match="^(${element-list-regex})$" replace=""/>
<jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
</sequential>
</macrodef>
<property name="test-framework.jar" value="${common.dir}/build/test-framework/lucene-test-framework-${version}.jar"/>
<target name="check-test-framework-uptodate" unless="test-framework.uptodate">
<module-uptodate name="test-framework" jarfile="${test-framework.jar}" property="test-framework.uptodate"/>
</target>
<target name="jar-test-framework" unless="test-framework.uptodate" depends="check-test-framework-uptodate">
<ant dir="${common.dir}/test-framework" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="test-framework.uptodate" value="true"/>
</target>
<property name="test-framework-javadoc.jar" value="${common.dir}/build/test-framework/lucene-test-framework-${version}-javadoc.jar"/>
<target name="check-test-framework-javadocs-uptodate" unless="test-framework-javadocs.uptodate">
<module-uptodate name="test-framework" jarfile="${test-framework-javadoc.jar}" property="test-framework-javadocs.uptodate"/>
</target>
<target name="javadocs-test-framework" unless="test-framework-javadocs.uptodate" depends="check-test-framework-javadocs-uptodate">
<ant dir="${common.dir}/test-framework" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="test-framework-javadocs.uptodate" value="true"/>
</target>
<property name="queryparser.jar" value="${common.dir}/build/queryparser/lucene-queryparser-${version}.jar"/>
<target name="check-queryparser-uptodate" unless="queryparser.uptodate">
<module-uptodate name="queryparser" jarfile="${queryparser.jar}" property="queryparser.uptodate"/>
</target>
<target name="jar-queryparser" unless="queryparser.uptodate" depends="check-queryparser-uptodate">
<ant dir="${common.dir}/queryparser" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queryparser.uptodate" value="true"/>
</target>
<property name="queryparser-javadoc.jar" value="${common.dir}/build/queryparser/lucene-queryparser-${version}-javadoc.jar"/>
<target name="check-queryparser-javadocs-uptodate" unless="queryparser-javadocs.uptodate">
<module-uptodate name="queryparser" jarfile="${queryparser-javadoc.jar}" property="queryparser-javadocs.uptodate"/>
</target>
<target name="javadocs-queryparser" unless="queryparser-javadocs.uptodate" depends="check-queryparser-javadocs-uptodate">
<ant dir="${common.dir}/queryparser" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queryparser-javadocs.uptodate" value="true"/>
</target>
<property name="join.jar" value="${common.dir}/build/join/lucene-join-${version}.jar"/>
<target name="check-join-uptodate" unless="join.uptodate">
<module-uptodate name="join" jarfile="${join.jar}" property="join.uptodate"/>
</target>
<target name="jar-join" unless="join.uptodate" depends="check-join-uptodate">
<ant dir="${common.dir}/join" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="join.uptodate" value="true"/>
</target>
<property name="join-javadoc.jar" value="${common.dir}/build/join/lucene-join-${version}-javadoc.jar"/>
<target name="check-join-javadocs-uptodate" unless="join-javadocs.uptodate">
<module-uptodate name="join" jarfile="${join-javadoc.jar}" property="join-javadocs.uptodate"/>
</target>
<target name="javadocs-join" unless="join-javadocs.uptodate" depends="check-join-javadocs-uptodate">
<ant dir="${common.dir}/join" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="join-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-common.jar" value="${common.dir}/build/analysis/common/lucene-analyzers-common-${version}.jar"/>
<target name="check-analyzers-common-uptodate" unless="analyzers-common.uptodate">
<module-uptodate name="analysis/common" jarfile="${analyzers-common.jar}" property="analyzers-common.uptodate"/>
</target>
<target name="jar-analyzers-common" unless="analyzers-common.uptodate" depends="check-analyzers-common-uptodate">
<ant dir="${common.dir}/analysis/common" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-common.uptodate" value="true"/>
</target>
<property name="analyzers-common-javadoc.jar" value="${common.dir}/build/analysis/common/lucene-analyzers-common-${version}-javadoc.jar"/>
<target name="check-analyzers-common-javadocs-uptodate" unless="analyzers-common-javadocs.uptodate">
<module-uptodate name="analysis/common" jarfile="${analyzers-common-javadoc.jar}" property="analyzers-common-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-common" unless="analyzers-common-javadocs.uptodate" depends="check-analyzers-common-javadocs-uptodate">
<ant dir="${common.dir}/analysis/common" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-common-javadocs.uptodate" value="true"/>
</target>
<property name="queries.jar" value="${common.dir}/build/queries/lucene-queries-${version}.jar"/>
<target name="check-queries-uptodate" unless="queries.uptodate">
<module-uptodate name="queries" jarfile="${queries.jar}" property="queries.uptodate"/>
</target>
<target name="jar-queries" unless="queries.uptodate" depends="check-queries-uptodate">
<ant dir="${common.dir}/queries" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queries.uptodate" value="true"/>
</target>
<property name="queries-javadoc.jar" value="${common.dir}/build/queries/lucene-queries-${version}-javadoc.jar"/>
<target name="check-queries-javadocs-uptodate" unless="queries-javadocs.uptodate">
<module-uptodate name="queries" jarfile="${queries-javadoc.jar}" property="queries-javadocs.uptodate"/>
</target>
<target name="javadocs-queries" unless="queries-javadocs.uptodate" depends="check-queries-javadocs-uptodate">
<ant dir="${common.dir}/queries" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queries-javadocs.uptodate" value="true"/>
</target>
<property name="classification.jar" value="${common.dir}/build/classification/lucene-classification-${version}.jar"/>
<target name="check-classification-uptodate" unless="classification.uptodate">
<module-uptodate name="classification" jarfile="${classification.jar}" property="classification.uptodate"/>
</target>
<target name="jar-classification" unless="classification.uptodate" depends="check-classification-uptodate">
<ant dir="${common.dir}/classification" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="classification.uptodate" value="true"/>
</target>
<property name="classification-javadoc.jar" value="${common.dir}/build/classification/lucene-classification-${version}-javadoc.jar"/>
<target name="check-classification-javadocs-uptodate" unless="classification-javadocs.uptodate">
<module-uptodate name="classification" jarfile="${classification-javadoc.jar}" property="classification-javadocs.uptodate"/>
</target>
<target name="javadocs-classification" unless="classification-javadocs.uptodate" depends="check-classification-javadocs-uptodate">
<ant dir="${common.dir}/classification" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="classification-javadocs.uptodate" value="true"/>
</target>
<property name="facet.jar" value="${common.dir}/build/facet/lucene-facet-${version}.jar"/>
<target name="check-facet-uptodate" unless="facet.uptodate">
<module-uptodate name="facet" jarfile="${facet.jar}" property="facet.uptodate"/>
</target>
<target name="jar-facet" unless="facet.uptodate" depends="check-facet-uptodate">
<ant dir="${common.dir}/facet" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="facet.uptodate" value="true"/>
</target>
<property name="facet-javadoc.jar" value="${common.dir}/build/facet/lucene-facet-${version}-javadoc.jar"/>
<target name="check-facet-javadocs-uptodate" unless="facet-javadocs.uptodate">
<module-uptodate name="facet" jarfile="${facet-javadoc.jar}" property="facet-javadocs.uptodate"/>
</target>
<target name="javadocs-facet" unless="facet-javadocs.uptodate" depends="check-facet-javadocs-uptodate">
<ant dir="${common.dir}/facet" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="facet-javadocs.uptodate" value="true"/>
</target>
<property name="replicator.jar" value="${common.dir}/build/replicator/lucene-replicator-${version}.jar"/>
<target name="check-replicator-uptodate" unless="replicator.uptodate">
<module-uptodate name="replicator" jarfile="${replicator.jar}" property="replicator.uptodate"/>
</target>
<target name="jar-replicator" unless="replicator.uptodate" depends="check-replicator-uptodate">
<ant dir="${common.dir}/replicator" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="replicator.uptodate" value="true"/>
</target>
<property name="replicator-javadoc.jar" value="${common.dir}/build/replicator/lucene-replicator-${version}-javadoc.jar"/>
<target name="check-replicator-javadocs-uptodate" unless="replicator-javadocs.uptodate">
<module-uptodate name="replicator" jarfile="${replicator-javadoc.jar}" property="replicator-javadocs.uptodate"/>
</target>
<target name="javadocs-replicator" unless="replicator-javadocs.uptodate" depends="check-replicator-javadocs-uptodate">
<ant dir="${common.dir}/replicator" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="replicator-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-icu.jar" value="${common.dir}/build/analysis/icu/lucene-analyzers-icu-${version}.jar"/>
<target name="check-analyzers-icu-uptodate" unless="analyzers-icu.uptodate">
<module-uptodate name="analysis/icu" jarfile="${analyzers-icu.jar}" property="analyzers-icu.uptodate"/>
</target>
<target name="jar-analyzers-icu" unless="analyzers-icu.uptodate" depends="check-analyzers-icu-uptodate">
<ant dir="${common.dir}/analysis/icu" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-icu.uptodate" value="true"/>
</target>
<property name="analyzers-icu-javadoc.jar" value="${common.dir}/build/analysis/icu/lucene-analyzers-icu-${version}-javadoc.jar"/>
<target name="check-analyzers-icu-javadocs-uptodate" unless="analyzers-icu-javadocs.uptodate">
<module-uptodate name="analysis/icu" jarfile="${analyzers-icu-javadoc.jar}" property="analyzers-icu-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-icu" unless="analyzers-icu-javadocs.uptodate" depends="check-analyzers-icu-javadocs-uptodate">
<ant dir="${common.dir}/analysis/icu" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-icu-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-opennlp.jar" value="${common.dir}/build/analysis/opennlp/lucene-analyzers-opennlp-${version}.jar"/>
<target name="check-analyzers-opennlp-uptodate" unless="analyzers-opennlp.uptodate">
<module-uptodate name="analysis/opennlp" jarfile="${analyzers-opennlp.jar}" property="analyzers-opennlp.uptodate"/>
</target>
<target name="jar-analyzers-opennlp" unless="analyzers-opennlp.uptodate" depends="check-analyzers-opennlp-uptodate">
<ant dir="${common.dir}/analysis/opennlp" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-opennlp.uptodate" value="true"/>
</target>
<property name="analyzers-opennlp-javadoc.jar" value="${common.dir}/build/analysis/opennlp/lucene-analyzers-opennlp-${version}-javadoc.jar"/>
<target name="check-analyzers-opennlp-javadocs-uptodate" unless="analyzers-opennlp-javadocs.uptodate">
<module-uptodate name="analysis/opennlp" jarfile="${analyzers-opennlp-javadoc.jar}" property="analyzers-opennlp-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-opennlp" unless="analyzers-opennlp-javadocs.uptodate" depends="check-analyzers-opennlp-javadocs-uptodate">
<ant dir="${common.dir}/analysis/opennlp" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-opennlp-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-phonetic.jar" value="${common.dir}/build/analysis/phonetic/lucene-analyzers-phonetic-${version}.jar"/>
<target name="check-analyzers-phonetic-uptodate" unless="analyzers-phonetic.uptodate">
<module-uptodate name="analysis/phonetic" jarfile="${analyzers-phonetic.jar}" property="analyzers-phonetic.uptodate"/>
</target>
<target name="jar-analyzers-phonetic" unless="analyzers-phonetic.uptodate" depends="check-analyzers-phonetic-uptodate">
<ant dir="${common.dir}/analysis/phonetic" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<property name="analyzers-phonetic-javadoc.jar" value="${common.dir}/build/analysis/phonetic/lucene-analyzers-phonetic-${version}-javadoc.jar"/>
<target name="check-analyzers-phonetic-javadocs-uptodate" unless="analyzers-phonetic-javadocs.uptodate">
<module-uptodate name="analysis/phonetic" jarfile="${analyzers-phonetic-javadoc.jar}" property="analyzers-phonetic-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-phonetic" unless="analyzers-phonetic-javadocs.uptodate" depends="check-analyzers-phonetic-javadocs-uptodate">
<ant dir="${common.dir}/analysis/phonetic" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-phonetic-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-smartcn.jar" value="${common.dir}/build/analysis/smartcn/lucene-analyzers-smartcn-${version}.jar"/>
<target name="check-analyzers-smartcn-uptodate" unless="analyzers-smartcn.uptodate">
<module-uptodate name="analysis/smartcn" jarfile="${analyzers-smartcn.jar}" property="analyzers-smartcn.uptodate"/>
</target>
<target name="jar-analyzers-smartcn" unless="analyzers-smartcn.uptodate" depends="check-analyzers-smartcn-uptodate">
<ant dir="${common.dir}/analysis/smartcn" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-smartcn.uptodate" value="true"/>
</target>
<property name="analyzers-smartcn-javadoc.jar" value="${common.dir}/build/analysis/smartcn/lucene-analyzers-smartcn-${version}-javadoc.jar"/>
<target name="check-analyzers-smartcn-javadocs-uptodate" unless="analyzers-smartcn-javadocs.uptodate">
<module-uptodate name="analysis/smartcn" jarfile="${analyzers-smartcn-javadoc.jar}" property="analyzers-smartcn-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-smartcn" unless="analyzers-smartcn-javadocs.uptodate" depends="check-analyzers-smartcn-javadocs-uptodate">
<ant dir="${common.dir}/analysis/smartcn" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-smartcn-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-stempel.jar" value="${common.dir}/build/analysis/stempel/lucene-analyzers-stempel-${version}.jar"/>
<target name="check-analyzers-stempel-uptodate" unless="analyzers-stempel.uptodate">
<module-uptodate name="analysis/stempel" jarfile="${analyzers-stempel.jar}" property="analyzers-stempel.uptodate"/>
</target>
<target name="jar-analyzers-stempel" unless="analyzers-stempel.uptodate" depends="check-analyzers-stempel-uptodate">
<ant dir="${common.dir}/analysis/stempel" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-stempel.uptodate" value="true"/>
</target>
<property name="analyzers-stempel-javadoc.jar" value="${common.dir}/build/analysis/stempel/lucene-analyzers-stempel-${version}-javadoc.jar"/>
<target name="check-analyzers-stempel-javadocs-uptodate" unless="analyzers-stempel-javadocs.uptodate">
<module-uptodate name="analysis/stempel" jarfile="${analyzers-stempel-javadoc.jar}" property="analyzers-stempel-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-stempel" unless="analyzers-stempel-javadocs.uptodate" depends="check-analyzers-stempel-javadocs-uptodate">
<ant dir="${common.dir}/analysis/stempel" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-stempel-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-kuromoji.jar" value="${common.dir}/build/analysis/kuromoji/lucene-analyzers-kuromoji-${version}.jar"/>
<target name="check-analyzers-kuromoji-uptodate" unless="analyzers-kuromoji.uptodate">
<module-uptodate name="analysis/kuromoji" jarfile="${analyzers-kuromoji.jar}" property="analyzers-kuromoji.uptodate"/>
</target>
<target name="jar-analyzers-kuromoji" unless="analyzers-kuromoji.uptodate" depends="check-analyzers-kuromoji-uptodate">
<ant dir="${common.dir}/analysis/kuromoji" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-kuromoji.uptodate" value="true"/>
</target>
<property name="analyzers-kuromoji-javadoc.jar" value="${common.dir}/build/analysis/kuromoji/lucene-analyzers-kuromoji-${version}-javadoc.jar"/>
<target name="check-analyzers-kuromoji-javadocs-uptodate" unless="analyzers-kuromoji-javadocs.uptodate">
<module-uptodate name="analysis/kuromoji" jarfile="${analyzers-kuromoji-javadoc.jar}" property="analyzers-kuromoji-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-kuromoji" unless="analyzers-kuromoji-javadocs.uptodate" depends="check-analyzers-kuromoji-javadocs-uptodate">
<ant dir="${common.dir}/analysis/kuromoji" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-kuromoji-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-morfologik.jar" value="${common.dir}/build/analysis/morfologik/lucene-analyzers-morfologik-${version}.jar"/>
<fileset id="analyzers-morfologik.fileset" dir="${common.dir}">
<include name="build/analysis/morfologik/lucene-analyzers-morfologik-${version}.jar" />
<include name="analysis/morfologik/lib/morfologik-*.jar" />
</fileset>
<target name="check-analyzers-morfologik-uptodate" unless="analyzers-morfologik.uptodate">
<module-uptodate name="analysis/morfologik" jarfile="${analyzers-morfologik.jar}" property="analyzers-morfologik.uptodate"/>
</target>
<target name="jar-analyzers-morfologik" unless="analyzers-morfologik.uptodate" depends="check-analyzers-morfologik-uptodate">
<ant dir="${common.dir}/analysis/morfologik" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-morfologik.uptodate" value="true"/>
</target>
<property name="analyzers-morfologik-javadoc.jar" value="${common.dir}/build/analysis/morfologik/lucene-analyzers-morfologik-${version}-javadoc.jar"/>
<target name="check-analyzers-morfologik-javadocs-uptodate" unless="analyzers-morfologik-javadocs.uptodate">
<module-uptodate name="analysis/morfologik" jarfile="${analyzers-morfologik-javadoc.jar}" property="analyzers-morfologik-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-morfologik" unless="analyzers-morfologik-javadocs.uptodate" depends="check-analyzers-morfologik-javadocs-uptodate">
<ant dir="${common.dir}/analysis/morfologik" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-morfologik-javadocs.uptodate" value="true"/>
</target>
<property name="analyzers-nori.jar" value="${common.dir}/build/analysis/nori/lucene-analyzers-nori-${version}.jar"/>
<target name="check-analyzers-nori-uptodate" unless="analyzers-nori.uptodate">
<module-uptodate name="analysis/nori" jarfile="${analyzers-nori.jar}" property="analyzers-nori.uptodate"/>
</target>
<target name="jar-analyzers-nori" unless="analyzers-nori.uptodate" depends="check-analyzers-nori-uptodate">
<ant dir="${common.dir}/analysis/nori" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-nori.uptodate" value="true"/>
</target>
<property name="analyzers-nori-javadoc.jar" value="${common.dir}/build/analysis/nori/lucene-analyzers-nori-${version}-javadoc.jar"/>
<target name="check-analyzers-nori-javadocs-uptodate" unless="analyzers-nori-javadocs.uptodate">
<module-uptodate name="analysis/nori" jarfile="${analyzers-nori-javadoc.jar}" property="analyzers-nori-javadocs.uptodate"/>
</target>
<target name="javadocs-analyzers-nori" unless="analyzers-nori-javadocs.uptodate" depends="check-analyzers-nori-javadocs-uptodate">
<ant dir="${common.dir}/analysis/nori" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-nori-javadocs.uptodate" value="true"/>
</target>
<property name="codecs.jar" value="${common.dir}/build/codecs/lucene-codecs-${version}.jar"/>
<target name="check-codecs-uptodate" unless="codecs.uptodate">
<module-uptodate name="codecs" jarfile="${codecs.jar}" property="codecs.uptodate"/>
</target>
<target name="jar-codecs" unless="codecs.uptodate" depends="check-codecs-uptodate">
<ant dir="${common.dir}/codecs" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="codecs.uptodate" value="true"/>
</target>
<property name="codecs-javadoc.jar" value="${common.dir}/build/codecs/lucene-codecs-${version}-javadoc.jar"/>
<target name="check-codecs-javadocs-uptodate" unless="codecs-javadocs.uptodate">
<module-uptodate name="codecs" jarfile="${codecs-javadoc.jar}" property="codecs-javadocs.uptodate"/>
</target>
<target name="javadocs-codecs" unless="codecs-javadocs.uptodate" depends="check-codecs-javadocs-uptodate">
<ant dir="${common.dir}/codecs" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="codecs-javadocs.uptodate" value="true"/>
</target>
<property name="backward-codecs.jar" value="${common.dir}/build/backward-codecs/lucene-backward-codecs-${version}.jar"/>
<target name="check-backward-codecs-uptodate" unless="backward-codecs.uptodate">
<module-uptodate name="backward-codecs" jarfile="${backward-codecs.jar}" property="backward-codecs.uptodate"/>
</target>
<target name="jar-backward-codecs" unless="backward-codecs.uptodate" depends="check-backward-codecs-uptodate">
<ant dir="${common.dir}/backward-codecs" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="backward-codecs.uptodate" value="true"/>
</target>
<property name="backward-codecs-javadoc.jar" value="${common.dir}/build/backward-codecs/lucene-backward-codecs-${version}-javadoc.jar"/>
<target name="check-backward-codecs-javadocs-uptodate" unless="backward-codecs-javadocs.uptodate">
<module-uptodate name="backward-codecs" jarfile="${backward-codecs-javadoc.jar}" property="backward-codecs-javadocs.uptodate"/>
</target>
<target name="javadocs-backward-codecs" unless="backward-codecs-javadocs.uptodate" depends="check-backward-codecs-javadocs-uptodate">
<ant dir="${common.dir}/backward-codecs" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="backward-codecs-javadocs.uptodate" value="true"/>
</target>
<property name="expressions.jar" value="${common.dir}/build/expressions/lucene-expressions-${version}.jar"/>
<target name="check-expressions-uptodate" unless="expressions.uptodate">
<module-uptodate name="expressions" jarfile="${expressions.jar}" property="expressions.uptodate"/>
</target>
<target name="jar-expressions" unless="expressions.uptodate" depends="check-expressions-uptodate">
<ant dir="${common.dir}/expressions" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="expressions.uptodate" value="true"/>
</target>
<property name="expressions-javadoc.jar" value="${common.dir}/build/expressions/lucene-expressions-${version}-javadoc.jar"/>
<target name="check-expressions-javadocs-uptodate" unless="expressions-javadocs.uptodate">
<module-uptodate name="expressions" jarfile="${expressions-javadoc.jar}" property="expressions-javadocs.uptodate"/>
</target>
<target name="javadocs-expressions" unless="expressions-javadocs.uptodate" depends="check-expressions-javadocs-uptodate">
<ant dir="${common.dir}/expressions" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="expressions-javadocs.uptodate" value="true"/>
</target>
<property name="grouping.jar" value="${common.dir}/build/grouping/lucene-grouping-${version}.jar"/>
<target name="check-grouping-uptodate" unless="grouping.uptodate">
<module-uptodate name="grouping" jarfile="${grouping.jar}" property="grouping.uptodate"/>
</target>
<target name="jar-grouping" unless="grouping.uptodate" depends="check-grouping-uptodate">
<ant dir="${common.dir}/grouping" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="grouping.uptodate" value="true"/>
</target>
<property name="grouping-javadoc.jar" value="${common.dir}/build/grouping/lucene-grouping-${version}-javadoc.jar"/>
<target name="check-grouping-javadocs-uptodate" unless="grouping-javadocs.uptodate">
<module-uptodate name="grouping" jarfile="${grouping-javadoc.jar}" property="grouping-javadocs.uptodate"/>
</target>
<target name="javadocs-grouping" unless="grouping-javadocs.uptodate" depends="check-grouping-javadocs-uptodate">
<ant dir="${common.dir}/grouping" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="grouping-javadocs.uptodate" value="true"/>
</target>
<property name="highlighter.jar" value="${common.dir}/build/highlighter/lucene-highlighter-${version}.jar"/>
<target name="check-highlighter-uptodate" unless="highlighter.uptodate">
<module-uptodate name="highlighter" jarfile="${highlighter.jar}" property="highlighter.uptodate"/>
</target>
<target name="jar-highlighter" unless="highlighter.uptodate" depends="check-highlighter-uptodate">
<ant dir="${common.dir}/highlighter" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="highlighter.uptodate" value="true"/>
</target>
<property name="highlighter-javadoc.jar" value="${common.dir}/build/highlighter/lucene-highlighter-${version}-javadoc.jar"/>
<target name="check-highlighter-javadocs-uptodate" unless="highlighter-javadocs.uptodate">
<module-uptodate name="highlighter" jarfile="${highlighter-javadoc.jar}" property="highlighter-javadocs.uptodate"/>
</target>
<target name="javadocs-highlighter" unless="highlighter-javadocs.uptodate" depends="check-highlighter-javadocs-uptodate">
<ant dir="${common.dir}/highlighter" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="highlighter-javadocs.uptodate" value="true"/>
</target>
<property name="memory.jar" value="${common.dir}/build/memory/lucene-memory-${version}.jar"/>
<target name="check-memory-uptodate" unless="memory.uptodate">
<module-uptodate name="memory" jarfile="${memory.jar}" property="memory.uptodate"/>
</target>
<target name="jar-memory" unless="memory.uptodate" depends="check-memory-uptodate">
<ant dir="${common.dir}/memory" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="memory.uptodate" value="true"/>
</target>
<property name="memory-javadoc.jar" value="${common.dir}/build/memory/lucene-memory-${version}-javadoc.jar"/>
<target name="check-memory-javadocs-uptodate" unless="memory-javadocs.uptodate">
<module-uptodate name="memory" jarfile="${memory-javadoc.jar}" property="memory-javadocs.uptodate"/>
</target>
<target name="javadocs-memory" unless="memory-javadocs.uptodate" depends="check-memory-javadocs-uptodate">
<ant dir="${common.dir}/memory" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="memory-javadocs.uptodate" value="true"/>
</target>
<property name="misc.jar" value="${common.dir}/build/misc/lucene-misc-${version}.jar"/>
<target name="check-misc-uptodate" unless="misc.uptodate">
<module-uptodate name="misc" jarfile="${misc.jar}" property="misc.uptodate"/>
</target>
<target name="jar-misc" unless="misc.uptodate" depends="check-misc-uptodate">
<ant dir="${common.dir}/misc" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="misc.uptodate" value="true"/>
</target>
<property name="misc-javadoc.jar" value="${common.dir}/build/misc/lucene-misc-${version}-javadoc.jar"/>
<target name="check-misc-javadocs-uptodate" unless="misc-javadocs.uptodate">
<module-uptodate name="misc" jarfile="${misc-javadoc.jar}" property="misc-javadocs.uptodate"/>
</target>
<target name="javadocs-misc" unless="misc-javadocs.uptodate" depends="check-misc-javadocs-uptodate">
<ant dir="${common.dir}/misc" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="misc-javadocs.uptodate" value="true"/>
</target>
<property name="sandbox.jar" value="${common.dir}/build/sandbox/lucene-sandbox-${version}.jar"/>
<target name="check-sandbox-uptodate" unless="sandbox.uptodate">
<module-uptodate name="sandbox" jarfile="${sandbox.jar}" property="sandbox.uptodate"/>
</target>
<target name="jar-sandbox" unless="sandbox.uptodate" depends="check-sandbox-uptodate">
<ant dir="${common.dir}/sandbox" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="sandbox.uptodate" value="true"/>
</target>
<property name="sandbox-javadoc.jar" value="${common.dir}/build/sandbox/lucene-sandbox-${version}-javadoc.jar"/>
<target name="check-sandbox-javadocs-uptodate" unless="sandbox-javadocs.uptodate">
<module-uptodate name="sandbox" jarfile="${sandbox-javadoc.jar}" property="sandbox-javadocs.uptodate"/>
</target>
<target name="javadocs-sandbox" unless="sandbox-javadocs.uptodate" depends="check-sandbox-javadocs-uptodate">
<ant dir="${common.dir}/sandbox" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="sandbox-javadocs.uptodate" value="true"/>
</target>
<property name="spatial3d.jar" value="${common.dir}/build/spatial3d/lucene-spatial3d-${version}.jar"/>
<target name="check-spatial3d-uptodate" unless="spatial3d.uptodate">
<module-uptodate name="spatial3d" jarfile="${spatial3d.jar}" property="spatial3d.uptodate"/>
</target>
<target name="jar-spatial3d" unless="spatial3d.uptodate" depends="check-spatial3d-uptodate">
<ant dir="${common.dir}/spatial3d" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="spatial3d.uptodate" value="true"/>
</target>
<property name="spatial3d-javadoc.jar" value="${common.dir}/build/spatial3d/lucene-spatial3d-${version}-javadoc.jar"/>
<target name="check-spatial3d-javadocs-uptodate" unless="spatial3d-javadocs.uptodate">
<module-uptodate name="spatial3d" jarfile="${spatial3d-javadoc.jar}" property="spatial3d-javadocs.uptodate"/>
</target>
<target name="javadocs-spatial3d" unless="spatial3d-javadocs.uptodate" depends="check-spatial3d-javadocs-uptodate">
<ant dir="${common.dir}/spatial3d" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="spatial3d-javadocs.uptodate" value="true"/>
</target>
<property name="spatial-extras.jar" value="${common.dir}/build/spatial-extras/lucene-spatial-extras-${version}.jar"/>
<target name="check-spatial-extras-uptodate" unless="spatial-extras.uptodate">
<module-uptodate name="spatial-extras" jarfile="${spatial-extras.jar}" property="spatial-extras.uptodate"/>
</target>
<target name="jar-spatial-extras" unless="spatial-extras.uptodate" depends="check-spatial-extras-uptodate">
<ant dir="${common.dir}/spatial-extras" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="spatial-extras.uptodate" value="true"/>
</target>
<property name="spatial-extras-javadoc.jar" value="${common.dir}/build/spatial-extras/lucene-spatial-extras-${version}-javadoc.jar"/>
<target name="check-spatial-extras-javadocs-uptodate" unless="spatial-extras-javadocs.uptodate">
<module-uptodate name="spatial-extras" jarfile="${spatial-extras-javadoc.jar}" property="spatial-extras-javadocs.uptodate"/>
</target>
<target name="javadocs-spatial-extras" unless="spatial-extras-javadocs.uptodate" depends="check-spatial-extras-javadocs-uptodate">
<ant dir="${common.dir}/spatial-extras" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="spatial-extras-javadocs.uptodate" value="true"/>
</target>
<property name="suggest.jar" value="${common.dir}/build/suggest/lucene-suggest-${version}.jar"/>
<target name="check-suggest-uptodate" unless="suggest.uptodate">
<module-uptodate name="suggest" jarfile="${suggest.jar}" property="suggest.uptodate"/>
</target>
<target name="jar-suggest" unless="suggest.uptodate" depends="check-suggest-uptodate">
<ant dir="${common.dir}/suggest" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="suggest.uptodate" value="true"/>
</target>
<property name="suggest-javadoc.jar" value="${common.dir}/build/suggest/lucene-suggest-${version}-javadoc.jar"/>
<target name="check-suggest-javadocs-uptodate" unless="suggest-javadocs.uptodate">
<module-uptodate name="suggest" jarfile="${suggest-javadoc.jar}" property="suggest-javadocs.uptodate"/>
</target>
<target name="javadocs-suggest" unless="suggest-javadocs.uptodate" depends="check-suggest-javadocs-uptodate">
<ant dir="${common.dir}/suggest" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="suggest-javadocs.uptodate" value="true"/>
</target>
<property name="luke.jar" value="${common.dir}/build/luke/lucene-luke-${version}.jar"/>
<target name="check-luke-uptodate" unless="luke.uptodate">
<module-uptodate name="luke" jarfile="${luke.jar}" property="luke.uptodate"/>
</target>
<target name="jar-luke" unless="luke.uptodate" depends="check-luke-uptodate">
<ant dir="${common.dir}/luke" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="luke.uptodate" value="true"/>
</target>
<property name="luke-javadoc.jar" value="${common.dir}/build/luke/lucene-luke-${version}-javadoc.jar"/>
<target name="check-luke-javadocs-uptodate" unless="luke-javadocs.uptodate">
<module-uptodate name="luke" jarfile="${luke-javadoc.jar}" property="luke-javadocs.uptodate"/>
</target>
<target name="javadocs-luke" unless="luke-javadocs.uptodate" depends="check-luke-javadocs-uptodate">
<ant dir="${common.dir}/luke" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="luke-javadocs.uptodate" value="true"/>
</target>
</project>

53
lucene/monitor/build.xml Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="monitor" default="default">
<description>
Reverse-search implementation for monitoring and classification
</description>
<import file="../module-build.xml"/>
<path id="test.classpath">
<path refid="test.base.classpath"/>
<pathelement path="${memory.jar}"/>
</path>
<path id="classpath">
<pathelement path="${memory.jar}"/>
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${queryparser.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="init" depends="module-build.init,jar-analyzers-common,jar-queryparser,jar-memory"/>
<target name="javadocs" depends="javadocs-memory,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../memory"/>
<link href="../analyzers-common"/>
<link href="../queryparser"/>
</links>
</invoke-module-javadoc>
</target>
</project>

21
lucene/monitor/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="luwak"/>
</ivy-module>

32
lucene/queries/build.xml Normal file
View File

@ -0,0 +1,32 @@
<!--
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.
-->
<project name="queries" default="default">
<description>
Filters and Queries that add to core Lucene
</description>
<import file="../module-build.xml"/>
<path id="test.classpath">
<pathelement path="${expressions.jar}"/>
<fileset dir="../expressions/lib"/>
<path refid="test.base.classpath"/>
</path>
<target name="compile-core" depends="jar-expressions,common.compile-core" />
</project>

21
lucene/queries/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="queries"/>
</ivy-module>

View File

@ -0,0 +1,178 @@
<!--
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.
-->
<project name="queryparser" default="default">
<description>
Query parsers and parsing framework
</description>
<import file="../module-build.xml"/>
<path id="classpath">
<pathelement path="${queries.jar}"/>
<pathelement path="${sandbox.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="compile-core" depends="jar-queries,jar-sandbox,common.compile-core"/>
<target name="javadocs" depends="javadocs-queries,javadocs-sandbox,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../queries"/>
<link href="../sandbox"/>
</links>
</invoke-module-javadoc>
</target>
<target name="javacc" depends="javacc-QueryParser,javacc-surround,javacc-flexible"/>
<macrodef name="generalReplaces">
<attribute name="dir"/>
<sequential>
<!-- StringBuffer -> StringBuilder -->
<replace token="StringBuffer" value="StringBuilder" encoding="UTF-8">
<fileset dir="@{dir}" includes="ParseException.java TokenMgrError.java"/>
</replace>
<!-- Remove debug stream (violates forbidden-apis) -->
<replaceregexp match="/\*\* Debug.*debugStream\s*=\s*ds;\s*}" replace="" flags="s" encoding="UTF-8">
<fileset dir="@{dir}" includes="*TokenManager.java"/>
</replaceregexp>
<!-- Add warnings supression -->
<replaceregexp match="^\Qpublic class\E" replace="@SuppressWarnings(&quot;cast&quot;)${line.separator}\0" flags="m" encoding="UTF-8">
<fileset dir="@{dir}" includes="*TokenManager.java"/>
</replaceregexp>
</sequential>
</macrodef>
<target name="javacc-QueryParser" depends="resolve-javacc">
<sequential>
<invoke-javacc target="src/java/org/apache/lucene/queryparser/classic/QueryParser.jj"
outputDir="src/java/org/apache/lucene/queryparser/classic"/>
<!-- Change the incorrect public ctors for QueryParser to be protected instead -->
<replaceregexp file="src/java/org/apache/lucene/queryparser/classic/QueryParser.java"
byline="true"
match="public QueryParser\(CharStream "
replace="protected QueryParser(CharStream "/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/classic/QueryParser.java"
byline="true"
match="public QueryParser\(QueryParserTokenManager "
replace="protected QueryParser(QueryParserTokenManager "/>
<generalReplaces dir="src/java/org/apache/lucene/queryparser/classic"/>
</sequential>
</target>
<target name="javacc-surround" depends="resolve-javacc" description="generate surround query parser">
<invoke-javacc target="src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj"
outputDir="src/java/org/apache/lucene/queryparser/surround/parser"
/>
<generalReplaces dir="src/java/org/apache/lucene/queryparser/surround/parser"/>
</target>
<target name="javacc-flexible" depends="resolve-javacc">
<invoke-javacc target="src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj"
outputDir="src/java/org/apache/lucene/queryparser/flexible/standard/parser"
/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="public class ParseException extends Exception"
replace="public class ParseException extends QueryNodeParseException"
flags="g"
byline="false"/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="package org.apache.lucene.queryparser.flexible.standard.parser;"
replace="package org.apache.lucene.queryparser.flexible.standard.parser;${line.separator}
${line.separator}
import org.apache.lucene.queryparser.flexible.messages.Message;${line.separator}
import org.apache.lucene.queryparser.flexible.messages.MessageImpl;${line.separator}
import org.apache.lucene.queryparser.flexible.core.*;${line.separator}
import org.apache.lucene.queryparser.flexible.core.messages.*;"
flags="g"
byline="false"/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="^ public ParseException\(Token currentTokenVal.*$(\s\s[^}].*\n)* \}"
replace=" public ParseException(Token currentTokenVal,${line.separator}
int[][] expectedTokenSequencesVal, String[] tokenImageVal) {${line.separator}
super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, initialise(${line.separator}
currentTokenVal, expectedTokenSequencesVal, tokenImageVal)));${line.separator}
this.currentToken = currentTokenVal;${line.separator}
this.expectedTokenSequences = expectedTokenSequencesVal;${line.separator}
this.tokenImage = tokenImageVal;${line.separator}
}"
flags="gm"
byline="false"/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="^ public ParseException\(String message.*$(\s\s[^}].*\n)* \}"
replace=" public ParseException(Message message) {${line.separator}
super(message);${line.separator}
}"
flags="gm"
byline="false"/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="^ public ParseException\(\).*$(\s\s[^}].*\n)* \}"
replace=" public ParseException() {${line.separator}
super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, &quot;Error&quot;));${line.separator}
}"
flags="gm"
byline="false"/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="^ public String getMessage\(\).*$(\s\s\s\s[^}].*\n)* \}"
replace=" private static String initialise(Token currentToken, int[][] expectedTokenSequences, String[] tokenImage) {${line.separator}
String eol = System.getProperty(&quot;line.separator&quot;, &quot;\n&quot;);"
flags="gm"
byline="false"/>
<replaceregexp file="src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java"
match="\s*protected String add_escapes.*"
replace=" static private String add_escapes(String str) {"
flags="g"
byline="true"/>
<generalReplaces dir="src/java/org/apache/lucene/queryparser/flexible/standard/parser"/>
</target>
<target name="resolve-javacc" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- setup a "fake" JavaCC distribution folder in ${build.dir} to make JavaCC ANT task happy: -->
<ivy:retrieve organisation="net.java.dev.javacc" module="javacc" revision="5.0" symlink="${ivy.symlink}"
inline="true" conf="default" transitive="false" type="jar" sync="true"
pattern="${build.dir}/javacc/bin/lib/[artifact].[ext]"/>
</target>
<macrodef name="invoke-javacc">
<attribute name="target"/>
<attribute name="outputDir"/>
<sequential>
<mkdir dir="@{outputDir}"/>
<delete>
<fileset dir="@{outputDir}" includes="*.java">
<containsregexp expression="Generated.*By.*JavaCC"/>
</fileset>
</delete>
<javacc
target="@{target}"
outputDirectory="@{outputDir}"
javacchome="${build.dir}/javacc"
jdkversion="1.${javac.release}"
/>
<fixcrlf srcdir="@{outputDir}" includes="*.java" encoding="UTF-8">
<containsregexp expression="Generated.*By.*JavaCC"/>
</fixcrlf>
</sequential>
</macrodef>
<target name="regenerate" depends="javacc"/>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="queryparser"/>
</ivy-module>

View File

@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="DTDDocAnt" default="main">
<import file="../../lucene/module-build.xml"/>
<description>
This file generates DTDdocumentation
</description>
<!-- Tell ant where to find the code of the DTDDoc task.
Set dtddoc.home property to the directory where DTDdoc is installed on your system
-->
<taskdef name="DTDDoc"
classname="DTDDoc.DTDDocTask"
classpath="${dtddoc.home}/DTDDoc.jar"/>
<!-- Execute DTDDoc -->
<target name="main">
<DTDDoc showHiddenTags="false"
showFixmeTags="false"
sourceDir="."
destDir="docs"
docTitle = "Lucene XML Query syntax">
<include name="org/apache/lucene/queryparser/xml/*.dtd"/>
</DTDDoc>
</target>
</project>

View File

@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="replicator" default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Files replication utility
</description>
<!-- TODO: go fix this in jetty, its stupid -->
<property name="tests.policy" location="../tools/junit4/replicator-tests.policy"/>
<import file="../module-build.xml"/>
<path id="classpath">
<fileset dir="lib" />
<pathelement path="${facet.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="resolve" depends="common.resolve">
<sequential>
<!-- javax.servlet jar -->
<ivy:retrieve conf="servlet" log="download-only" type="orbit" symlink="${ivy.symlink}"/>
</sequential>
</target>
<target name="init" depends="module-build.init,jar-facet"/>
<target name="javadocs" depends="javadocs-facet,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../facet"/>
</links>
</invoke-module-javadoc>
</target>
</project>

47
lucene/replicator/ivy.xml Normal file
View File

@ -0,0 +1,47 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="replicator"/>
<configurations defaultconfmapping="http->master;jetty->master;start->master;servlet->master;logging->master">
<conf name="http" description="httpclient jars" transitive="false"/>
<conf name="jetty" description="jetty jars" transitive="false"/>
<conf name="start" description="jetty start jar" transitive="false"/>
<conf name="servlet" description="servlet-api jar" transitive="false"/>
<conf name="logging" description="logging setup" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.apache.httpcomponents" name="httpclient" rev="${/org.apache.httpcomponents/httpclient}" conf="http"/>
<dependency org="org.apache.httpcomponents" name="httpcore" rev="${/org.apache.httpcomponents/httpcore}" conf="http"/>
<dependency org="org.eclipse.jetty" name="jetty-server" rev="${/org.eclipse.jetty/jetty-server}" conf="jetty"/>
<dependency org="javax.servlet" name="javax.servlet-api" rev="${/javax.servlet/javax.servlet-api}" conf="jetty"/>
<dependency org="org.eclipse.jetty" name="jetty-servlet" rev="${/org.eclipse.jetty/jetty-servlet}" conf="jetty"/>
<dependency org="org.eclipse.jetty" name="jetty-util" rev="${/org.eclipse.jetty/jetty-util}" conf="jetty"/>
<dependency org="org.eclipse.jetty" name="jetty-io" rev="${/org.eclipse.jetty/jetty-io}" conf="jetty"/>
<dependency org="org.eclipse.jetty" name="jetty-continuation" rev="${/org.eclipse.jetty/jetty-continuation}" conf="jetty"/>
<dependency org="org.eclipse.jetty" name="jetty-http" rev="${/org.eclipse.jetty/jetty-http}" conf="jetty"/>
<dependency org="commons-logging" name="commons-logging" rev="${/commons-logging/commons-logging}" conf="logging"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

26
lucene/sandbox/build.xml Normal file
View File

@ -0,0 +1,26 @@
<!--
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.
-->
<project name="sandbox" default="default">
<description>
Various third party contributions and new ideas
</description>
<import file="../module-build.xml"/>
</project>

21
lucene/sandbox/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="sandbox"/>
</ivy-module>

View File

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="spatial-extras" default="default">
<description>
Geospatial search
</description>
<import file="../module-build.xml"/>
<path id="spatialjar">
<fileset dir="lib"/>
</path>
<path id="classpath">
<path refid="base.classpath"/>
<path refid="spatialjar"/>
<pathelement path="${spatial3d.jar}" />
</path>
<path id="test.classpath">
<path refid="test.base.classpath" />
<path refid="spatialjar"/>
<pathelement path="src/test-files" />
<pathelement path="${common.dir}/build/spatial3d/classes/test" />
</path>
<target name="compile-core" depends="jar-spatial3d,common.compile-core" />
<target name="compile-test" depends="compile-spatial3d-tests,common.compile-test" />
<target name="compile-spatial3d-tests">
<ant dir="${common.dir}/spatial3d" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="javadocs" depends="javadocs-spatial3d,compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../spatial3d"/>
</links>
</invoke-module-javadoc>
</target>
</project>

View File

@ -0,0 +1,40 @@
<!--
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.
-->
<ivy-module version="2.0" xmlns:maven="http://ant.apache.org/ivy/maven">
<info organisation="org.apache.lucene" module="spatial-extras"/>
<configurations defaultconfmapping="compile->master;test->master">
<conf name="compile" transitive="false"/>
<conf name="test" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.locationtech.spatial4j" name="spatial4j" rev="${/org.locationtech.spatial4j/spatial4j}" conf="compile"/>
<dependency org="io.sgr" name="s2-geometry-library-java" rev="${/io.sgr/s2-geometry-library-java}" conf="compile"/>
<dependency org="org.locationtech.spatial4j" name="spatial4j" rev="${/org.locationtech.spatial4j/spatial4j}" conf="test">
<artifact name="spatial4j" type="test" ext="jar" maven:classifier="tests" />
</dependency>
<dependency org="org.locationtech.jts" name="jts-core" rev="${/org.locationtech.jts/jts-core}" conf="test" />
<!-- <dependency org="org.slf4j" name="slf4j-api" rev="${/org.slf4j/slf4j-api}" conf="test"/> -->
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="spatial3d" default="default">
<description>
3D spatial planar geometry APIs
</description>
<import file="../module-build.xml"/>
<path id="classpath">
<path refid="base.classpath"/>
</path>
</project>

21
lucene/spatial3d/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="spatial3d"/>
</ivy-module>

47
lucene/suggest/build.xml Normal file
View File

@ -0,0 +1,47 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="suggest" default="default">
<description>
Auto-suggest and Spellchecking support
</description>
<!-- just a list of words for testing suggesters -->
<property name="rat.excludes" value="**/Top50KWiki.utf8,**/stop-snowball.txt"/>
<import file="../module-build.xml"/>
<path id="classpath">
<pathelement path="${analyzers-common.jar}"/>
<path refid="base.classpath"/>
</path>
<target name="javadocs" depends="compile-core,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<invoke-module-javadoc>
<links>
<link href="../analyzers-common"/>
</links>
</invoke-module-javadoc>
</target>
<target name="compile-core" depends="jar-expressions, jar-analyzers-common, common.compile-core" />
</project>

21
lucene/suggest/ivy.xml Normal file
View File

@ -0,0 +1,21 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="suggest"/>
</ivy-module>

View File

@ -0,0 +1,82 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="test-framework" default="default">
<description>Framework for testing Lucene-based applications</description>
<property name="build.dir" location="../build/test-framework"/>
<import file="../common-build.xml"/>
<path id="classpath">
<pathelement location="${common.dir}/build/core/classes/java"/>
<pathelement location="${common.dir}/build/codecs/classes/java"/>
<fileset dir="lib"/>
</path>
<path id="test.classpath">
<pathelement location="${build.dir}/classes/java"/>
<pathelement location="${build.dir}/classes/test"/>
<path refid="classpath"/>
<path refid="junit-path"/>
</path>
<path id="junit.classpath">
<path refid="test.classpath"/>
</path>
<!--
Specialize compile-core to depend on lucene-core and lucene-codecs compilation.
-->
<target name="compile-core" depends="init,compile-lucene-core,compile-codecs,common.compile-core"
description="Compiles test-framework classes"/>
<!-- redefine the forbidden apis for tests, as we check ourselves - no sysout testing -->
<target name="-check-forbidden-tests" depends="-init-forbidden-apis,compile-core">
<forbidden-apis suppressAnnotation="**.SuppressForbidden" signaturesFile="${common.dir}/tools/forbiddenApis/tests.txt" classpathref="forbidden-apis.allclasses.classpath">
<fileset dir="${build.dir}/classes/java"/>
<fileset dir="${build.dir}/classes/test"/>
</forbidden-apis>
</target>
<target name="-check-forbidden-sysout"/>
<target name="javadocs-core" depends="javadocs"/>
<target name="javadocs" depends="init,javadocs-lucene-core,javadocs-lucene-codecs,check-javadocs-uptodate"
unless="javadocs-uptodate-${name}">
<sequential>
<mkdir dir="${javadoc.dir}/test-framework"/>
<invoke-javadoc overview="${src.dir}/overview.html"
destdir="${javadoc.dir}/test-framework"
title="${Name} ${version} Test Framework API">
<sources>
<packageset dir="${src.dir}"/>
<link offline="true" href="${javadoc.link.junit}"
packagelistLoc="${javadoc.packagelist.dir}/junit"/>
<link href="../core/"/>
<link href="../codecs/"/>
<link href=""/>
</sources>
</invoke-javadoc>
<mkdir dir="${build.dir}"/>
<jarify basedir="${javadoc.dir}/test-framework"
destfile="${build.dir}/${final.name}-javadoc.jar"
title="Lucene Search Engine: Test Framework" />
</sequential>
</target>
</project>

View File

@ -0,0 +1,33 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="test-framework"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="junit" name="junit" rev="${/junit/junit}" conf="compile"/>
<dependency org="org.hamcrest" name="hamcrest" rev="${/org.hamcrest/hamcrest}" conf="compile"/>
<dependency org="com.carrotsearch.randomizedtesting" name="randomizedtesting-runner" rev="${/com.carrotsearch.randomizedtesting/randomizedtesting-runner}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

64
lucene/tools/build.xml Normal file
View File

@ -0,0 +1,64 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="tools" default="default">
<description>Lucene Tools</description>
<property name="build.dir" location="../build/tools"/>
<property name="rat.additional-includes" value="forbiddenApis/**,prettify/**"/>
<import file="../common-build.xml"/>
<path id="classpath">
<!-- TODO: we need this for forbidden-apis to be happy, because it does not support "includeantruntime": -->
<fileset dir="lib"/>
</path>
<path id="test.classpath"/>
<!-- redefine the test compilation, -test and -check-totals, so these are just no-ops -->
<target name="compile-test"/>
<target name="-test"/>
<target name="-check-totals"/>
<!-- redefine the forbidden apis to be no-ops -->
<target name="-check-forbidden-tests"/>
<target name="-check-forbidden-sysout"/>
<!-- disable clover -->
<target name="-clover.setup" if="run.clover"/>
<!--
Specialize compile-core to not depend on clover, to exclude a
classpath reference when compiling, and to not attempt to copy
non-existent resource files to the build output directory.
-->
<target name="compile-core" depends="init" description="Compiles tools classes.">
<compile srcdir="${src.dir}" destdir="${build.dir}/classes/java" includeantruntime="true">
<classpath refid="classpath"/>
</compile>
<copy todir="${build.dir}/classes/java">
<fileset dir="${src.dir}" excludes="**/*.java" />
</copy>
</target>
<target name="javadocs"/> <!-- to make common-build.xml happy -->
<target name="pitest"/> <!-- to make common-build.xml happy -->
</project>

View File

@ -0,0 +1,149 @@
<!--
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.
-->
<project name="custom-tasks">
<description>
This file is designed for importing into a main build file, and not intended
for standalone use.
</description>
<target name="load-custom-tasks" unless="custom-tasks.loaded">
<dirname file="${ant.file.custom-tasks}" property="custom-tasks.dir"/>
<taskdef resource="lucene-solr.antlib.xml">
<classpath>
<pathelement location="${custom-tasks.dir}/../build/tools/classes/java" />
</classpath>
</taskdef>
<property name="custom-tasks.loaded" value="true"/>
</target>
<filtermapper id="license-mapper-defaults">
<!-- Normalize input paths. -->
<replacestring from="\" to="/" />
<replaceregex pattern="\.jar$" replace="" flags="gi" />
<!-- Some typical snapshot/minimalized JAR suffixes. -->
<replaceregex pattern="-min$" replace="" flags="gi" />
<replaceregex pattern="SNAPSHOT" replace="" flags="gi" />
<!-- Typical version patterns. -->
<replaceregex pattern="\.rc[0-9]+" replace="" flags="gi" />
<replaceregex pattern="(?&lt;!log4j)\-(r)?([0-9\-\_\.])+(([a-zA-Z]+)([0-9\-\.])*)?" replace="" flags="gi" />
<replaceregex pattern="[-]tests$" replace="-tests" flags="gi" />
<!-- git hashcode pattern: it's always 40 chars right? -->
<replaceregex pattern="\-[a-z0-9]{40,40}$" replace="" flags="gi" />
</filtermapper>
<macrodef name="license-check-macro">
<attribute name="dir" />
<attribute name="licensedir" />
<element name="additional-excludes" optional="true" />
<element name="additional-filters" optional="true" />
<sequential>
<!-- LICENSE and NOTICE verification macro. -->
<echo>License check under: @{dir}</echo>
<licenses licenseDirectory="@{licensedir}" skipChecksum="${skipChecksum}" skipRegexChecksum="${skipRegexChecksum}" skipSnapshotsChecksum="${skipSnapshotsChecksum}">
<fileset dir="@{dir}">
<include name="**/*.jar" />
<!-- Speed up scanning a bit. -->
<exclude name="**/.git/**" />
<exclude name="**/.svn/**" />
<exclude name="**/bin/**" />
<exclude name="**/build/**" />
<exclude name="**/dist/**" />
<exclude name="**/src/**" />
<additional-excludes />
</fileset>
<licenseMapper>
<chainedmapper>
<filtermapper refid="license-mapper-defaults"/>
<filtermapper>
<!-- Non-typical version patterns. -->
<additional-filters />
</filtermapper>
</chainedmapper>
</licenseMapper>
</licenses>
</sequential>
</macrodef>
<macrodef name="lib-versions-check-macro">
<attribute name="dir"/>
<attribute name="centralized.versions.file"/>
<attribute name="top.level.ivy.settings.file"/>
<attribute name="ivy.resolution-cache.dir"/>
<attribute name="ivy.lock-strategy"/>
<attribute name="common.build.dir"/>
<attribute name="ignore.conflicts.file"/>
<sequential>
<!--
Verify that the '/org/name' keys in ivy-versions.properties are sorted
lexically and are neither duplicates nor orphans, and that all
dependencies in all ivy.xml files use rev="${/org/name}" format.
-->
<echo>Lib versions check under: @{dir}</echo>
<libversions centralizedVersionsFile="@{centralized.versions.file}"
topLevelIvySettingsFile="@{top.level.ivy.settings.file}"
ivyResolutionCacheDir="@{ivy.resolution-cache.dir}"
ivyLockStrategy="@{ivy.lock-strategy}"
commonBuildDir="@{common.build.dir}"
ignoreConflictsFile="@{ignore.conflicts.file}">
<fileset dir="@{dir}">
<include name="**/ivy.xml" />
<!-- Speed up scanning a bit. -->
<exclude name="**/.git/**" />
<exclude name="**/.svn/**" />
<exclude name="**/bin/**" />
<exclude name="**/build/**" />
<exclude name="**/dist/**" />
<exclude name="**/src/**" />
</fileset>
</libversions>
</sequential>
</macrodef>
<macrodef name="get-maven-dependencies-macro">
<attribute name="dir"/>
<attribute name="centralized.versions.file"/>
<attribute name="module.dependencies.properties.file"/>
<attribute name="maven.dependencies.filters.file"/>
<sequential>
<echo>Get maven dependencies called under: @{dir}</echo>
<mvndeps centralizedVersionsFile="@{centralized.versions.file}"
moduleDependenciesPropertiesFile="@{module.dependencies.properties.file}"
mavenDependenciesFiltersFile="@{maven.dependencies.filters.file}">
<fileset dir="@{dir}">
<include name="**/ivy.xml" />
<!-- Speed up scanning a bit. -->
<exclude name="**/.git/**" />
<exclude name="**/.svn/**" />
<exclude name="**/bin/**" />
<exclude name="**/build/**" />
<exclude name="**/dist/**" />
<exclude name="**/src/**" />
<exclude name="**/maven-build/**" />
<exclude name="**/idea-build/**" />
<exclude name="**/dev-tools/**" />
</fileset>
</mvndeps>
</sequential>
</macrodef>
</project>

29
lucene/tools/ivy.xml Normal file
View File

@ -0,0 +1,29 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="tools"/>
<configurations defaultconfmapping="compile->master">
<conf name="compile" transitive="false"/>
</configurations>
<dependencies>
<dependency org="org.apache.ant" name="ant" rev="${/org.apache.ant/ant}" conf="compile"/>
<dependency org="org.apache.ivy" name="ivy" rev="${/org.apache.ivy/ivy}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,27 @@
<!--
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.
-->
<antlib>
<taskdef
name="licenses"
classname="org.apache.lucene.validation.LicenseCheckTask" />
<taskdef
name="libversions"
classname="org.apache.lucene.validation.LibVersionsCheckTask" />
<taskdef
name="mvndeps"
classname="org.apache.lucene.dependencies.GetMavenDependenciesTask" />
</antlib>

View File

@ -0,0 +1,178 @@
/*
* 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.
*/
package org.apache.lucene.validation.ivyde;
import org.apache.ivy.core.module.id.ModuleRevisionId;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
/**
* Assists in the further separation of concerns between the view and the Ivy resolve report. The view looks at the
* IvyNode in a unique way that can lead to expensive operations if we do not achieve this separation.
*
* This class is copied from org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java at
* https://svn.apache.org/repos/asf/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/
*
* Changes include: uncommenting generics and converting to diamond operators where appropriate;
* removing unnecessary casts; removing javadoc tags with no description; and adding a hashCode() implementation.
*/
public class IvyNodeElement {
private ModuleRevisionId moduleRevisionId;
private boolean evicted = false;
private int depth = Integer.MAX_VALUE / 10;
private Collection<IvyNodeElement> dependencies = new HashSet<>();
private Collection<IvyNodeElement> callers = new HashSet<>();
private Collection<IvyNodeElement> conflicts = new HashSet<>();
/**
* The caller configurations that caused this node to be reached in the resolution, grouped by caller.
*/
private Map<IvyNodeElement,String[]>callerConfigurationMap = new HashMap<>();
/**
* We try to avoid building the list of this nodes deep dependencies by storing them in this cache by depth level.
*/
private IvyNodeElement[] deepDependencyCache;
@Override
public boolean equals(Object obj) {
if (obj instanceof IvyNodeElement) {
IvyNodeElement elem = (IvyNodeElement) obj;
if (elem.getOrganization().equals(getOrganization()) && elem.getName().equals(getName())
&& elem.getRevision().equals(getRevision()))
return true;
}
return false;
}
@Override
public int hashCode() {
int result = 1;
result = result * 31 + (null == getOrganization() ? 0 : getOrganization().hashCode());
result = result * 31 + (null == getName() ? 0 : getName().hashCode());
result = result * 31 + (null == getRevision() ? 0 : getRevision().hashCode());
return result;
}
public IvyNodeElement[] getDependencies() {
return dependencies.toArray(new IvyNodeElement[dependencies.size()]);
}
/**
* Recursive dependency retrieval
*
* @return The array of nodes that represents a node's immediate and transitive dependencies down to an arbitrary
* depth.
*/
public IvyNodeElement[] getDeepDependencies() {
if (deepDependencyCache == null) {
Collection<IvyNodeElement> deepDependencies = getDeepDependencies(this);
deepDependencyCache = deepDependencies.toArray(new IvyNodeElement[deepDependencies.size()]);
}
return deepDependencyCache;
}
/**
* Recursive dependency retrieval
*/
private Collection<IvyNodeElement> getDeepDependencies(IvyNodeElement node) {
Collection<IvyNodeElement> deepDependencies = new HashSet<>();
deepDependencies.add(node);
IvyNodeElement[] directDependencies = node.getDependencies();
for (int i = 0; i < directDependencies.length; i++) {
deepDependencies.addAll(getDeepDependencies(directDependencies[i]));
}
return deepDependencies;
}
/**
* @return An array of configurations by which this module was resolved
*/
public String[] getCallerConfigurations(IvyNodeElement caller) {
return callerConfigurationMap.get(caller);
}
public void setCallerConfigurations(IvyNodeElement caller, String[] configurations) {
callerConfigurationMap.put(caller, configurations);
}
public String getOrganization() {
return moduleRevisionId.getOrganisation();
}
public String getName() {
return moduleRevisionId.getName();
}
public String getRevision() {
return moduleRevisionId.getRevision();
}
public boolean isEvicted() {
return evicted;
}
public void setEvicted(boolean evicted) {
this.evicted = evicted;
}
public int getDepth() {
return depth;
}
/**
* Set this node's depth and recursively update the node's children to relative to the new value.
*/
public void setDepth(int depth) {
this.depth = depth;
for (Iterator<IvyNodeElement> iter = dependencies.iterator(); iter.hasNext();) {
IvyNodeElement dependency = iter.next();
dependency.setDepth(depth + 1);
}
}
public IvyNodeElement[] getConflicts() {
return conflicts.toArray(new IvyNodeElement[conflicts.size()]);
}
public void setConflicts(Collection<IvyNodeElement> conflicts) {
this.conflicts = conflicts;
}
public ModuleRevisionId getModuleRevisionId() {
return moduleRevisionId;
}
public void setModuleRevisionId(ModuleRevisionId moduleRevisionId) {
this.moduleRevisionId = moduleRevisionId;
}
public void addCaller(IvyNodeElement caller) {
callers.add(caller);
caller.dependencies.add(this);
}
public IvyNodeElement[] getCallers() {
return callers.toArray(new IvyNodeElement[callers.size()]);
}
}

View File

@ -0,0 +1,135 @@
/*
* 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.
*/
package org.apache.lucene.validation.ivyde;
import org.apache.ivy.core.module.id.ModuleId;
import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.core.report.ResolveReport;
import org.apache.ivy.core.resolve.IvyNode;
import org.apache.ivy.core.resolve.IvyNodeCallers;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* This class is copied from org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java at
* https://svn.apache.org/repos/asf/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/
*
* Changes include: uncommenting generics and converting to diamond operators where appropriate;
* removing unnecessary casts; and removing javadoc tags with no description.
*/
public class IvyNodeElementAdapter {
/**
* Adapt all dependencies and evictions from the ResolveReport.
* @return the root node adapted from the ResolveReport
*/
public static IvyNodeElement adapt(ResolveReport report) {
Map<ModuleRevisionId,IvyNodeElement> resolvedNodes = new HashMap<>();
IvyNodeElement root = new IvyNodeElement();
root.setModuleRevisionId(report.getModuleDescriptor().getModuleRevisionId());
resolvedNodes.put(report.getModuleDescriptor().getModuleRevisionId(), root);
@SuppressWarnings("unchecked") List<IvyNode> dependencies = report.getDependencies();
// First pass - build the map of resolved nodes by revision id
for (Iterator<IvyNode> iter = dependencies.iterator(); iter.hasNext();) {
IvyNode node = iter.next();
if (node.getAllEvictingNodes() != null) {
// Nodes that are evicted as a result of conf inheritance still appear
// as dependencies, but with eviction data. They also appear as evictions.
// We map them as evictions rather than dependencies.
continue;
}
IvyNodeElement nodeElement = new IvyNodeElement();
nodeElement.setModuleRevisionId(node.getResolvedId());
resolvedNodes.put(node.getResolvedId(), nodeElement);
}
// Second pass - establish relationships between the resolved nodes
for (Iterator<IvyNode> iter = dependencies.iterator(); iter.hasNext();) {
IvyNode node = iter.next();
if (node.getAllEvictingNodes() != null) {
continue; // see note above
}
IvyNodeElement nodeElement = resolvedNodes.get(node.getResolvedId());
IvyNodeCallers.Caller[] callers = node.getAllRealCallers();
for (int i = 0; i < callers.length; i++) {
IvyNodeElement caller = resolvedNodes.get(callers[i].getModuleRevisionId());
if (caller != null) {
nodeElement.addCaller(caller);
nodeElement.setCallerConfigurations(caller, callers[i].getCallerConfigurations());
}
}
}
IvyNode[] evictions = report.getEvictedNodes();
for (int i = 0; i < evictions.length; i++) {
IvyNode eviction = evictions[i];
IvyNodeElement evictionElement = new IvyNodeElement();
evictionElement.setModuleRevisionId(eviction.getResolvedId());
evictionElement.setEvicted(true);
IvyNodeCallers.Caller[] callers = eviction.getAllCallers();
for (int j = 0; j < callers.length; j++) {
IvyNodeElement caller = resolvedNodes.get(callers[j].getModuleRevisionId());
if (caller != null) {
evictionElement.addCaller(caller);
evictionElement.setCallerConfigurations(caller, callers[j].getCallerConfigurations());
}
}
}
// Recursively set depth starting at root
root.setDepth(0);
findConflictsBeneathNode(root);
return root;
}
/**
* Derives configuration conflicts that exist between node and all of its descendant dependencies.
*/
private static void findConflictsBeneathNode(IvyNodeElement node) {
// Derive conflicts
Map<ModuleId,Collection<IvyNodeElement>> moduleRevisionMap = new HashMap<>();
IvyNodeElement[] deepDependencies = node.getDeepDependencies();
for (int i = 0; i < deepDependencies.length; i++) {
if (deepDependencies[i].isEvicted())
continue;
ModuleId moduleId = deepDependencies[i].getModuleRevisionId().getModuleId();
if (moduleRevisionMap.containsKey(moduleId)) {
Collection<IvyNodeElement> conflicts = moduleRevisionMap.get(moduleId);
conflicts.add(deepDependencies[i]);
for (Iterator<IvyNodeElement> iter = conflicts.iterator(); iter.hasNext();) {
IvyNodeElement conflict = iter.next();
conflict.setConflicts(conflicts);
}
} else {
List<IvyNodeElement> immutableMatchingSet = Arrays.asList(deepDependencies[i]);
moduleRevisionMap.put(moduleId, new HashSet<>(immutableMatchingSet));
}
}
}
}

View File

@ -0,0 +1,24 @@
<!--
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.
-->
<ivysettings>
<!-- Load ivy-versions.properties as Ivy variables. -->
<properties file="${ivy.settings.dir}/ivy-versions.properties" override="false"/>
<!-- Include the Ivy settings file pointed to by the "ivysettings.xml" property. -->
<include file="${ivysettings.xml}"/>
</ivysettings>

View File

@ -114,8 +114,6 @@ Other Changes
* SOLR-14702: All references to "master" and "slave" replaced with "leader" and "follower" (MarcusSorealheis,
Erick Erickson, Tomás Fernández Löbbe)
* LUCENE-9433: Remove Ant support from trunk (Erick Erickson)
Bug Fixes
---------------------
* SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution

View File

@ -163,22 +163,30 @@ Instructions for Building Apache Solr from Source
folder included on your command path. To test this, issue a "java -version" command
from your shell (command prompt) and verify that the Java version is 11 or later.
2. Download the Apache Solr distribution, linked from the above web site.
2. Download the Apache Ant binary distribution (1.8.2+) from
http://ant.apache.org/ You will need Ant installed and the $ANT_HOME/bin (Windows:
%ANT_HOME%\bin) folder included on your command path. To test this, issue a
"ant -version" command from your shell (command prompt) and verify that Ant is
available.
You will also need to install Apache Ivy binary distribution (2.2.0) from
http://ant.apache.org/ivy/ and place ivy-2.2.0.jar file in ~/.ant/lib -- if you skip
this step, the Solr build system will offer to do it for you.
3. Download the Apache Solr distribution, linked from the above web site.
Unzip the distribution to a folder of your choice, e.g. C:\solr or ~/solr
Alternately, you can obtain a copy of the latest Apache Solr source code
directly from the GIT repository:
https://lucene.apache.org/solr/community.html#version-control
https://lucene.apache.org/solr/versioncontrol.html
3. Navigate to the root of your source tree folder and issue the `./gradlew tasks`
command to see the available options for building, testing, and packaging Solr.
4. Navigate to the "solr" folder and issue an "ant" command to see the available options
for building, testing, and packaging Solr.
NOTE:
To see Solr in action, you may want to use the "ant server" command to build
and package Solr into the server directory. See also server/README.md.
`./gradlew assemble` will create a Solr executable.
cd to "./solr/packaging/build/solr-9.0.0-SNAPSHOT" and run the bin/solr script
to start Solr.
NOTE: `gradlew` is the "Gradle Wrapper" and will automaticaly download and
start using the correct version of Gradle.
Export control
-------------------------------------------------

813
solr/build.xml Normal file
View File

@ -0,0 +1,813 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="solr" default="usage"
xmlns:jacoco="antlib:org.jacoco.ant"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>Solr</description>
<target name="usage" description="Prints out instructions">
<echo message="Welcome to the Solr project!" />
<echo message="Use 'ant server' to create the Solr server." />
<echo message="Use 'bin/solr' to run the Solr after it is created." />
<echo message="And for developers:"/>
<echo message="Use 'ant clean' to clean compiled files." />
<echo message="Use 'ant compile' to compile the source code." />
<echo message="Use 'ant dist' to build the project JAR files." />
<echo message="Use 'ant documentation' to build documentation." />
<echo message="Use 'ant generate-maven-artifacts' to generate maven artifacts." />
<echo message="Use 'ant package' to generate zip, tgz for distribution." />
<echo message="Use 'ant test' to run unit tests." />
</target>
<import file="common-build.xml"/>
<!-- ========================================================================= -->
<!-- ============================== USER TASKS =============================== -->
<!-- ========================================================================= -->
<target name="server" depends="dist-contrib"
description="Creates a Solr server">
<ant dir="webapp" target="dist" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<jar destfile="${example}/exampledocs/post.jar">
<fileset dir="${dest}/solr-core/classes/java">
<include name="org/apache/solr/util/CLIO.class"/>
<include name="org/apache/solr/util/SimplePostTool*.class"/>
<include name="org/apache/solr/util/RTimer.class"/>
<include name="org/apache/solr/util/RTimer$*.class"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="org.apache.solr.util.SimplePostTool"/>
</manifest>
</jar>
<echo>See ${common-solr.dir}/README.md for how to run the Solr server.</echo>
</target>
<target name="run-example" depends="server"
description="Run Solr interactively, via Jetty. -Dexample.debug=true to enable JVM debugger">
<property name="example.solr.home" location="${server.dir}/solr"/>
<property name="example.debug.suspend" value="n"/>
<property name="example.jetty.port" value="8983"/>
<condition property="example.jvm.line" value="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${example.debug.suspend},address=5005">
<isset property="example.debug"/>
</condition>
<property name="example.jvm.line" value=""/>
<property name="example.heap.size" value="512M"/>
<java jar="${server.dir}/start.jar" fork="true" dir="${server.dir}" maxmemory="${example.heap.size}">
<jvmarg line="${example.jvm.line}"/>
<arg value="--module=http"/>
<sysproperty key="solr.solr.home" file="${example.solr.home}"/>
<sysproperty key="jetty.port" value="${example.jetty.port}"/>
<sysproperty key="jetty.home" value="${server.dir}"/>
</java>
</target>
<!-- setup proxy for download tasks -->
<condition property="proxy.specified">
<or>
<isset property="proxy.host"/>
<isset property="proxy.port"/>
<isset property="proxy.user"/>
</or>
</condition>
<target name="proxy.setup" if="proxy.specified">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.password}"/>
</target>
<!-- ========================================================================= -->
<!-- ========================== BUILD/TEST TASKS ============================= -->
<!-- ========================================================================= -->
<!-- solr/test-framework is excluded from compilation -->
<target name="compile" description="Compile the source code."
depends="compile-core, compile-contrib"/>
<target name="test" description="Validate, then run core, solrj, and contrib unit tests."
depends="-init-totals, test-core, test-contrib, -check-totals"/>
<target name="test-nocompile">
<fail message="Target 'test-nocompile' will not run recursively. First change directory to the module you want to test."/>
</target>
<target name="jacoco" description="Generates JaCoCo code coverage reports." depends="-jacoco-install">
<!-- run jacoco for each module -->
<ant dir="${common-solr.dir}/core" target="jacoco" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="solrj" target="jacoco" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<contrib-crawl target="jacoco" failonerror="false"/>
<!-- produce aggregate report -->
<property name="jacoco.output.dir" location="${jacoco.report.dir}/solr-all"/>
<!-- try to clean output dir to prevent any confusion -->
<delete dir="${jacoco.output.dir}" failonerror="false"/>
<mkdir dir="${jacoco.output.dir}"/>
<jacoco:report>
<executiondata>
<fileset dir="${common-solr.dir}/build" includes="**/jacoco.db"/>
</executiondata>
<structure name="${Name} aggregate JaCoCo coverage report">
<classfiles>
<fileset dir="${common-solr.dir}/build">
<include name="**/classes/java/**/*.class"/>
<exclude name="solr-test-framework/**"/>
</fileset>
</classfiles>
<!-- TODO: trying to specify source files could maybe work, but would
double the size of the reports -->
</structure>
<html destdir="${jacoco.output.dir}" footer="Copyright ${year} Apache Software Foundation. All Rights Reserved."/>
</jacoco:report>
</target>
<!-- "-clover.load" is *not* a useless dependency. do not remove -->
<target name="test-core" description="Runs the core and solrj unit tests."
depends="-clover.load, test-solr-core, test-solrj"/>
<target name="pitest" description="Validate, then run core, solrj, and contrib unit tests."
depends="pitest-core, pitest-contrib"/>
<target name="beast">
<fail message="The Beast only works inside of individual modules"/>
</target>
<target name="compile-test" description="Compile core, solrj, and contrib unit tests, and solr-test-framework."
depends="compile-solr-test-framework, compile-test-solr-core, compile-test-solrj, compile-test-contrib"/>
<target name="javadocs" description="Calls javadocs-all, javadocs-solrj, and javadocs-test-framework"
depends="define-lucene-javadoc-url,javadocs-solr-core,javadocs-solrj,javadocs-test-framework,javadocs-contrib"/>
<target name="documentation" description="Generate all documentation"
depends="javadocs,changes-to-html,process-webpages">
<ant dir="solr-ref-guide" target="bare-bones-html-validation" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<property name="local.javadocs" value="true" />
</ant>
</target>
<target name="compile-core" depends="compile-solr-core" unless="solr.core.compiled"/>
<target name="documentation-online" description="Generate a link to the online documentation"
depends="define-solr-javadoc-url">
<xslt in="${ant.file}" out="${javadoc-online.dir}/index.html" style="site/online-link.xsl" force="true">
<outputproperty name="method" value="html"/>
<outputproperty name="version" value="4.0"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
<param name="version" expression="${version}"/>
<param name="solrJavadocUrl" expression="${solr.javadoc.url}"/>
</xslt>
<copy todir="${javadoc-online.dir}">
<fileset dir="site/assets" includes="**/solr.svg"/>
</copy>
</target>
<target name="process-webpages" depends="define-lucene-javadoc-url,resolve-markdown">
<makeurl property="process-webpages.buildfiles" separator="|">
<fileset dir="." includes="core/build.xml,test-framework/build.xml,solrj/build.xml,contrib/**/build.xml"/>
</makeurl>
<loadresource property="doc-solr-guide-version-path">
<propertyresource name="version"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex pattern="^(\d+)\.(\d+).*" replace="\1_\2"/>
</tokenfilter>
</filterchain>
</loadresource>
<!--
The XSL input file is ignored completely, but XSL expects one to be given,
so we pass ourself (${ant.file}) here. The list of module build.xmls is given
via string parameter, that must be splitted by the XSL at '|'.
-->
<xslt in="${ant.file}" out="${javadoc.dir}/index.html" style="site/index.xsl" force="true">
<outputproperty name="method" value="html"/>
<outputproperty name="version" value="4.0"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
<param name="buildfiles" expression="${process-webpages.buildfiles}"/>
<param name="version" expression="${version}"/>
<param name="luceneJavadocUrl" expression="${lucene.javadoc.url}"/>
<param name="solrGuideVersion" expression="${doc-solr-guide-version-path}"/>
</xslt>
<markdown todir="${javadoc.dir}">
<fileset dir="site" includes="**/*.md" excludes="**/*.template.md"/>
<globmapper from="*.md" to="*.html"/>
</markdown>
<copy todir="${javadoc.dir}">
<fileset dir="site/assets" />
</copy>
</target>
<target name="jar" depends="jar-core,jar-solrj,jar-solr-test-framework,jar-contrib"
description="Jar solr core, solrj, solr-test-framework, and all contribs"/>
<target name="jar-src"
description="Create source jars for solr core, solrj, solr-test-framework, and all contribs">
<ant dir="core" target="jar-src" inheritAll="false"/>
<ant dir="solrj" target="jar-src" inheritAll="false"/>
<ant dir="test-framework" target="jar-src" inheritAll="false"/>
<contrib-crawl target="jar-src"/>
</target>
<!-- Solr core targets -->
<target name="test-solr-core" description="Test solr core">
<ant dir="core" target="test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="jar-core">
<ant dir="${common-solr.dir}/core" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solrj targets -->
<target name="test-solrj" description="Test java client">
<ant dir="solrj" target="test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solr contrib targets -->
<target name="test-contrib" description="Run contrib unit tests.">
<contrib-crawl target="test"/>
</target>
<!-- Pitest targets -->
<target name="pitest-core" description="PiTest solr core">
<ant dir="core" target="pitest" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="pitest-solrj" description="PiTest java client">
<ant dir="solrj" target="pitest" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="pitest-contrib" description="Run contrib PiTests.">
<contrib-crawl target="pitest" failonerror="false"/>
</target>
<!-- test-framework targets -->
<target name="javadocs-test-framework">
<ant dir="test-framework" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Validation (license/notice/api checks). -->
<target name="validate" depends="check-example-lucene-match-version,check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
<target name="check-example-lucene-match-version">
<property name="configsets.dir" value="${server.dir}/solr/configsets"/>
<!-- validates all configset solrconfig files-->
<fail message="Some example solrconfig.xml files under ${configsets.dir} do not refer to the correct luceneMatchVersion: ${tests.luceneMatchVersion}">
<condition>
<resourcecount when="greater" count="0">
<fileset dir="${configsets.dir}" includes="**/solrconfig.xml">
<not>
<contains text="&lt;luceneMatchVersion&gt;${tests.luceneMatchVersion}&lt;" casesensitive="no"/>
</not>
</fileset>
</resourcecount>
</condition>
</fail>
<!-- validates remaining example solrconfig files-->
<fail message="Some example solrconfig.xml files under ${example} do not refer to the correct luceneMatchVersion: ${tests.luceneMatchVersion}">
<condition>
<resourcecount when="greater" count="0">
<fileset dir="${example}" includes="**/solrconfig.xml">
<not>
<contains text="&lt;luceneMatchVersion&gt;${tests.luceneMatchVersion}&lt;" casesensitive="no"/>
</not>
</fileset>
</resourcecount>
</condition>
</fail>
<!-- Count the immediate sub-directories of the configsets dir to ensure all sub-dirs have a solrconfig.xml -->
<resourcecount property="count.subdirs">
<dirset dir="${configsets.dir}" includes="*"/>
</resourcecount>
<!-- Ensure there is at least one sub-directory -->
<fail message="No sub-directories found under ${configsets.dir}">
<condition>
<equals arg1="${count.subdirs}" arg2="0"/>
</condition>
</fail>
<fail message="At least one sub-directory under ${configsets.dir} does not have a solrconfig.xml file">
<condition>
<resourcecount when="ne" count="${count.subdirs}">
<fileset dir="${configsets.dir}" includes="**/solrconfig.xml"/>
</resourcecount>
</condition>
</fail>
</target>
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
<property name="skipRegexChecksum" value=""/>
<license-check-macro dir="${basedir}" licensedir="${common-solr.dir}/licenses">
<additional-excludes>
<exclude name="example/exampledocs/post.jar" />
<exclude name="server/solr-webapp/**" />
<exclude name="package/**"/>
</additional-excludes>
<additional-filters>
<replaceregex pattern="^jetty([^/]+)$" replace="jetty" flags="gi" />
<!-- start.jar comes from jetty, .jar already stripped by checker defaults -->
<replaceregex pattern="^start$" replace="jetty" flags="gi" />
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
<replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
</additional-filters>
</license-check-macro>
</target>
<target name="check-forbidden-apis" depends="-install-forbidden-apis" description="Check forbidden API calls in compiled class files.">
<subant target="check-forbidden-apis" inheritall="false" >
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
</subant>
<contrib-crawl target="check-forbidden-apis"/>
</target>
<!-- rat sources -->
<!-- rat-sources-typedef is *not* a useless dependency. do not remove -->
<target name="rat-sources" depends="rat-sources-typedef,common.rat-sources">
<subant target="rat-sources" inheritall="false" >
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
<fileset dir="webapp" includes="build.xml"/>
</subant>
<contrib-crawl target="rat-sources"/>
</target>
<!-- Clean targets -->
<target name="clean" description="Cleans compiled files and other temporary artifacts.">
<delete dir="build" />
<delete dir="dist" />
<delete dir="package" />
<delete dir="server/solr/lib" />
<delete dir="example/solr/lib" />
<delete dir="example/cloud" />
<delete dir="example/techproducts" />
<delete dir="example/schemaless" />
<delete includeemptydirs="true">
<fileset dir="bin">
<include name="*.pid" />
</fileset>
<fileset dir="example">
<include name="**/data/**/*" />
<exclude name="**/.gitignore" />
</fileset>
<fileset dir="server">
<include name="**/data/**/*" />
<include name="solr/zoo_data/" />
<include name="start.jar" />
<include name="logs/*" />
<include name="webapps" />
<include name="solr-webapp/**/*" />
<exclude name="**/.gitignore" />
</fileset>
</delete>
</target>
<target name="clean-dest"
description="Cleans out build/ but leaves build/docs/, dist/ and package/ alone. This allows us to run nightly and clover together in Hudson">
<delete includeemptydirs="true" >
<fileset dir="build">
<exclude name="docs/"/>
</fileset>
</delete>
</target>
<!-- ========================================================================= -->
<!-- ===================== DISTRIBUTION-RELATED TASKS ======================== -->
<!-- ========================================================================= -->
<target name="dist"
description="Creates the Solr distribution files."
depends="dist-solrj, dist-core, dist-test-framework, dist-contrib" />
<target name="dist-test-framework" depends="init-dist"
description="Creates the Solr test-framework JAR.">
<ant dir="test-framework" target="dist" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="dist-contrib" depends="init-dist"
description="Make the contribs ready for distribution">
<contrib-crawl target="dist"/>
</target>
<target name="prepare-release-no-sign" depends="clean, package, generate-maven-artifacts"/>
<target name="prepare-release" depends="prepare-release-no-sign, sign-artifacts"/>
<!-- make a distribution -->
<target name="package" depends="package-src-tgz,create-package,documentation,-dist-changes"/>
<!-- copy changes/ to the release folder -->
<target name="-dist-changes">
<copy todir="${package.dir}/changes">
<fileset dir="build/docs/changes"/>
</copy>
</target>
<!-- Makes a tarball of the source. -->
<!-- Copies NOTICE.txt and LICENSE.txt from solr/ to the root level. -->
<target name="package-src-tgz" depends="init-dist"
description="Packages the Solr Source Distribution">
<property name="source.package.file"
location="${package.dir}/${fullnamever}-src.tgz"/>
<delete file="${source.package.file}" failonerror="false" />
<export-source source.dir=".."/>
<!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->
<delete dir="${src.export.dir}/lucene/tools/javadoc/java8"/>
<build-changes changes.src.file="${src.export.dir}/solr/CHANGES.txt"
changes.target.dir="${src.export.dir}/solr/docs/changes"
changes.product="solr"/>
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset dir="${src.export.dir}/lucene"
includes="CHANGES.txt"
fullpath="${fullnamever}/solr/LUCENE_CHANGES.txt" />
<tarfileset dir="${src.export.dir}"
prefix="${fullnamever}"
excludes="solr/example/**/*.sh solr/example/**/bin/ solr/scripts/** gradle/wrapper/gradle-wrapper.jar"/>
<tarfileset dir="${src.export.dir}"
prefix="${fullnamever}"
filemode="755"
includes="solr/example/**/*.sh solr/example/**/bin/ solr/scripts/**"/>
<tarfileset dir="${src.export.dir}/solr" prefix="${fullnamever}"
includes="NOTICE.txt,LICENSE.txt"/>
</tar>
<make-checksums file="${source.package.file}"/>
</target>
<target name="package-local-src-tgz"
description="Packages the Solr and Lucene sources from the local working copy">
<mkdir dir="${common-solr.dir}/build"/>
<property name="source.package.file"
value="${common-solr.dir}/build/${fullnamever}-src.tgz"/>
<delete file="${source.package.file}" failonerror="false" />
<!-- includes/excludes requires a relative path -->
<property name="dist.rel" location="${dist}" relative="yes"/>
<property name="package.dir.rel" location="${package.dir}" relative="yes"/>
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset dir=".." prefix="${fullnamever}" includes="*.txt *.xml dev-tools/" />
<tarfileset dir="." prefix="${fullnamever}" includes="LICENSE.txt NOTICE.txt"/>
<tarfileset dir="." prefix="${fullnamever}/solr"
excludes="build/** ${package.dir.rel}/** ${dist.rel}/**
example/lib/**
**/*.jar
lib/README.committers.txt **/data/ **/logs/*
**/*.sh **/bin/ scripts/
.idea/ **/*.iml **/pom.xml" />
<tarfileset dir="." prefix="${fullnamever}/solr"
includes="core/src/test-files/solr/lib/classes/empty-file-main-lib.txt" />
<tarfileset dir="." filemode="755" prefix="${fullnamever}/solr"
includes="**/*.sh **/bin/ scripts/"
excludes="build/**"/>
<tarfileset dir="../lucene" prefix="${fullnamever}/lucene">
<patternset refid="lucene.local.src.package.patterns"/>
</tarfileset>
</tar>
</target>
<target name="create-package"
description="Packages the Solr Binary Distribution">
<antcall inheritall="true">
<param name="called.from.create-package" value="true"/>
<propertyset refid="uptodate.and.compiled.properties"/>
<target name="init-dist"/>
<target name="dist"/>
<target name="server"/>
<target name="documentation-online"/>
</antcall>
<mkdir dir="${dest}/${fullnamever}"/>
<delete includeemptydirs="true">
<fileset dir="${dest}/${fullnamever}" includes="**/*"/>
</delete>
<delete file="${package.dir}/${fullnamever}.tgz" failonerror="false" />
<delete file="${package.dir}/${fullnamever}.zip" failonerror="false" />
<mkdir dir="${dest}/contrib-lucene-libs-to-package"/>
<delete dir="${dest}/contrib-lucene-libs-to-package" includes="**/*"/>
<contrib-crawl target="add-lucene-libs-to-package"/>
<tar destfile="${package.dir}/${fullnamever}.tgz" compression="gzip" longfile="gnu">
<tarfileset dir="../lucene"
includes="CHANGES.txt"
fullpath="${fullnamever}/LUCENE_CHANGES.txt" />
<tarfileset dir="."
prefix="${fullnamever}"
includes="LICENSE.txt NOTICE.txt CHANGES.txt README.md site/SYSTEM_REQUIREMENTS.md
bin/** server/** example/** contrib/**/lib/** contrib/**/conf/** contrib/**/README.md
licenses/**"
excludes="licenses/README.committers.txt **/data/ **/logs/*
**/classes/ **/*.sh **/ivy.xml **/build.xml
**/bin/ **/*.iml **/*.ipr **/*.iws **/pom.xml
**/*pom.xml.template server/etc/test/ contrib/**/src/" />
<tarfileset dir="${dest}/contrib-lucene-libs-to-package"
prefix="${fullnamever}"
includes="**" />
<tarfileset dir="."
filemode="755"
prefix="${fullnamever}"
includes="bin/** server/**/*.sh example/**/*.sh example/**/bin/ contrib/**/bin/**"
excludes="server/etc/test/**" />
<tarfileset dir="."
prefix="${fullnamever}"
includes="dist/*.jar
dist/solrj-lib/*
dist/test-framework/**"
excludes="**/*.tgz **/*.zip **/*.md5 **/*src*.jar **/*docs*.jar **/*.sha1 **/*.sha512" />
<tarfileset dir="${javadoc-online.dir}"
prefix="${fullnamever}/docs" />
</tar>
<make-checksums file="${package.dir}/${fullnamever}.tgz"/>
<untar compression="gzip" src="${package.dir}/${fullnamever}.tgz" dest="${dest}"/>
<!--
This is a list of text file patterns to convert to CRLF line-ending style.
Shell scripts and files included in shell scripts should not be converted.
NB: The line-ending conversion process will mangle non-UTF8-encoded files.
-->
<fixcrlf srcdir="${dest}/${fullnamever}"
encoding="UTF-8"
eol="crlf"
includes="**/*.alg **/*.cfg **/*.cgi **/*.cpp **/*.css **/*.csv **/*.dtd
**/*.erb **/*.fcgi **/.htaccess **/*.htm **/*.html **/*.incl
**/*.java **/*.javacc **/*.jflex **/*.jflex-macro **/*.jj
**/*.js **/*.json **/*.jsp **/*LICENSE **/package-list **/*.pl
**/*.pom **/*pom.xml.template **/*.properties **/*.py
**/*.rake **/Rakefile **/*.rb **/*.rbbi **/README* **/*.rhtml
**/*.rslp **/*.rxml **/*.script **/*.svg **/*.tsv **/*.txt
**/UPGRADING **/USAGE **/*.uxf **/*.vm **/*.xcat **/*.xml
**/*.xsl **/*.xslt **/*.yml"
excludes="**/stopwordsWrongEncoding.txt **/gb18030-example.xml"
/>
<zip destfile="${package.dir}/${fullnamever}.zip">
<zipfileset dir="${dest}/${fullnamever}"
prefix="${fullnamever}"
excludes="**/*.sh **/bin/ src/scripts/" />
<zipfileset dir="${dest}/${fullnamever}"
prefix="${fullnamever}"
includes="**/*.sh **/bin/ src/scripts/"
filemode="755" />
</zip>
<make-checksums file="${package.dir}/${fullnamever}.zip"/>
</target>
<target name="changes-to-html" depends="define-lucene-javadoc-url">
<build-changes changes.product="solr"/>
</target>
<target name="sign-artifacts">
<sign-artifacts-macro artifacts.dir="${package.dir}"/>
</target>
<target name="resolve" depends="resolve-example,resolve-server">
<sequential>
<ant dir="core" target="resolve" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="solrj" target="resolve" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="test-framework" target="resolve" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="server" target="resolve" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<ant dir="solr-ref-guide" target="resolve" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<contrib-crawl target="resolve"/>
</sequential>
</target>
<target name="documentation-lint" depends="-ecj-javadoc-lint,-documentation-lint-unsupported" if="documentation-lint.supported"
description="Validates the generated documentation (HTML errors, broken links,...)">
<!-- we use antcall here, otherwise ANT will run all dependent targets: -->
<antcall target="-documentation-lint"/>
</target>
<!-- TODO: does solr have any other docs we should check? -->
<!-- TODO: also integrate checkJavaDocs.py, which does more checks -->
<target name="-documentation-lint" depends="documentation">
<echo message="Checking for broken links..."/>
<check-broken-links dir="${javadoc.dir}"/>
<echo message="Checking for malformed docs..."/>
<!-- TODO: add missing docs for all classes and bump this to level=class -->
<check-missing-javadocs dir="${javadoc.dir}" level="package"/>
</target>
<target name="-ecj-javadoc-lint" depends="compile,compile-test,jar-test-framework,-ecj-javadoc-lint-unsupported,-ecj-resolve" if="ecj-javadoc-lint.supported">
<subant target="-ecj-javadoc-lint" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
</subant>
<contrib-crawl target="-ecj-javadoc-lint"/>
</target>
<!-- define-lucene-javadoc-url is *not* a useless dependencies. Do not remove! -->
<target name="-dist-maven" depends="install-maven-tasks,define-lucene-javadoc-url">
<sequential>
<m2-deploy pom.xml="${filtered.pom.templates.dir}/solr/pom.xml"/> <!-- Solr parent POM -->
<subant target="-dist-maven" inheritall="false" >
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
<fileset dir="webapp" includes="build.xml"/>
</subant>
<contrib-crawl target="-dist-maven"/>
</sequential>
</target>
<target name="-install-to-maven-local-repo" depends="install-maven-tasks">
<sequential>
<m2-install pom.xml="${filtered.pom.templates.dir}/solr/pom.xml"/> <!-- Solr parent POM -->
<subant target="-install-to-maven-local-repo" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
<fileset dir="webapp" includes="build.xml"/>
</subant>
<contrib-crawl target="-install-to-maven-local-repo"/>
</sequential>
</target>
<target name="generate-maven-artifacts" depends="-unpack-solr-tgz">
<ant dir=".." target="resolve" inheritall="false"/>
<antcall target="-filter-pom-templates" inheritall="false"/>
<antcall target="-dist-maven" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</antcall>
</target>
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
<sequential>
<subant target="-validate-maven-dependencies" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
<fileset dir="webapp" includes="build.xml"/>
</subant>
<contrib-crawl target="-validate-maven-dependencies"/>
</sequential>
</target>
<!-- ========================================================================= -->
<!-- ========================= COMMITTERS' HELPERS =========================== -->
<!-- ========================================================================= -->
<property name="analysis-common.res.dir" value="../lucene/analysis/common/src/resources/org/apache/lucene/analysis"/>
<property name="analysis-kuromoji.res.dir" value="../lucene/analysis/kuromoji/src/resources/org/apache/lucene/analysis"/>
<property name="analysis.conf.dest" value="${example}/solr/collection1/conf/lang"/>
<target name="sync-analyzers"
description="Committers' Helper: synchronizes analysis resources (e.g. stoplists) to the example">
<!-- arabic -->
<copy verbose="true" file="${analysis-common.res.dir}/ar/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_ar.txt"/>
<!-- bulgarian -->
<copy verbose="true" file="${analysis-common.res.dir}/bg/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_bg.txt"/>
<!-- catalan -->
<copy verbose="true" file="${analysis-common.res.dir}/ca/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_ca.txt"/>
<!-- kurdish -->
<copy verbose="true" file="${analysis-common.res.dir}/ckb/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_ckb.txt"/>
<!-- czech -->
<copy verbose="true" file="${analysis-common.res.dir}/cz/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_cz.txt"/>
<!-- danish -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/danish_stop.txt"
tofile="${analysis.conf.dest}/stopwords_da.txt"/>
<!-- german -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/german_stop.txt"
tofile="${analysis.conf.dest}/stopwords_de.txt"/>
<!-- greek -->
<copy verbose="true" file="${analysis-common.res.dir}/el/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_el.txt"/>
<!-- spanish -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/spanish_stop.txt"
tofile="${analysis.conf.dest}/stopwords_es.txt"/>
<!-- basque -->
<copy verbose="true" file="${analysis-common.res.dir}/eu/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_eu.txt"/>
<!-- persian -->
<copy verbose="true" file="${analysis-common.res.dir}/fa/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_fa.txt"/>
<!-- finnish -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/finnish_stop.txt"
tofile="${analysis.conf.dest}/stopwords_fi.txt"/>
<!-- french -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/french_stop.txt"
tofile="${analysis.conf.dest}/stopwords_fr.txt"/>
<!-- irish -->
<copy verbose="true" file="${analysis-common.res.dir}/ga/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_ga.txt"/>
<!-- galician -->
<copy verbose="true" file="${analysis-common.res.dir}/gl/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_gl.txt"/>
<!-- hindi -->
<copy verbose="true" file="${analysis-common.res.dir}/hi/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_hi.txt"/>
<!-- hungarian -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/hungarian_stop.txt"
tofile="${analysis.conf.dest}/stopwords_hu.txt"/>
<!-- armenian -->
<copy verbose="true" file="${analysis-common.res.dir}/hy/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_hy.txt"/>
<!-- indonesian -->
<copy verbose="true" file="${analysis-common.res.dir}/id/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_id.txt"/>
<!-- italian -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/italian_stop.txt"
tofile="${analysis.conf.dest}/stopwords_it.txt"/>
<!-- japanese -->
<copy verbose="true" file="${analysis-kuromoji.res.dir}/ja/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_ja.txt"/>
<copy verbose="true" file="${analysis-kuromoji.res.dir}/ja/stoptags.txt"
tofile="${analysis.conf.dest}/stoptags_ja.txt"/>
<!-- latvian -->
<copy verbose="true" file="${analysis-common.res.dir}/lv/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_lv.txt"/>
<!-- dutch -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/dutch_stop.txt"
tofile="${analysis.conf.dest}/stopwords_nl.txt"/>
<!-- norwegian -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/norwegian_stop.txt"
tofile="${analysis.conf.dest}/stopwords_no.txt"/>
<!-- portuguese -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/portuguese_stop.txt"
tofile="${analysis.conf.dest}/stopwords_pt.txt"/>
<!-- romanian -->
<copy verbose="true" file="${analysis-common.res.dir}/ro/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_ro.txt"/>
<!-- russian -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/russian_stop.txt"
tofile="${analysis.conf.dest}/stopwords_ru.txt"/>
<!-- swedish -->
<copy verbose="true" file="${analysis-common.res.dir}/snowball/swedish_stop.txt"
tofile="${analysis.conf.dest}/stopwords_sv.txt"/>
<!-- thai -->
<copy verbose="true" file="${analysis-common.res.dir}/th/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_th.txt"/>
<!-- turkish -->
<copy verbose="true" file="${analysis-common.res.dir}/tr/stopwords.txt"
tofile="${analysis.conf.dest}/stopwords_tr.txt"/>
</target>
<target name="jar-checksums" depends="resolve">
<jar-checksum-macro srcdir="${common-solr.dir}" dstdir="${common-solr.dir}/licenses"/>
</target>
<target name="-append-module-dependencies-properties">
<ant dir="core" target="-append-module-dependencies-properties" inheritAll="false"/>
<ant dir="solrj" target="-append-module-dependencies-properties" inheritAll="false"/>
<ant dir="test-framework" target="-append-module-dependencies-properties" inheritAll="false"/>
<contrib-crawl target="-append-module-dependencies-properties"/>
</target>
</project>

551
solr/common-build.xml Normal file
View File

@ -0,0 +1,551 @@
<!--
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.
-->
<project name="common-solr" default="default" xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
<description>
This file is designed for importing into a main build file, and not intended
for standalone use.
</description>
<dirname file="${ant.file.common-solr}" property="common-solr.dir"/>
<property name="Name" value="Solr" />
<!-- solr uses Java 11 -->
<property name="javac.release" value="11"/>
<property name="javac.args" value="-Xlint:-deprecation"/>
<property name="javac.profile.args" value=""/>
<property name="dest" location="${common-solr.dir}/build" />
<property name="build.dir" location="${dest}/${ant.project.name}"/>
<property name="jacoco.report.dir" location="${dest}/jacoco"/>
<property name="dist" location="${common-solr.dir}/dist"/>
<property name="package.dir" location="${common-solr.dir}/package"/>
<property name="maven.dist.dir" location="${package.dir}/maven"/>
<property name="lucene-libs" location="${dest}/lucene-libs" />
<property name="tests.userdir" location="src/test-files"/>
<property name="tests.policy" location="${common-solr.dir}/server/etc/security.policy"/>
<property name="server.dir" location="${common-solr.dir}/server" />
<property name="example" location="${common-solr.dir}/example" />
<property name="javadoc.dir" location="${dest}/docs"/>
<property name="javadoc-online.dir" location="${dest}/docs-online"/>
<property name="tests.cleanthreads.sysprop" value="perClass"/>
<property name="changes.target.dir" location="${dest}/docs/changes"/>
<property name="license.dir" location="${common-solr.dir}/licenses"/>
<property name="solr.tgz.unpack.dir" location="${common-solr.dir}/build/solr.tgz.unpacked"/>
<property name="dist.jar.dir.prefix" value="${solr.tgz.unpack.dir}/solr"/>
<property name="dist.jar.dir.suffix" value="dist"/>
<import file="${common-solr.dir}/../lucene/module-build.xml"/>
<property name="solr.tgz.file" location="${common-solr.dir}/package/solr-${version}.tgz"/>
<available file="${solr.tgz.file}" property="solr.tgz.exists"/>
<available type="dir" file="${solr.tgz.unpack.dir}" property="solr.tgz.unpack.dir.exists"/>
<target name="-ensure-solr-tgz-exists" unless="solr.tgz.exists">
<ant dir="${common-solr.dir}" target="create-package" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="-unpack-solr-tgz" unless="${solr.tgz.unpack.dir.exists}">
<antcall target="-ensure-solr-tgz-exists">
<propertyset refid="uptodate.and.compiled.properties"/>
</antcall>
<mkdir dir="${solr.tgz.unpack.dir}"/>
<untar compression="gzip" src="${solr.tgz.file}" dest="${solr.tgz.unpack.dir}">
<patternset refid="patternset.lucene.solr.jars"/>
</untar>
</target>
<!-- backwards compatibility with existing targets/tasks; TODO: remove this! -->
<property name="fullnamever" value="${final.name}"/>
<path id="additional.dependencies">
<fileset dir="${common-solr.dir}/core/lib" excludes="${common.classpath.excludes}"/>
<fileset dir="${common-solr.dir}/solrj/lib" excludes="${common.classpath.excludes}"/>
<fileset dir="${common-solr.dir}/server/lib" excludes="${common.classpath.excludes}"/>
<fileset dir="${common-solr.dir}/example/example-DIH/solr/db/lib" excludes="${common.classpath.excludes}"/>
<fileset dir="lib" excludes="${common.classpath.excludes}" erroronmissingdir="false"/>
</path>
<path id="solr.lucene.libs">
<!-- List of jars that will be used as the foundation for both
the base classpath, as well as copied into the lucene-libs dir
in the release.
-->
<!-- NOTE: lucene-core is explicitly not included because of the
base.classpath (compilation & tests are done directly against
the class files w/o needing to build the jar)
-->
<pathelement location="${analyzers-common.jar}"/>
<pathelement location="${analyzers-kuromoji.jar}"/>
<pathelement location="${analyzers-nori.jar}"/>
<pathelement location="${analyzers-phonetic.jar}"/>
<pathelement location="${codecs.jar}"/>
<pathelement location="${backward-codecs.jar}"/>
<pathelement location="${highlighter.jar}"/>
<pathelement location="${memory.jar}"/>
<pathelement location="${misc.jar}"/>
<pathelement location="${spatial-extras.jar}"/>
<pathelement location="${spatial3d.jar}"/>
<pathelement location="${expressions.jar}"/>
<pathelement location="${suggest.jar}"/>
<pathelement location="${grouping.jar}"/>
<pathelement location="${queries.jar}"/>
<pathelement location="${queryparser.jar}"/>
<pathelement location="${join.jar}"/>
<pathelement location="${sandbox.jar}"/>
<pathelement location="${classification.jar}"/>
</path>
<path id="solr.base.classpath">
<pathelement location="${common-solr.dir}/build/solr-solrj/classes/java"/>
<pathelement location="${common-solr.dir}/build/solr-core/classes/java"/>
<path refid="solr.lucene.libs" />
<path refid="additional.dependencies"/>
<path refid="base.classpath"/>
</path>
<path id="classpath" refid="solr.base.classpath"/>
<path id="solr.test.base.classpath">
<pathelement path="${common-solr.dir}/build/solr-test-framework/classes/java"/>
<fileset dir="${common-solr.dir}/test-framework/lib">
<include name="*.jar"/>
<exclude name="junit-*.jar" />
<exclude name="randomizedtesting-runner-*.jar" />
<exclude name="ant*.jar" />
</fileset>
<pathelement path="src/test-files"/>
<path refid="test.base.classpath"/>
</path>
<path id="test.classpath" refid="solr.test.base.classpath"/>
<macrodef name="solr-contrib-uptodate">
<attribute name="name"/>
<attribute name="property" default="@{name}.uptodate"/>
<attribute name="classpath.property" default="@{name}.jar"/>
<!-- set jarfile only, if the target jar file has no generic name -->
<attribute name="jarfile" default="${common-solr.dir}/build/contrib/solr-@{name}/solr-@{name}-${version}.jar"/>
<sequential>
<!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/java'"/>-->
<property name="@{classpath.property}" location="@{jarfile}"/>
<uptodate property="@{property}" targetfile="@{jarfile}">
<srcfiles dir="${common-solr.dir}/contrib/@{name}/src/java" includes="**/*.java"/>
</uptodate>
</sequential>
</macrodef>
<target name="validate" depends="compile-tools">
</target>
<target name="init-dist" depends="resolve-groovy">
<mkdir dir="${build.dir}"/>
<mkdir dir="${package.dir}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${maven.dist.dir}"/>
</target>
<target name="prep-lucene-jars"
depends="resolve-groovy,
jar-lucene-core, jar-backward-codecs, jar-analyzers-phonetic, jar-analyzers-kuromoji, jar-analyzers-nori, jar-codecs,jar-expressions, jar-suggest, jar-highlighter, jar-memory,
jar-misc, jar-spatial-extras, jar-spatial3d, jar-grouping, jar-queries, jar-queryparser, jar-join, jar-sandbox, jar-classification">
<property name="solr.deps.compiled" value="true"/>
</target>
<target name="lucene-jars-to-solr"
depends="-lucene-jars-to-solr-not-for-package,-lucene-jars-to-solr-package"/>
<target name="-lucene-jars-to-solr-not-for-package" unless="called.from.create-package">
<sequential>
<antcall target="prep-lucene-jars" inheritall="true"/>
<property name="solr.deps.compiled" value="true"/>
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<path refid="solr.lucene.libs" />
<!-- NOTE: lucene-core is not already included in "solr.lucene.libs" because of its use in classpaths. -->
<fileset file="${lucene-core.jar}" />
</copy>
</sequential>
</target>
<target name="-lucene-jars-to-solr-package" if="called.from.create-package">
<sequential>
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
<pathconvert property="relative.solr.lucene.libs" pathsep=",">
<path refid="solr.lucene.libs"/>
<fileset file="${lucene-core.jar}"/>
<globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
</pathconvert>
<mkdir dir="${lucene-libs}"/>
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<fileset dir="${lucene.tgz.unpack.dir}/lucene-${version}" includes="${relative.solr.lucene.libs}"/>
</copy>
</sequential>
</target>
<!-- Shared core/solrj/test-framework/contrib targets -->
<macrodef name="solr-jarify" description="Builds a Solr JAR file">
<attribute name="basedir" default="${build.dir}/classes/java"/>
<attribute name="destfile" default="${build.dir}/${final.name}.jar"/>
<attribute name="title" default="Apache Solr Search Server: ${ant.project.name}"/>
<attribute name="excludes" default="**/pom.xml,**/*.iml"/>
<attribute name="metainf.source.dir" default="${common-solr.dir}"/>
<attribute name="implementation.title" default="org.apache.solr"/>
<attribute name="manifest.file" default="${manifest.file}"/>
<element name="solr-jarify-filesets" optional="true"/>
<element name="solr-jarify-additional-manifest-attributes" optional="true"/>
<sequential>
<jarify basedir="@{basedir}" destfile="@{destfile}"
title="@{title}" excludes="@{excludes}"
metainf.source.dir="@{metainf.source.dir}"
implementation.title="@{implementation.title}"
manifest.file="@{manifest.file}">
<filesets>
<solr-jarify-filesets />
</filesets>
<jarify-additional-manifest-attributes>
<solr-jarify-additional-manifest-attributes />
</jarify-additional-manifest-attributes>
</jarify>
</sequential>
</macrodef>
<target name="jar-core" depends="compile-core">
<solr-jarify/>
</target>
<target name="compile-core" depends="prep-lucene-jars,resolve-example,resolve-server,common.compile-core"/>
<target name="compile-test" depends="compile-solr-test-framework,common.compile-test"/>
<target name="dist" depends="jar-core">
<copy file="${build.dir}/${fullnamever}.jar" todir="${dist}"/>
</target>
<property name="lucenedocs" location="${common.dir}/build/docs"/>
<!-- dependency to ensure all lucene javadocs are present -->
<target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-nori,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-backward-codecs,javadocs-codecs,javadocs-expressions,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial-extras,javadocs-join,javadocs-test-framework"/>
<!-- create javadocs for the current module -->
<target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs,javadocs-solr-core,check-javadocs-uptodate" unless="javadocs-uptodate-${name}">
<sequential>
<mkdir dir="${javadoc.dir}/${name}"/>
<solr-invoke-javadoc>
<solrsources>
<packageset dir="${src.dir}"/>
</solrsources>
<links>
<link href="../solr-solrj"/>
<link href="../solr-core"/>
</links>
</solr-invoke-javadoc>
<solr-jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
</sequential>
</target>
<target name="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
<uptodate property="solr-core-javadocs.uptodate" targetfile="${build.dir}/solr-core/solr-core-${version}-javadoc.jar">
<srcfiles dir="${common-solr.dir}/core/src/java" includes="**/*.java"/>
</uptodate>
</target>
<target name="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
<uptodate property="solrj-javadocs.uptodate" targetfile="${build.dir}/solr-solrj/solr-solrj-${version}-javadoc.jar">
<srcfiles dir="${common-solr.dir}/solrj/src/java" includes="**/*.java"/>
</uptodate>
</target>
<target name="javadocs-solr-core" depends="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
<ant dir="${common-solr.dir}/core" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr-core-javadocs.uptodate" value="true"/>
</target>
<target name="javadocs-solrj" depends="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
<ant dir="${common-solr.dir}/solrj" target="javadocs" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solrj-javadocs.uptodate" value="true"/>
</target>
<!-- macro to create solr javadocs with links to lucene. make sure calling task depends on lucene-javadocs -->
<macrodef name="solr-invoke-javadoc">
<element name="solrsources" optional="yes"/>
<element name="links" optional="yes"/>
<attribute name="destdir" default="${javadoc.dir}/${name}"/>
<attribute name="title" default="${Name} ${version} ${name} API"/>
<attribute name="overview" default="${src.dir}/overview.html"/>
<sequential>
<mkdir dir="@{destdir}"/>
<invoke-javadoc destdir="@{destdir}" title="@{title}" overview="@{overview}">
<sources>
<solrsources/>
<link offline="true" href="${lucene.javadoc.url}core" packagelistloc="${lucenedocs}/core"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-common" packagelistloc="${lucenedocs}/analyzers-common"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-icu" packagelistloc="${lucenedocs}/analyzers-icu"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-kuromoji" packagelistloc="${lucenedocs}/analyzers-kuromoji"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-nori" packagelistloc="${lucenedocs}/analyzers-nori"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-morfologik" packagelistloc="${lucenedocs}/analyzers-morfologik"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-phonetic" packagelistloc="${lucenedocs}/analyzers-phonetic"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-smartcn" packagelistloc="${lucenedocs}/analyzers-smartcn"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-stempel" packagelistloc="${lucenedocs}/analyzers-stempel"/>
<link offline="true" href="${lucene.javadoc.url}backward-codecs" packagelistloc="${lucenedocs}/backward-codecs"/>
<link offline="true" href="${lucene.javadoc.url}codecs" packagelistloc="${lucenedocs}/codecs"/>
<link offline="true" href="${lucene.javadoc.url}expressions" packagelistloc="${lucenedocs}/expressions"/>
<link offline="true" href="${lucene.javadoc.url}suggest" packagelistloc="${lucenedocs}/suggest"/>
<link offline="true" href="${lucene.javadoc.url}grouping" packagelistloc="${lucenedocs}/grouping"/>
<link offline="true" href="${lucene.javadoc.url}join" packagelistloc="${lucenedocs}/join"/>
<link offline="true" href="${lucene.javadoc.url}queries" packagelistloc="${lucenedocs}/queries"/>
<link offline="true" href="${lucene.javadoc.url}queryparser" packagelistloc="${lucenedocs}/queryparser"/>
<link offline="true" href="${lucene.javadoc.url}highlighter" packagelistloc="${lucenedocs}/highlighter"/>
<link offline="true" href="${lucene.javadoc.url}memory" packagelistloc="${lucenedocs}/memory"/>
<link offline="true" href="${lucene.javadoc.url}misc" packagelistloc="${lucenedocs}/misc"/>
<link offline="true" href="${lucene.javadoc.url}classification" packagelistloc="${lucenedocs}/classification"/>
<link offline="true" href="${lucene.javadoc.url}spatial-extras" packagelistloc="${lucenedocs}/spatial-extras"/>
<links/>
<link href=""/>
</sources>
</invoke-javadoc>
</sequential>
</macrodef>
<target name="define-lucene-javadoc-url" depends="resolve-groovy" unless="lucene.javadoc.url">
<property name="useLocalJavadocUrl" value=""/>
<groovy><![CDATA[
String url, version = properties['version'];
String useLocalJavadocUrl = properties['useLocalJavadocUrl'];
if (version != properties['version.base'] || Boolean.parseBoolean(useLocalJavadocUrl)) {
url = new File(properties['common.dir'], 'build' + File.separator + 'docs').toURI().toASCIIString();
if (!(url =~ /\/$/)) url += '/';
} else {
version = version.replace('.', '_');
url = 'https://lucene.apache.org/core/' + version + '/';
}
task.log('Using the following URL to refer to Lucene Javadocs: ' + url);
properties['lucene.javadoc.url'] = url;
]]></groovy>
</target>
<target name="define-solr-javadoc-url" depends="resolve-groovy" unless="solr.javadoc.url">
<groovy><![CDATA[
String url, version = properties['version'];
if (version != properties['version.base']) {
url = '';
task.log('Disabled Solr Javadocs online URL for packaging (custom build / SNAPSHOT version).');
} else {
version = version.replace('.', '_');
url = 'https://lucene.apache.org/solr/' + version + '/';
task.log('Using the following URL to refer to Solr Javadocs: ' + url);
}
properties['solr.javadoc.url'] = url;
]]></groovy>
</target>
<target name="jar-src">
<sequential>
<mkdir dir="${build.dir}"/>
<solr-jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar">
<solr-jarify-filesets>
<fileset dir="${resources.dir}" erroronmissingdir="no"/>
</solr-jarify-filesets>
</solr-jarify>
</sequential>
</target>
<target name="-validate-maven-dependencies" depends="-validate-maven-dependencies.init">
<m2-validate-dependencies pom.xml="${maven.pom.xml}" licenseDirectory="${license.dir}">
<additional-filters>
<replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
<replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
</additional-filters>
<excludes>
<rsel:or>
<rsel:name name="**/lucene-*-${maven.version.glob}.jar" handledirsep="true"/>
<rsel:name name="**/solr-*-${maven.version.glob}.jar" handledirsep="true"/>
<!-- TODO: figure out what is going on here with servlet-apis -->
<rsel:name name="**/*servlet*.jar" handledirsep="true"/>
</rsel:or>
</excludes>
</m2-validate-dependencies>
</target>
<!-- Solr core targets -->
<target name="compile-solr-core" description="Compile Solr core." unless="solr.core.compiled">
<ant dir="${common-solr.dir}/core" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.core.compiled" value="true"/>
</target>
<target name="compile-test-solr-core" description="Compile solr core tests">
<ant dir="${common-solr.dir}/core" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.core.compiled" value="true"/>
</target>
<target name="dist-core" depends="init-dist"
description="Creates the Solr JAR Distribution file.">
<ant dir="${common-solr.dir}/core" target="dist" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solrj targets -->
<target name="compile-solrj" description="Compile the java client." unless="solrj.compiled">
<ant dir="${common-solr.dir}/solrj" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solrj.compiled" value="true"/>
</target>
<target name="compile-test-solrj" description="Compile java client tests">
<ant dir="${common-solr.dir}/solrj" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solrj.compiled" value="true"/>
</target>
<target name="dist-solrj" depends="init-dist"
description="Creates the Solr-J JAR Distribution file.">
<ant dir="${common-solr.dir}/solrj" target="dist" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="jar-solrj" description="Jar Solr-J">
<ant dir="${common-solr.dir}/solrj" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solr test-framework targets -->
<target name="compile-solr-test-framework" description="Compile the Solr test-framework" unless="solr.test.framework.compiled">
<ant dir="${common-solr.dir}/test-framework" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.core.compiled" value="true"/>
<property name="solr.test.framework.compiled" value="true"/>
</target>
<target name="jar-solr-test-framework" depends="compile-solr-test-framework">
<ant dir="${common-solr.dir}/test-framework" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- resolve dependencies in the example (relied upon by compile/tests) -->
<target name="resolve-example" unless="example.libs.uptodate">
<ant dir="${common-solr.dir}/example/example-DIH" target="resolve" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="example.libs.uptodate" value="true"/>
</target>
<!-- resolve dependencies in the server directory (relied upon by compile/tests) -->
<target name="resolve-server" unless="server.libs.uptodate">
<ant dir="${common-solr.dir}/server" target="resolve" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="server.libs.uptodate" value="true"/>
</target>
<macrodef name="contrib-crawl">
<attribute name="target" default=""/>
<attribute name="failonerror" default="true"/>
<sequential>
<subant target="@{target}" failonerror="@{failonerror}" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="." includes="contrib/*/build.xml"/>
</subant>
</sequential>
</macrodef>
<target name="-compile-test-lucene-analysis">
<ant dir="${common.dir}/analysis" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="-compile-test-lucene-queryparser">
<ant dir="${common.dir}/queryparser" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="-compile-test-lucene-backward-codecs">
<ant dir="${common.dir}/backward-codecs" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solr contrib targets -->
<target name="-compile-analysis-extras">
<ant dir="${common-solr.dir}/contrib/analysis-extras" target="compile" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-contrib" description="Compile contrib modules">
<contrib-crawl target="compile-core"/>
</target>
<target name="compile-test-contrib" description="Compile contrib modules' tests">
<contrib-crawl target="compile-test"/>
</target>
<target name="javadocs-contrib" description="Compile contrib modules">
<contrib-crawl target="javadocs"/>
</target>
<target name="jar-contrib" description="Jar contrib modules">
<contrib-crawl target="jar-core"/>
</target>
<target name="contribs-add-to-webapp">
<mkdir dir="${dest}/web"/>
<delete dir="${dest}/web" includes="**/*" failonerror="false"/>
<contrib-crawl target="add-to-webapp"/>
</target>
<!-- Forbidden API Task, customizations for Solr -->
<target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test">
<property prefix="ivyversions" file="${common.dir}/ivy-versions.properties"/><!-- for commons-io version -->
<forbidden-apis suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath" targetVersion="${javac.release}">
<signatures>
<bundled name="jdk-unsafe"/>
<bundled name="jdk-deprecated"/>
<bundled name="jdk-non-portable"/>
<bundled name="jdk-reflection"/>
<bundled name="commons-io-unsafe-${ivyversions./commons-io/commons-io}"/>
<fileset dir="${common.dir}/tools/forbiddenApis">
<include name="base.txt" />
<include name="servlet-api.txt" />
<include name="solr.txt" />
</fileset>
</signatures>
<fileset dir="${build.dir}/classes/java" excludes="${forbidden-base-excludes}"/>
<fileset dir="${build.dir}/classes/test" excludes="${forbidden-tests-excludes}" erroronmissingdir="false"/>
</forbidden-apis>
</target>
<!-- hack for now to disable *all* Solr tests on Jenkins when "tests.disable-solr" property is set -->
<target name="test" unless="tests.disable-solr">
<antcall target="common.test" inheritrefs="true" inheritall="true"/>
</target>
</project>

View File

@ -0,0 +1,92 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="solr-analysis-extras" default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Additional analysis components
</description>
<import file="../contrib-build.xml"/>
<target name="compile-test" depends="-compile-test-lucene-analysis,common-solr.compile-test"/>
<path id="analysis.extras.lucene.libs">
<pathelement location="${analyzers-icu.jar}"/>
<!--
Although the smartcn, stempel, morfologik and opennlp jars are not dependencies of
code in the analysis-extras contrib, they must remain here in order to
populate the Solr distribution
-->
<pathelement location="${analyzers-smartcn.jar}"/>
<pathelement location="${analyzers-stempel.jar}"/>
<pathelement location="${analyzers-morfologik.jar}"/>
<pathelement location="${analyzers-opennlp.jar}"/>
</path>
<path id="classpath">
<fileset dir="lib" excludes="${common.classpath.excludes}"/>
<path refid="analysis.extras.lucene.libs" />
<path refid="solr.base.classpath"/>
</path>
<path id="test.classpath">
<path refid="solr.test.base.classpath"/>
<dirset dir="${common.dir}/build/analysis/">
<include name="**/classes/java"/>
<include name="**/classes/test"/>
</dirset>
</path>
<!--
Although the smartcn, stempel, morfologik and opennlp jars are not dependencies of
code in the analysis-extras contrib, they must remain here in order to
populate the Solr distribution
-->
<target name="module-jars-to-solr"
depends="-module-jars-to-solr-not-for-package,-module-jars-to-solr-package"/>
<target name="-module-jars-to-solr-not-for-package" unless="called.from.create-package">
<antcall inheritall="true">
<target name="jar-analyzers-icu"/>
<target name="jar-analyzers-smartcn"/>
<target name="jar-analyzers-stempel"/>
<target name="jar-analyzers-morfologik"/>
<target name="jar-analyzers-opennlp"/>
</antcall>
<property name="analyzers-icu.uptodate" value="true"/> <!-- compile-time dependency -->
<mkdir dir="${build.dir}/lucene-libs"/>
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<path refid="analysis.extras.lucene.libs" />
</copy>
</target>
<target name="-module-jars-to-solr-package" if="called.from.create-package">
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
<pathconvert property="relative.analysis.extras.lucene.libs" pathsep=",">
<path refid="analysis.extras.lucene.libs"/>
<globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
</pathconvert>
<mkdir dir="${build.dir}/lucene-libs"/>
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<fileset dir="${lucene.tgz.unpack.dir}/lucene-${version}" includes="${relative.analysis.extras.lucene.libs}"/>
</copy>
</target>
<target name="compile-core" depends="jar-analyzers-icu, jar-analyzers-opennlp, solr-contrib-build.compile-core"/>
<target name="dist" depends="module-jars-to-solr, common-solr.dist"/>
</project>

View File

@ -0,0 +1,41 @@
<!--
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.
-->
<ivy-module version="2.0">
<info organisation="org.apache.solr" module="analysis-extras"/>
<configurations defaultconfmapping="compile->master;test->master">
<conf name="compile" transitive="false"/>
<conf name="test" transitive="false"/>
</configurations>
<dependencies>
<dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" conf="compile"/>
<dependency org="org.apache.opennlp" name="opennlp-tools" rev="${/org.apache.opennlp/opennlp-tools}" conf="compile" />
<!--
Although the 3rd party jars are not dependencies of code in
the analysis-extras contrib, they must remain here in order to
populate the Solr distribution
-->
<dependency org="org.carrot2" name="morfologik-polish" rev="${/org.carrot2/morfologik-polish}" conf="compile"/>
<dependency org="org.carrot2" name="morfologik-fsa" rev="${/org.carrot2/morfologik-fsa}" conf="compile"/>
<dependency org="org.carrot2" name="morfologik-stemming" rev="${/org.carrot2/morfologik-stemming}" conf="compile"/>
<dependency org="ua.net.nlp" name="morfologik-ukrainian-search" rev="${/ua.net.nlp/morfologik-ukrainian-search}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -0,0 +1,28 @@
<?xml version="1.0"?>
<!--
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.
-->
<project name="solr-analytics" default="default">
<description>
Analytics Package
</description>
<import file="../contrib-build.xml"/>
</project>

Some files were not shown because too many files have changed in this diff Show More