| <?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"/> |
| |
| <property name="forbidden-sysout-excludes" value=" |
| org/apache/lucene/index/CheckIndex.class |
| org/apache/lucene/index/IndexUpgrader.class |
| org/apache/lucene/store/LockVerifyServer.class |
| org/apache/lucene/store/LockStressTest.class |
| org/apache/lucene/util/PrintStreamInfoStream.class |
| "/> |
| |
| <import file="../common-build.xml"/> |
| |
| <property name="moman.commit-hash" value="5c5c2a1e4dea" /> |
| <property name="moman.url" value="https://bitbucket.org/jpbarrette/moman/get/${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"/> |
| <pathelement path="${java.class.path}"/> |
| </path> |
| |
| <target name="test-core" depends="common.test"/> |
| |
| <target name="javadocs-core" depends="javadocs"/> |
| <target name="javadocs" description="Generate javadoc for core classes"> |
| <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"/> |
| |
| <macrodef name="createLevAutomaton"> |
| <attribute name="n"/> |
| <sequential> |
| <exec dir="src/java/org/apache/lucene/util/automaton" |
| executable="${python.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"/> |
| </exec> |
| <exec dir="src/java/org/apache/lucene/util/automaton" |
| executable="${python.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"/> |
| </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="${python.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="${python.exe}" failonerror="true"> |
| <!-- Tell Python not to write any bytecode cache into the filesystem: --> |
| <arg value="-B"/> |
| <arg value="gen_Direct.py"/> |
| </exec> |
| <exec dir="src/java/org/apache/lucene/util/packed" |
| executable="${python.exe}" failonerror="true"> |
| <!-- Tell Python not to write any bytecode cache into the filesystem: --> |
| <arg value="-B"/> |
| <arg value="gen_Packed64SingleBlock.py"/> |
| </exec> |
| <exec dir="src/java/org/apache/lucene/util/packed" |
| executable="${python.exe}" failonerror="true"> |
| <!-- Tell Python not to write any bytecode cache into the filesystem: --> |
| <arg value="-B"/> |
| <arg value="gen_PackedThreeBlocks.py"/> |
| </exec> |
| <fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java,Direct*.java,Packed64SingleBlock.java,Packed*ThreeBlocks.py" 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"/> |
| |
| </project> |