Martin Gainty created LUCENE-6102: ------------------------------------- Summary: regenerate bug Key: LUCENE-6102 URL: https://issues.apache.org/jira/browse/LUCENE-6102 Project: Lucene - Core Issue Type: Bug Components: general/build Affects Versions: 4.10.2 Environment: PYTHON 2.6 JDK 1.7.0.45 ANT 1.9.2 Reporter: Martin Gainty
<!--attempt to run python w/o PYTHONHOME and PYTHONPATH defined causes regenerate task to fubar and not generate .jflex file --> <!-- fix is here --> <target name="regenerate" > <property name="python.exe" value="%CYGWIN_HOME%/bin/python.exe" /> <!-- target name="generate-jflex-html-char-entities" --> <echo>Running ${python.exe} on htmlentity.py</echo> <exec executable="cmd.exe"> <arg value="/c"/> <arg value="pythonit.bat"/> </exec> <fixcrlf file="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex" encoding="UTF-8"/> </target> <!--end contents of pythonit.<bat/sh> --> <!--this will gen the Impl.java from the .jflex input --> <target name="jflex-HTMLCharacterEntities" depends="regenerate"> <taskdef name="jflex-1.5.1" classname="JFlex.anttask.JFlexTask" classpath="%ANT_HOME%/lib"/> <echo>Run jflex-HTMLCharacterEntities</echo> <!-- run-jflex-and-disable-buffer-expansion dir="%LUCENE_HOME%/analysis/common/src/java/org/apache/lucene/analysis/standard" name="StandardTokenizerImpl"/ --> <property name="dir" value="%LUCENE_HOME%/analysis/common/src/java/org/apache/lucene/analysis/standard" /> <property name="name" value="HTMLCharacterEntitiesImpl" /> <jflex-1.5.1 file="%LUCENE_HOME%/analysis/common/src/java/org/apache/lucene/charfilter/HTMLCharacterEntities.jflex" outdir="%LUCENE_HOME%/analysis/common/src/java/org/apache/lucene/charfilter" nobak="off" /> <!-- /macrodef --> </target> when I regen'ed HTMLCharacterEntities.jflex I wanted to use jflex to generate the HtmlCharacterEntitiesImpl.java file the above target jflex-HTMLCharacterEntities will gen that file for you Nota Bene; take note of the bat/sh that properly sets PYTHONHOME and PYTHONPATH so Python can locate subordinate .pyc components I also had to tweak Gerwin Kleins JFlex library from 2003 to take inputFile and outputDir parameters Erik/Michael: does the original regenerate work for you? Martin Gainty 8 Dec 2014 -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org