mirror of https://github.com/apache/lucene.git
71 lines
2.8 KiB
XML
71 lines
2.8 KiB
XML
<?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="contrib-build">
|
|
<echo>Building ${ant.project.name}...</echo>
|
|
|
|
<!-- TODO: adjust build.dir/dist.dir appropriately when a contrib project is run individually -->
|
|
<property name="build.dir" location="../../build/contrib/${ant.project.name}"/>
|
|
<property name="dist.dir" location="../../dist/contrib/${ant.project.name}"/>
|
|
|
|
<import file="../common-build.xml"/>
|
|
|
|
<property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/>
|
|
<available property="lucene.jar.present" type="file" file="${lucene.jar}"/>
|
|
<available property="lucene.tests.present" type="dir"
|
|
file="${common.dir}/build/classes/test" />
|
|
<available property="contrib.has.tests" type="dir" file="src/test" />
|
|
|
|
<path id="classpath">
|
|
<pathelement path="${lucene.jar}"/>
|
|
<pathelement path="${project.classpath}"/>
|
|
</path>
|
|
|
|
<path id="test.classpath">
|
|
<path refid="classpath"/>
|
|
<pathelement location="../../build/classes/test/"/>
|
|
<pathelement location="${junit.jar}"/>
|
|
<pathelement location="${build.dir}/classes/java"/>
|
|
</path>
|
|
|
|
<path id="junit.classpath">
|
|
<path refid="test.classpath"/>
|
|
<pathelement location="${build.dir}/classes/test"/>
|
|
<pathelement location="${build.dir}/classes/java"/>
|
|
</path>
|
|
|
|
<target name="build-lucene" unless="lucene.jar.present">
|
|
<ant dir="${common.dir}" target="jar-core" inheritAll="false"/>
|
|
</target>
|
|
|
|
<target name="build-lucene-tests" unless="lucene.tests.present">
|
|
<ant dir="${common.dir}" target="compile-test" inheritAll="false"/>
|
|
</target>
|
|
|
|
|
|
<target name="init" depends="common.init,build-lucene"/>
|
|
<target name="compile-test" depends="init" if="contrib.has.tests">
|
|
<antcall target="common.compile-test" inheritRefs="true" />
|
|
</target>
|
|
<target name="test" depends="init" if="contrib.has.tests">
|
|
<antcall target="common.test" inheritRefs="true" />
|
|
</target>
|
|
<target name="build-artifacts-and-tests" depends="jar, compile-test" />
|
|
</project>
|