2009-07-23 13:11:22 -04:00
|
|
|
<?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.
|
|
|
|
-->
|
|
|
|
|
2010-05-05 10:26:59 -04:00
|
|
|
<project name="analyzers-common" default="default">
|
2009-07-23 13:11:22 -04:00
|
|
|
|
|
|
|
<description>
|
2010-05-05 10:26:59 -04:00
|
|
|
Analyzers
|
2009-07-23 13:11:22 -04:00
|
|
|
</description>
|
|
|
|
|
2010-05-05 10:26:59 -04:00
|
|
|
<property name="build.dir" location="../build/common" />
|
|
|
|
<property name="dist.dir" location="../dist/common" />
|
2009-07-23 13:11:22 -04:00
|
|
|
|
2010-05-05 10:26:59 -04:00
|
|
|
<import file="../../../lucene/contrib/contrib-build.xml"/>
|
2009-07-23 13:11:22 -04:00
|
|
|
|
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="classpath"/>
|
2011-02-06 14:48:54 -05:00
|
|
|
<pathelement location="../../../lucene/build/classes/test-framework"/>
|
2010-05-05 10:26:59 -04:00
|
|
|
<pathelement location="../../../lucene/build/classes/test/"/>
|
2009-07-23 13:11:22 -04:00
|
|
|
<path refid="junit-path"/>
|
|
|
|
<pathelement location="${build.dir}/classes/java"/>
|
|
|
|
</path>
|
2010-04-09 14:40:55 -04:00
|
|
|
|
2010-04-10 07:42:53 -04:00
|
|
|
<target name="compile-core" depends="jflex-notice, common.compile-core"/>
|
|
|
|
|
2011-01-06 08:51:10 -05:00
|
|
|
<target name="jflex" depends="jflex-check,clean-jflex,gen-uax29-supp-macros,
|
|
|
|
jflex-StandardAnalyzer,jflex-UAX29URLEmailTokenizer,jflex-wiki-tokenizer"/>
|
2010-04-09 14:40:55 -04:00
|
|
|
|
2011-01-06 08:51:10 -05:00
|
|
|
<target name="gen-uax29-supp-macros">
|
|
|
|
<subant target="gen-uax29-supp-macros">
|
|
|
|
<fileset dir="../icu" includes="build.xml"/>
|
|
|
|
</subant>
|
|
|
|
</target>
|
|
|
|
|
2010-04-09 14:40:55 -04:00
|
|
|
<target name="jflex-wiki-tokenizer" depends="init,jflex-check" if="jflex.present">
|
2010-04-10 07:42:53 -04:00
|
|
|
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
|
|
|
<classpath refid="jflex.classpath"/>
|
2010-04-09 14:40:55 -04:00
|
|
|
</taskdef>
|
|
|
|
<jflex file="src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex"
|
|
|
|
outdir="src/java/org/apache/lucene/analysis/wikipedia"
|
|
|
|
nobak="on"/>
|
|
|
|
</target>
|
|
|
|
|
2010-09-28 02:16:16 -04:00
|
|
|
<target name="jflex-StandardAnalyzer" depends="init,jflex-check,gen-tlds" if="jflex.present">
|
2010-05-25 16:16:44 -04:00
|
|
|
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
|
|
|
<classpath refid="jflex.classpath"/>
|
|
|
|
</taskdef>
|
|
|
|
|
2010-09-28 02:16:16 -04:00
|
|
|
<jflex file="src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex"
|
2010-05-25 16:16:44 -04:00
|
|
|
outdir="src/java/org/apache/lucene/analysis/standard"
|
|
|
|
nobak="on" />
|
2010-09-28 02:16:16 -04:00
|
|
|
<jflex file="src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex"
|
2010-05-25 16:16:44 -04:00
|
|
|
outdir="src/java/org/apache/lucene/analysis/standard"
|
|
|
|
nobak="on" />
|
|
|
|
</target>
|
|
|
|
|
2010-12-07 09:53:13 -05:00
|
|
|
<target name="jflex-UAX29URLEmailTokenizer" depends="jflex-check" if="jflex.present">
|
2010-09-28 02:16:16 -04:00
|
|
|
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
|
|
|
<classpath refid="jflex.classpath"/>
|
|
|
|
</taskdef>
|
2010-12-07 09:53:13 -05:00
|
|
|
<jflex file="src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.jflex"
|
2010-09-28 02:16:16 -04:00
|
|
|
outdir="src/java/org/apache/lucene/analysis/standard"
|
|
|
|
nobak="on" />
|
|
|
|
</target>
|
|
|
|
|
2010-04-09 14:40:55 -04:00
|
|
|
<target name="clean-jflex">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="src/java/org/apache/lucene/analysis/wikipedia" includes="*.java">
|
|
|
|
<containsregexp expression="generated.*by.*JFlex"/>
|
|
|
|
</fileset>
|
2010-05-25 16:16:44 -04:00
|
|
|
<fileset dir="src/java/org/apache/lucene/analysis/standard" includes="*.java">
|
2010-09-28 02:16:16 -04:00
|
|
|
<containsregexp expression="generated.*by.*JFlex"/>
|
2010-05-25 16:16:44 -04:00
|
|
|
</fileset>
|
2010-04-09 14:40:55 -04:00
|
|
|
</delete>
|
|
|
|
</target>
|
2010-09-28 02:16:16 -04:00
|
|
|
|
|
|
|
<property name="tld.zones" value="http://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}"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2011-05-30 20:08:14 -04:00
|
|
|
<target name="compile-tools" depends="common.compile-tools">
|
2010-09-28 02:16:16 -04:00
|
|
|
<compile
|
|
|
|
srcdir="src/tools/java"
|
|
|
|
destdir="${build.dir}/classes/tools">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</compile>
|
|
|
|
</target>
|
2009-07-23 13:11:22 -04:00
|
|
|
</project>
|