You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2014/01/22 07:07:04 UTC

svn commit: r1560260 - in /lucene/dev/trunk/lucene: CHANGES.txt analysis/common/build.xml common-build.xml

Author: sarowe
Date: Wed Jan 22 06:07:04 2014
New Revision: 1560260

URL: http://svn.apache.org/r1560260
Log:
LUCENE-5411: Upgrade to released JFlex 1.5.0; stop requiring a locally built JFlex snapshot jar.

Modified:
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/analysis/common/build.xml
    lucene/dev/trunk/lucene/common-build.xml

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1560260&r1=1560259&r2=1560260&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Wed Jan 22 06:07:04 2014
@@ -143,6 +143,9 @@ Build
 
 * LUCENE-5383: fix changes2html to link pull requests (Steve Rowe)
 
+* LUCENE-5411: Upgrade to released JFlex 1.5.0; stop requiring
+  a locally built JFlex snapshot jar. (Steve Rowe)
+
 Bug fixes
 
 * LUCENE-5285: Improved highlighting of multi-valued fields with

Modified: lucene/dev/trunk/lucene/analysis/common/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/build.xml?rev=1560260&r1=1560259&r2=1560260&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/common/build.xml (original)
+++ lucene/dev/trunk/lucene/analysis/common/build.xml Wed Jan 22 06:07:04 2014
@@ -29,7 +29,7 @@
 
   <import file="../analysis-module-build.xml"/>
 	
-  <target name="jflex" depends="jflex-check,clean-jflex,-gen-uax29-supp-macros,
+  <target name="jflex" depends="-install-jflex,clean-jflex,-gen-uax29-supp-macros,
                                 -jflex-StandardAnalyzer,-jflex-UAX29URLEmailTokenizer,
                                 -jflex-wiki-tokenizer,-jflex-HTMLStripCharFilter"/>
 
@@ -40,11 +40,7 @@
   </target>
 
   <target name="-jflex-HTMLStripCharFilter"
-          depends="init,jflex-check,generate-jflex-html-char-entities"
-          if="jflex.present">
-    <taskdef classname="jflex.anttask.JFlexTask" name="jflex">
-      <classpath refid="jflex.classpath"/>
-    </taskdef>
+          depends="init,generate-jflex-html-char-entities">
     <jflex file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex"
            outdir="src/java/org/apache/lucene/analysis/charfilter"
            nobak="on" inputstreamctor="false"/>
@@ -65,25 +61,16 @@
     <fixcrlf file="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex" encoding="UTF-8"/>
   </target>
 
-  <target name="-jflex-wiki-tokenizer" depends="init,jflex-check" if="jflex.present">
-    <taskdef classname="jflex.anttask.JFlexTask" name="jflex">
-      <classpath refid="jflex.classpath"/>
-    </taskdef>
+  <target name="-jflex-wiki-tokenizer" depends="init,-install-jflex">
     <run-jflex dir="src/java/org/apache/lucene/analysis/wikipedia" name="WikipediaTokenizerImpl"/>
   </target>
 
-  <target name="-jflex-StandardAnalyzer" depends="init,jflex-check" if="jflex.present">
-    <taskdef classname="jflex.anttask.JFlexTask" name="jflex">
-			<classpath refid="jflex.classpath"/>
-    </taskdef>
+  <target name="-jflex-StandardAnalyzer" depends="init,-install-jflex">
     <run-jflex dir="src/java/org/apache/lucene/analysis/standard" name="StandardTokenizerImpl"/>
     <run-jflex dir="src/java/org/apache/lucene/analysis/standard" name="ClassicTokenizerImpl"/>
   </target>
 
-  <target name="-jflex-UAX29URLEmailTokenizer" depends="jflex-check" if="jflex.present">
-    <taskdef classname="jflex.anttask.JFlexTask" name="jflex">
-			<classpath refid="jflex.classpath"/>
-    </taskdef>
+  <target name="-jflex-UAX29URLEmailTokenizer" depends="init,-install-jflex">
     <run-jflex dir="src/java/org/apache/lucene/analysis/standard" name="UAX29URLEmailTokenizerImpl"/>
   </target>
   

Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1560260&r1=1560259&r2=1560260&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Wed Jan 22 06:07:04 2014
@@ -227,17 +227,6 @@
   <property name="m2.repository.id" value="local"/>
   <property name="m2.credentials.prompt" value="true"/>
 
-  <property name="jflex.home" location="${common.dir}"/>
-
-  <path id="jflex.classpath">
-    <fileset dir="${jflex.home}/">
-      <!-- for a JFlex trunk checkout: -->
-      <include name="jflex/target/*.jar"/>
-      <!-- for a JFlex distribution (not yet available): -->
-      <include name="lib/*.jar"/>
-    </fileset>
-  </path>
-
   <property name="backwards.dir" location="backwards"/>
   <property name="build.dir.backwards" location="${build.dir}/backwards"/>
 
@@ -472,31 +461,6 @@
     </sequential>
   </macrodef>
 
-  <target name="jflex-check">
-    <available property="jflex.present" classname="jflex.anttask.JFlexTask">
-      <classpath refid="jflex.classpath"/>
-    </available>
-    <fail unless="jflex.present">&#xA0;
-      ##################################################################
-      JFlex not found.
-      JFlex Home: ${jflex.home}
-
-      Please install the jFlex 1.5 version (currently not released)
-      from its SVN repository:
-
-       svn co -r 722 https://svn.code.sf.net/p/jflex/code/trunk jflex
-       cd jflex
-       mvn install
-
-      Then, create a build.properties file either in your home
-      directory, or within the Lucene directory and set the jflex.home
-      property to the path where the JFlex trunk checkout is located
-      (in the above example it's the directory called "jflex").
-
-      ##################################################################
-    </fail>
-  </target>
-
   <target name="compile-core" depends="init, clover"
           description="Compiles core classes">
     <compile
@@ -2197,7 +2161,15 @@ ${ant.project.name}.test.dependencies=${
       </scp>
     </sequential>
   </macrodef>
-  
+
+  <!-- JFlex task -->
+  <target name="-install-jflex" unless="jflex.loaded" depends="ivy-availability-check,ivy-configure">
+    <ivy:cachepath organisation="de.jflex" module="jflex" revision="1.5.0"
+                   inline="true" conf="default" transitive="true" pathid="jflex.classpath"/>
+    <taskdef name="jflex" classname="jflex.anttask.JFlexTask" classpathref="jflex.classpath"/>
+    <property name="jflex.loaded" value="true"/>
+  </target>
+
   <!-- GROOVY scripting engine for ANT tasks -->
   <target name="resolve-groovy" unless="groovy.loaded" depends="ivy-availability-check,ivy-configure">
     <ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.2.1"