<?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
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
</description>
<!-- some files for testing that do not have license headers -->
<property name="rat.excludes" value="**/*.aff,**/*.dic,**/*.txt,**/charfilter/*.htm*,**/resUTF8.htm"/>
<import file="/contrib-build.xml"/>
<target name="jflex" depends="jflex-check,clean-jflex,jflex-wiki-tokenizer,jflex-HTMLStripCharFilter"/>
<target name="jflex-HTMLStripCharFilter"
depends="init,jflex-check,generate-jflex-html-char-entities"
if="jflex.present">
<classpath refid="jflex.classpath"/>
</taskdef>
<jflex file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex"
nobak="on"/>
<!-- Remove the inappropriate JFlex-generated constructors -->
<replaceregexp file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java"
match="/\*\*\s*\*\s*Creates a new scanner.*this\(new java\.io\.InputStreamReader\(in\)\);\s*\}"
replace="" flags="sg"/>
</target>
<target name="generate-jflex-html-char-entities">
<arg value="htmlentity.py"/>
</exec>
</target>
<classpath refid="jflex.classpath"/>
</taskdef>
nobak="on"/>
</target>
<target name="clean-jflex">
<delete>
<containsregexp expression="generated.*by.*JFlex"/>
</fileset>
</delete>
</target>
</project>