2005-05-01 20:11:11 -04:00
|
|
|
<?xml version="1.0"?>
|
2007-06-09 02:09:46 -04:00
|
|
|
|
|
|
|
<!--
|
|
|
|
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.
|
|
|
|
-->
|
|
|
|
|
2007-06-16 00:45:13 -04:00
|
|
|
<project name="contrib-build" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
2005-05-01 20:11:11 -04:00
|
|
|
<echo>Building ${ant.project.name}...</echo>
|
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<!-- TODO: adjust build.dir/dist.dir appropriately when a contrib project is run individually -->
|
2005-05-01 20:11:11 -04:00
|
|
|
<property name="build.dir" location="../../build/contrib/${ant.project.name}"/>
|
2005-05-06 19:43:54 -04:00
|
|
|
<property name="dist.dir" location="../../dist/contrib/${ant.project.name}"/>
|
2007-06-16 00:45:13 -04:00
|
|
|
<property name="maven.dist.dir" location="../../dist/maven"/>
|
2007-08-22 19:16:48 -04:00
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<import file="../common-build.xml"/>
|
|
|
|
|
2005-05-06 19:43:54 -04:00
|
|
|
<property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
<available property="lucene.jar.present" type="file" file="${lucene.jar}"/>
|
2007-06-11 15:29:41 -04:00
|
|
|
<available property="lucene.tests.present" type="dir"
|
|
|
|
file="${common.dir}/build/classes/test" />
|
|
|
|
<available property="contrib.has.tests" type="dir" file="src/test" />
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<path id="classpath">
|
|
|
|
<pathelement path="${lucene.jar}"/>
|
|
|
|
<pathelement path="${project.classpath}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="classpath"/>
|
2007-05-30 03:18:29 -04:00
|
|
|
<pathelement location="../../build/classes/test/"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
<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">
|
2007-06-11 15:29:41 -04:00
|
|
|
<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"/>
|
2005-05-01 20:11:11 -04:00
|
|
|
</target>
|
|
|
|
|
2007-06-11 15:29:41 -04:00
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
<target name="init" depends="common.init,build-lucene"/>
|
2007-06-11 15:29:41 -04:00
|
|
|
<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" />
|
2007-06-16 00:45:13 -04:00
|
|
|
|
|
|
|
<available
|
|
|
|
type="file"
|
|
|
|
file="${pom.xml}"
|
|
|
|
property="pom.xml.present">
|
|
|
|
</available>
|
|
|
|
|
2007-08-22 19:16:48 -04:00
|
|
|
<target name="dist-maven" if="pom.xml.present" depends="compile-core, jar-src">
|
|
|
|
<sequential>
|
|
|
|
<jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-sources.jar"/>
|
|
|
|
<m2-deploy>
|
|
|
|
<artifact-attachments>
|
|
|
|
<attach file="${build.dir}/${final.name}-src.jar"
|
|
|
|
classifier="sources"/>
|
|
|
|
</artifact-attachments>
|
|
|
|
</m2-deploy>
|
|
|
|
</sequential>
|
2007-06-16 00:45:13 -04:00
|
|
|
</target>
|
|
|
|
|
2005-05-01 20:11:11 -04:00
|
|
|
</project>
|