| <!-- |
| 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="mcf-solr-3.x-plugin" default="help"> |
| |
| <target name="clean"> |
| <delete> |
| <fileset dir="." includes="apache-manifoldcf-solr-3.x-plugin-*"/> |
| </delete> |
| <delete dir="dist"/> |
| <delete dir="solr"/> |
| </target> |
| |
| <target name="download-solr"> |
| <mkdir dir="solr" /> |
| <exec dir="solr" executable="svn" failifexecutionfails="true" failonerror="true"> |
| <arg value="checkout" /> |
| <arg value="http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_6_2/" /> |
| <arg value="." /> |
| </exec> |
| </target> |
| |
| <target name="copy-sources" depends="download-solr"> |
| <mkdir dir="solr/solr/contrib/mcf"/> |
| <copy todir="solr/solr/contrib/mcf"> |
| <fileset dir="mcf"> |
| <include name="**/*"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="compile" depends="copy-sources"> |
| <ant dir="solr/solr/contrib/mcf" target="default"/> |
| </target> |
| |
| <target name="test" depends="copy-sources"> |
| <ant dir="solr/solr/contrib/mcf" target="test"/> |
| </target> |
| |
| <target name="deliver" depends="compile"> |
| <mkdir dir="dist"/> |
| <copy todir="dist"> |
| <fileset dir="solr/solr/build/contrib/solr-mcf"> |
| <include name="*.jar"/> |
| </fileset> |
| <fileset dir="mcf"> |
| <include name="README.txt"/> |
| <include name="NOTICE.txt"/> |
| <include name="DEPENDENCIES.txt"/> |
| <include name="LICENSE.txt"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="build" depends="deliver"/> |
| |
| <target name="set-version"> |
| <property name="release-version" value="1.1"/> |
| </target> |
| |
| <target name="create-source-zip" depends="set-version"> |
| <zip destfile="apache-manifoldcf-solr-3.x-plugin-${release-version}-src.zip" update="false"> |
| <zipfileset dir="." prefix="apache-manifoldcf-solr-3.x-plugin-${release-version}"> |
| <exclude name="/solr/"/> |
| <exclude name="/dist/"/> |
| <exclude name="/apache-manifoldcf-solr-3.x-plugin-*"/> |
| </zipfileset> |
| </zip> |
| </target> |
| |
| <target name="create-source-tar" depends="set-version"> |
| <tar destfile="apache-manifoldcf-solr-3.x-plugin-${release-version}-src.tar.gz" compression="gzip" longfile="gnu"> |
| <tarfileset dir="." prefix="apache-manifoldcf-solr-3.x-plugin-${release-version}"> |
| <exclude name="/solr/"/> |
| <exclude name="/dist/"/> |
| <exclude name="/apache-manifoldcf-solr-3.x-plugin-*"/> |
| </tarfileset> |
| </tar> |
| </target> |
| |
| <target name="create-bin-zip" depends="build,set-version"> |
| <zip destfile="apache-manifoldcf-solr-3.x-plugin-${release-version}-bin.zip" update="false"> |
| <zipfileset dir="dist" prefix="apache-manifoldcf-solr-3.x-plugin-${release-version}"> |
| </zipfileset> |
| </zip> |
| </target> |
| |
| <target name="create-bin-tar" depends="build,set-version"> |
| <tar destfile="apache-manifoldcf-solr-3.x-plugin-${release-version}-bin.tar.gz" compression="gzip" longfile="gnu"> |
| <tarfileset dir="dist" prefix="apache-manifoldcf-solr-3.x-plugin-${release-version}"> |
| </tarfileset> |
| </tar> |
| </target> |
| |
| <target name="image" depends="create-source-zip,create-source-tar,create-bin-zip,create-bin-tar"/> |
| |
| <target name="help"> |
| <echo level="info"> |
| Apache ManifoldCF Solr 3.x Plugin build file. Use this file to |
| build the plugin distributables and run the tests. |
| |
| Useful targets are: |
| |
| clean - Clean the build area |
| build - Build jar under the 'dist' directory |
| test - Run the tests |
| image - Package the sources and binaries |
| |
| Prerequisites: This build requires Subversion (svn) to be |
| installed, and svn internet access to the Apache repository. |
| It also requires Java jdk1.6.0 or above. |
| </echo> |
| </target> |
| |
| <target name="-taskdef"> |
| <typedef resource="org/apache/rat/anttasks/antlib.xml" uri="antlib:rat.anttasks"> |
| <classpath> |
| <fileset dir="." includes="rat*.jar"/> |
| </classpath> |
| </typedef> |
| </target> |
| <target name="rat-sources" depends="-taskdef" |
| description="runs the tasks over src/java excluding the license directory"> |
| <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"> |
| <fileset dir="mcf/"> |
| <exclude name="CHANGES.txt"/> |
| </fileset> |
| </rat:report> |
| </target> |
| |
| </project> |