2008-06-24 00:49:25 -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.
|
|
|
|
-->
|
|
|
|
|
2010-03-18 00:39:17 -04:00
|
|
|
<project name="common-solr" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
2008-06-24 00:49:25 -04:00
|
|
|
<description>
|
|
|
|
This file is designed for importing into a main build file, and not intended
|
|
|
|
for standalone use.
|
|
|
|
</description>
|
2008-08-04 01:56:10 -04:00
|
|
|
|
2010-03-19 09:01:40 -04:00
|
|
|
<dirname file="${ant.file.common-solr}" property="common-solr.dir"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
2010-11-02 08:03:18 -04:00
|
|
|
<!-- change this together with the default and test's solrconfig.xml after starting a new development branch: -->
|
|
|
|
<property name="tests.luceneMatchVersion" value="4.0"/>
|
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- Initialize property values: allow easy customization via build.properties -->
|
|
|
|
<property file="build.properties" />
|
|
|
|
|
|
|
|
<property name="Name" value="Solr" />
|
|
|
|
|
2008-08-04 01:56:10 -04:00
|
|
|
<property name="name" value="${ant.project.name}"/>
|
|
|
|
|
2011-02-05 18:36:32 -05:00
|
|
|
<property name="dev-tools.dir" value="${solr-path}/../dev-tools"/>
|
2011-03-21 18:13:14 -04:00
|
|
|
<property name="prettify.dir" value="${solr-path}/../lucene/src/tools/prettify"/>
|
2011-03-09 20:19:07 -05:00
|
|
|
<property name="package.dir" location="package"/>
|
2011-02-05 18:36:32 -05:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<tstamp>
|
|
|
|
<format property="year" pattern="yyyy"/>
|
|
|
|
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
|
|
|
|
<format property="TSTAMP" pattern="HH:mm:ss"/>
|
|
|
|
<!-- datetime format that is safe to treat as part of a dotted version -->
|
|
|
|
<format property="dateversion" pattern="yyyy.MM.dd.HH.mm.ss" />
|
|
|
|
</tstamp>
|
|
|
|
|
2010-09-10 08:34:18 -04:00
|
|
|
<property name="junit.details" value="1"/>
|
|
|
|
|
2009-01-29 17:48:28 -05:00
|
|
|
<!-- default arguments to pass to jvm executing tests -->
|
|
|
|
<property name="args" value="" />
|
2008-12-06 08:04:26 -05:00
|
|
|
|
2010-04-13 06:45:43 -04:00
|
|
|
<!-- TODO: measure toning this down by default to 1 -->
|
2010-08-24 09:20:15 -04:00
|
|
|
<property name="tests.threadspercpu" value="2"/>
|
|
|
|
<condition property="tests.sequential">
|
|
|
|
<or>
|
|
|
|
<isset property="testcase"/>
|
|
|
|
<equals arg1="${tests.threadspercpu}" arg2="0"/>
|
|
|
|
</or>
|
|
|
|
</condition>
|
|
|
|
|
|
|
|
<property name="tests.multiplier" value="1" />
|
2011-05-06 07:42:24 -04:00
|
|
|
<property name="tests.codecprovider" value="random" />
|
2010-11-20 09:39:09 -05:00
|
|
|
<property name="tests.codec" value="randomPerField" />
|
2010-08-08 21:25:43 -04:00
|
|
|
<property name="tests.locale" value="random" />
|
|
|
|
<property name="tests.timezone" value="random" />
|
2010-08-25 15:45:22 -04:00
|
|
|
<property name="tests.iter" value="1" />
|
2010-09-10 08:34:18 -04:00
|
|
|
<property name="tests.seed" value="random" />
|
2010-11-17 10:58:55 -05:00
|
|
|
<property name="tests.nightly" value="false" />
|
2010-11-28 06:08:43 -05:00
|
|
|
<property name="tests.verbose" value="false" />
|
2011-06-01 04:22:23 -04:00
|
|
|
<property name="tests.directory" value="random" />
|
2010-07-23 13:44:21 -04:00
|
|
|
|
2010-08-24 09:20:15 -04:00
|
|
|
<condition property="dir.prop" value="-Dsolr.directoryFactory=solr.StandardDirectoryFactory">
|
|
|
|
<isset property="use.fsdir"/>
|
|
|
|
</condition>
|
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
<!-- Example directory -->
|
2010-03-18 00:39:17 -04:00
|
|
|
<property name="example" value="${common-solr.dir}/example" />
|
2008-08-29 14:18:16 -04:00
|
|
|
<!--
|
|
|
|
we attempt to exec svnversion to get details build information
|
|
|
|
for jar manifests. this property can be set at runtime to an
|
|
|
|
explicit path as needed, or ant will just try to find it in the
|
|
|
|
default PATH. (this is useful for Hudson)
|
|
|
|
-->
|
|
|
|
<property name="svnversion.exe" value="svnversion" />
|
2011-03-22 15:49:18 -04:00
|
|
|
<property name="svn.exe" value="svn" />
|
2008-08-29 14:18:16 -04:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- Java Version we are compatible with -->
|
2010-05-18 17:30:41 -04:00
|
|
|
<property name="java.compat.version" value="1.6" />
|
2008-06-24 00:49:25 -04:00
|
|
|
|
2010-12-26 22:13:14 -05:00
|
|
|
<!-- clover wants to run with -lib, otherwise we prefer a repeatable
|
|
|
|
classpath -->
|
|
|
|
<property name="javac.includeAntRuntime" value="${run.clover}"/>
|
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- Solr Implementation Version -->
|
|
|
|
<!--
|
|
|
|
This can be any string value that does not include spaces
|
|
|
|
This will be used when creating build artifact file names.
|
|
|
|
|
2010-09-24 01:30:20 -04:00
|
|
|
By default, this should be set to "X.Y.N-SNAPSHOT" where X.Y.N is
|
2008-06-24 00:49:25 -04:00
|
|
|
"1 greater" then the last version released (on this branch).
|
|
|
|
-->
|
2010-09-24 01:30:20 -04:00
|
|
|
<property name="version" value="4.0-SNAPSHOT" />
|
2008-06-24 00:49:25 -04:00
|
|
|
|
|
|
|
<!-- Solr Specification Version -->
|
|
|
|
<!--
|
|
|
|
This will be used in the Manifest file, and therefore must
|
|
|
|
match the pattern "digit+{.digit+}*"
|
|
|
|
|
|
|
|
By default, this should be set to "X.Y.M.${dateversion}"
|
|
|
|
where X.Y.M is the last version released (on this branch).
|
|
|
|
-->
|
2010-09-24 00:49:39 -04:00
|
|
|
<property name="specversion" value="4.0.0.${dateversion}" />
|
2009-01-29 17:48:28 -05:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
|
|
|
|
<!-- Type of checksum to compute for distribution files -->
|
|
|
|
<property name="checksum.algorithm" value="md5" />
|
|
|
|
|
|
|
|
<property name="fullname" value="apache-${ant.project.name}"/>
|
|
|
|
<property name="fullnamever" value="apache-${ant.project.name}-${version}"/>
|
|
|
|
|
2008-08-04 01:56:10 -04:00
|
|
|
<!-- Destination for compiled classes and binaries -->
|
|
|
|
<property name="dest" value="build" />
|
2010-05-03 19:07:02 -04:00
|
|
|
|
|
|
|
<!-- Destination for Lucene jars -->
|
|
|
|
<property name="lucene-libs" location="lucene-libs" />
|
2008-08-04 01:56:10 -04:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- Javadoc properties -->
|
|
|
|
<property name="javadoc.years" value="2006 - ${year}" />
|
|
|
|
<property name="javadoc.access" value="protected"/>
|
|
|
|
<property name="javadoc.link.java"
|
2010-05-18 17:30:41 -04:00
|
|
|
value="http://java.sun.com/javase/6/docs/api/"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
<property name="javadoc.link.junit"
|
|
|
|
value="http://junit.sourceforge.net/javadoc/"/>
|
|
|
|
<property name="javadoc.link.lucene"
|
2011-06-13 14:12:47 -04:00
|
|
|
value="https://builds.apache.org/job/Lucene-trunk/javadoc/all/"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
<property name="javadoc.packages" value="org.apache.solr.*"/>
|
2008-08-04 01:56:10 -04:00
|
|
|
<property name="build.docs" value="${dest}/docs"/>
|
2010-03-18 00:39:17 -04:00
|
|
|
<property name="build.javadoc" value="${common-solr.dir}/${build.docs}/api"/>
|
2008-08-04 01:56:10 -04:00
|
|
|
<property name="build.javadoc.solrj" value="${build.docs}/api-solrj"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
|
|
|
<!-- JUnit properties -->
|
2010-08-09 09:17:39 -04:00
|
|
|
<property name="testmethod" value=""/>
|
2008-06-24 00:49:25 -04:00
|
|
|
<property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
|
2010-03-18 00:39:17 -04:00
|
|
|
<property name="junit.output.dir" location="${common-solr.dir}/${dest}/test-results"/>
|
|
|
|
<property name="junit.reports" location="${common-solr.dir}/${dest}/test-results/reports"/>
|
2009-09-27 17:39:03 -04:00
|
|
|
<property name="junit.formatter" value="plain"/>
|
2011-01-22 08:15:46 -05:00
|
|
|
<condition property="junit.details.formatter"
|
|
|
|
value="org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"
|
2010-12-08 16:42:34 -05:00
|
|
|
else="org.apache.lucene.util.LuceneJUnitResultFormatter">
|
|
|
|
<isset property="tests.sequential"/>
|
|
|
|
</condition>
|
2010-04-28 18:08:59 -04:00
|
|
|
<property name="junit.parallel.selector" value="org.apache.lucene.util.LuceneJUnitDividingSelector"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
|
|
|
<!-- Maven properties -->
|
|
|
|
<property name="maven.build.dir" value="${basedir}/build/maven"/>
|
2011-03-09 20:19:07 -05:00
|
|
|
<property name="maven.dist.dir" value="${package.dir}/maven"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2008-09-19 11:07:17 -04:00
|
|
|
<property name="maven.dist.prefix" value="${maven.dist.dir}/org/apache/solr"/>
|
|
|
|
|
2008-08-13 06:08:04 -04:00
|
|
|
<!-- By default, "deploy" to a temporary directory (as well as installing
|
|
|
|
into your local repository). If you wish to deploy to a remote
|
|
|
|
repository, set this property to the URL of that repository. In
|
|
|
|
addition, if the repository requires authentication, you can set
|
|
|
|
properties "m2.repository.username" and "m2.repository.private.key"
|
|
|
|
to define your credentials.
|
|
|
|
-->
|
|
|
|
<property name="m2.repository.url" value="file://${maven.dist.dir}"/>
|
|
|
|
<property name="m2.repository.private.key" value="${user.home}/.ssh/id_dsa"/>
|
|
|
|
|
2011-06-14 17:23:31 -04:00
|
|
|
<path id="maven-ant-tasks.classpath">
|
|
|
|
<fileset dir="${common-solr.dir}/../lucene/lib">
|
|
|
|
<include name="maven-ant-tasks-*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
|
|
|
<!-- End Maven Properties -->
|
2010-03-18 00:39:17 -04:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<available property="clover.present"
|
|
|
|
classname="com.cenqua.clover.tasks.CloverReportTask"
|
|
|
|
/>
|
|
|
|
<condition property="clover.enabled">
|
|
|
|
<and>
|
|
|
|
<isset property="run.clover"/>
|
|
|
|
<isset property="clover.present"/>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
|
2010-03-19 15:11:50 -04:00
|
|
|
<!-- Lucene -->
|
|
|
|
|
2010-03-19 09:01:40 -04:00
|
|
|
<path id="lucene.classpath">
|
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/classes/java" />
|
2010-05-05 10:26:59 -04:00
|
|
|
<pathelement location="${common-solr.dir}/../modules/analysis/build/common/classes/java" />
|
2010-06-23 07:25:17 -04:00
|
|
|
<pathelement location="${common-solr.dir}/../modules/analysis/build/phonetic/classes/java" />
|
2011-05-23 14:33:53 -04:00
|
|
|
<pathelement location="${common-solr.dir}/../modules/suggest/build/classes/java" />
|
2010-03-19 09:01:40 -04:00
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/contrib/highlighter/classes/java" />
|
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/contrib/memory/classes/java" />
|
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/contrib/misc/classes/java" />
|
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/contrib/queries/classes/java" />
|
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/contrib/spatial/classes/java" />
|
2011-06-17 17:25:59 -04:00
|
|
|
<pathelement location="${common-solr.dir}/../modules/grouping/build/classes/java" />
|
2011-06-24 20:03:35 -04:00
|
|
|
<pathelement location="${common-solr.dir}/../modules/common/build/classes/java" />
|
|
|
|
</path>
|
2010-03-19 15:11:50 -04:00
|
|
|
|
|
|
|
<target name="prep-lucene-jars">
|
|
|
|
<sequential>
|
|
|
|
<subant target="jar-core" inheritall="false" failonerror="true">
|
|
|
|
<fileset dir="../lucene/" includes="build.xml" />
|
|
|
|
</subant>
|
|
|
|
<subant target="jar" inheritall="false" failonerror="true">
|
2010-05-05 10:26:59 -04:00
|
|
|
<fileset dir="../modules/analysis/common" includes="build.xml" />
|
2010-06-23 07:25:17 -04:00
|
|
|
<fileset dir="../modules/analysis/phonetic" includes="build.xml" />
|
2011-05-23 14:33:53 -04:00
|
|
|
<fileset dir="../modules/suggest" includes="build.xml" />
|
2010-03-19 15:11:50 -04:00
|
|
|
<fileset dir="../lucene/contrib/highlighter" includes="build.xml" />
|
|
|
|
<fileset dir="../lucene/contrib/memory" includes="build.xml" />
|
|
|
|
<fileset dir="../lucene/contrib/misc" includes="build.xml" />
|
|
|
|
<fileset dir="../lucene/contrib/queries" includes="build.xml" />
|
|
|
|
<fileset dir="../lucene/contrib/spatial" includes="build.xml" />
|
2011-06-17 17:25:59 -04:00
|
|
|
<fileset dir="../modules/grouping" includes="build.xml" />
|
2011-06-24 20:03:35 -04:00
|
|
|
<fileset dir="../modules/common" includes="build.xml" />
|
2010-03-19 15:11:50 -04:00
|
|
|
</subant>
|
|
|
|
</sequential>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lucene-jars-to-solr" depends="prep-lucene-jars">
|
2010-05-03 19:07:02 -04:00
|
|
|
<mkdir dir="${lucene-libs}"/>
|
|
|
|
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
|
|
|
<fileset dir="../lucene/build/">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-core-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
2010-05-05 10:26:59 -04:00
|
|
|
<fileset dir="../modules/analysis/build/common">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-analyzers-common-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
2010-06-23 07:25:17 -04:00
|
|
|
<fileset dir="../modules/analysis/build/phonetic">
|
|
|
|
<include name="lucene-analyzers-phonetic-${version}.jar" />
|
|
|
|
</fileset>
|
2011-05-23 14:33:53 -04:00
|
|
|
<fileset dir="../modules/suggest/build">
|
|
|
|
<include name="lucene-suggest-${version}.jar" />
|
|
|
|
</fileset>
|
2010-05-03 19:07:02 -04:00
|
|
|
<fileset dir="../lucene/build/contrib/highlighter">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-highlighter-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="../lucene/build/contrib/memory">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-memory-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="../lucene/build/contrib/misc">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-misc-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="../lucene/build/contrib/queries">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-queries-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="../lucene/build/contrib/spatial">
|
2010-06-17 08:28:02 -04:00
|
|
|
<include name="lucene-spatial-${version}.jar" />
|
2010-05-03 19:07:02 -04:00
|
|
|
</fileset>
|
2011-06-17 17:25:59 -04:00
|
|
|
<fileset dir="../modules/grouping/build">
|
|
|
|
<include name="lucene-grouping-${version}.jar" />
|
|
|
|
</fileset>
|
2011-06-24 20:03:35 -04:00
|
|
|
<fileset dir="../modules/common/build">
|
2011-06-25 00:21:03 -04:00
|
|
|
<include name="lucene-common-module-${version}.jar" />
|
2011-06-24 20:03:35 -04:00
|
|
|
</fileset>
|
2010-03-19 15:11:50 -04:00
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
2010-05-05 11:14:55 -04:00
|
|
|
<target name="compile-lucene" unless="lucene-compiled">
|
2010-03-19 15:11:50 -04:00
|
|
|
<property name="lucene-compiled" value="true"/>
|
2010-05-25 18:11:35 -04:00
|
|
|
<subant target="default">
|
|
|
|
<fileset dir="../modules/analysis/common" includes="build.xml"/>
|
2010-06-23 07:25:17 -04:00
|
|
|
<fileset dir="../modules/analysis/phonetic" includes="build.xml"/>
|
2011-05-23 14:33:53 -04:00
|
|
|
<fileset dir="../modules/suggest" includes="build.xml"/>
|
2010-05-25 18:11:35 -04:00
|
|
|
<fileset dir="../lucene/contrib/highlighter" includes="build.xml"/>
|
|
|
|
<fileset dir="../lucene/contrib/memory" includes="build.xml"/>
|
|
|
|
<fileset dir="../lucene/contrib/misc" includes="build.xml"/>
|
|
|
|
<fileset dir="../lucene/contrib/queries" includes="build.xml"/>
|
|
|
|
<fileset dir="../lucene/contrib/spatial" includes="build.xml"/>
|
2011-06-17 17:25:59 -04:00
|
|
|
<fileset dir="../modules/grouping" includes="build.xml"/>
|
2011-06-24 20:03:35 -04:00
|
|
|
<fileset dir="../modules/common" includes="build.xml"/>
|
2010-05-25 18:11:35 -04:00
|
|
|
</subant>
|
2010-03-19 15:11:50 -04:00
|
|
|
</target>
|
2010-03-19 09:01:40 -04:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
|
|
|
|
<!-- Macro for compilation -->
|
|
|
|
<macrodef name="solr-javac">
|
|
|
|
<attribute name="destdir" />
|
|
|
|
<attribute name="classpathref" />
|
|
|
|
<element name="nested" optional="true" implicit="true" />
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="@{destdir}" />
|
|
|
|
<javac destdir="@{destdir}"
|
|
|
|
target="${java.compat.version}"
|
|
|
|
source="${java.compat.version}"
|
|
|
|
debug="on"
|
|
|
|
encoding="utf8"
|
2010-12-26 22:13:14 -05:00
|
|
|
includeAntRuntime="${javac.includeAntRuntime}"
|
2008-06-24 00:49:25 -04:00
|
|
|
sourcepath=""
|
|
|
|
classpathref="@{classpathref}">
|
2011-01-07 18:57:11 -05:00
|
|
|
<compilerarg line="-Xlint -Xlint:-deprecation -Xlint:-serial"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
<nested />
|
|
|
|
</javac>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-12 10:24:57 -04:00
|
|
|
|
|
|
|
<!-- Macro for building Jars -->
|
|
|
|
<macrodef name="solr-jar">
|
|
|
|
<attribute name="destfile" />
|
2008-08-13 06:08:04 -04:00
|
|
|
<attribute name="basedir" default="." />
|
2008-08-12 10:24:57 -04:00
|
|
|
<attribute name="includes" default="org/apache/**" />
|
2008-08-13 06:08:04 -04:00
|
|
|
<attribute name="excludes" default="" />
|
2010-03-18 00:39:17 -04:00
|
|
|
<attribute name="manifest" default="${common-solr.dir}/${dest}/META-INF/MANIFEST.MF" />
|
2008-08-12 10:24:57 -04:00
|
|
|
<element name="nested" optional="true" implicit="true" />
|
|
|
|
<sequential>
|
|
|
|
<jar destfile="@{destfile}"
|
|
|
|
basedir="@{basedir}"
|
|
|
|
includes="@{includes}"
|
2008-08-13 06:08:04 -04:00
|
|
|
excludes="@{excludes}"
|
2008-08-12 10:24:57 -04:00
|
|
|
filesetmanifest="skip"
|
|
|
|
manifest="@{manifest}">
|
2010-03-18 00:39:17 -04:00
|
|
|
<metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt"/>
|
2008-08-12 10:24:57 -04:00
|
|
|
<nested />
|
|
|
|
</jar>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- Macro for building checksum files
|
|
|
|
This is only needed until the "format" option is supported
|
|
|
|
by ant's built in checksum task
|
|
|
|
-->
|
|
|
|
<macrodef name="solr-checksum">
|
|
|
|
<attribute name="file"/>
|
|
|
|
<sequential>
|
2011-03-06 23:08:20 -05:00
|
|
|
<echo>Building checksums for '@{file}'</echo>
|
|
|
|
<checksum file="@{file}" algorithm="md5" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
|
|
|
|
<checksum file="@{file}" algorithm="sha1" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<macrodef name="contrib-crawl">
|
|
|
|
<attribute name="target" default=""/>
|
|
|
|
<attribute name="failonerror" default="true"/>
|
|
|
|
<sequential>
|
|
|
|
<subant target="@{target}" failonerror="@{failonerror}">
|
2010-05-05 11:14:55 -04:00
|
|
|
<property name="lucene-compiled" value="${lucene-compiled}"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
<fileset dir="."
|
|
|
|
includes="contrib/*/build.xml"
|
|
|
|
/>
|
|
|
|
</subant>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-04 01:56:10 -04:00
|
|
|
|
2011-03-31 15:56:47 -04:00
|
|
|
<property name="failonjavadocwarning" value="true"/>
|
2008-08-04 01:56:10 -04:00
|
|
|
<macrodef name="invoke-javadoc">
|
|
|
|
<element name="sources" optional="yes"/>
|
|
|
|
<attribute name="destdir"/>
|
|
|
|
<attribute name="title" default="${Name} ${version} API (${specversion})"/>
|
|
|
|
<sequential>
|
2011-02-14 21:19:49 -05:00
|
|
|
<mkdir dir="@{destdir}"/>
|
|
|
|
<copy todir="@{destdir}/prettify" overwrite="false">
|
2011-02-05 18:36:32 -05:00
|
|
|
<fileset dir="${prettify.dir}"/>
|
|
|
|
</copy>
|
2011-03-31 15:56:47 -04:00
|
|
|
<record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>
|
2008-08-04 01:56:10 -04:00
|
|
|
<javadoc
|
|
|
|
packagenames="org.apache.solr.*"
|
|
|
|
failonerror="true"
|
|
|
|
destdir="@{destdir}"
|
|
|
|
access="${javadoc.access}"
|
|
|
|
encoding="utf-8"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
|
|
|
source="${ant.java.version}"
|
|
|
|
link="${javadoc.link.java}"
|
|
|
|
windowtitle="${Name} ${version} API"
|
|
|
|
doctitle="@{title}"
|
2011-02-14 21:19:49 -05:00
|
|
|
stylesheetfile="@{destdir}/prettify/stylesheet+prettify.css"
|
2008-08-04 01:56:10 -04:00
|
|
|
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved.">
|
|
|
|
<tag name="todo" description="To Do:"/>
|
|
|
|
<tag name="uml.property" description="UML Property:"/>
|
2010-10-03 16:14:52 -04:00
|
|
|
<tag name="lucene.experimental"
|
|
|
|
description="WARNING: This API is experimental and might change in incompatible ways in the next release."/>
|
|
|
|
<tag name="lucene.internal"
|
|
|
|
description="NOTE: This API is for Lucene internal purposes only and might change in incompatible ways in the next release."/>
|
2008-08-04 01:56:10 -04:00
|
|
|
<link offline="true" packagelistLoc="${build.javadoc}"/>
|
|
|
|
<link href="${javadoc.link.java}"/>
|
|
|
|
<link href="${javadoc.link.junit}"/>
|
|
|
|
<link href="${javadoc.link.lucene}"/>
|
2011-02-05 18:36:32 -05:00
|
|
|
<header><![CDATA[
|
2011-02-14 21:19:49 -05:00
|
|
|
<script src="{@docRoot}/prettify/prettify.js" type="text/javascript"></script>
|
2011-02-05 18:36:32 -05:00
|
|
|
<script language="JavaScript">window.onload=function(){windowTitle();prettyPrint();}</script>
|
|
|
|
]]></header>
|
2008-08-04 01:56:10 -04:00
|
|
|
|
|
|
|
<sources />
|
|
|
|
|
|
|
|
<classpath refid="javadoc.classpath"/>
|
|
|
|
</javadoc>
|
2011-03-31 15:56:47 -04:00
|
|
|
<record name="@{destdir}/log_javadoc.txt" action="stop"/>
|
|
|
|
|
|
|
|
<delete>
|
|
|
|
<fileset file="@{destdir}/log_javadoc.txt">
|
|
|
|
<not>
|
|
|
|
<containsregexp expression="\[javadoc\]\s*[1-9][0-9]*[\s]*warning"/>
|
|
|
|
</not>
|
|
|
|
</fileset>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<fail message="Javadocs warnings were found!" >
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<available file="@{destdir}/log_javadoc.txt"/>
|
|
|
|
<istrue value="${failonjavadocwarning}"/>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
2008-08-04 01:56:10 -04:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2009-09-11 21:18:14 -04:00
|
|
|
<!-- NOTE, the pom.xml MUST be a relative path. An absolute path may break the build on windows -->
|
2008-08-13 06:08:04 -04:00
|
|
|
<macrodef name="m2-deploy" description="Builds a Maven artifact">
|
2011-01-20 22:44:13 -05:00
|
|
|
<element name="artifact-attachments" optional="yes"/>
|
|
|
|
<attribute name="pom.xml" default="pom.xml"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
<attribute name="jar.file" default="${jar.file}"/>
|
2011-01-20 22:44:13 -05:00
|
|
|
<sequential>
|
|
|
|
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
|
|
|
|
<artifact:pom id="maven.project" file="@{pom.xml}"/>
|
|
|
|
<artifact:deploy file="@{jar.file}">
|
|
|
|
<artifact-attachments/>
|
|
|
|
<remoteRepository url="${m2.repository.url}">
|
|
|
|
<authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}"/>
|
|
|
|
</remoteRepository>
|
|
|
|
<pom refid="maven.project"/>
|
|
|
|
</artifact:deploy>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
|
|
|
<macrodef name="m2-deploy-with-pom-template" description="Builds a Maven artifact given a POM template">
|
|
|
|
<attribute name="pom.xml"/>
|
|
|
|
<attribute name="jar.file"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
<sequential>
|
|
|
|
<copy file="@{pom.xml}" tofile="${maven.build.dir}/@{pom.xml}">
|
|
|
|
<filterset begintoken="@" endtoken="@">
|
2010-06-16 22:25:11 -04:00
|
|
|
<filter token="version" value="${version}"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
</filterset>
|
|
|
|
</copy>
|
2011-01-20 22:44:13 -05:00
|
|
|
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
<artifact:pom id="maven.project" file="${maven.build.dir}/@{pom.xml}" />
|
2011-01-20 22:44:13 -05:00
|
|
|
<artifact:deploy file="@{jar.file}">
|
2008-08-13 06:08:04 -04:00
|
|
|
<remoteRepository url="${m2.repository.url}">
|
|
|
|
<authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}"/>
|
|
|
|
</remoteRepository>
|
|
|
|
<pom refid="maven.project"/>
|
|
|
|
</artifact:deploy>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2011-03-29 09:52:14 -04:00
|
|
|
<property name="gpg.exe" value="gpg" />
|
|
|
|
<property name="gpg.key" value="CODE SIGNING KEY" />
|
2008-09-19 11:07:17 -04:00
|
|
|
<macrodef name="sign-artifact" description="Signs the artifact">
|
|
|
|
<attribute name="input.file"/>
|
|
|
|
<attribute name="output.file" default="@{input.file}.asc"/>
|
2009-11-10 10:24:51 -05:00
|
|
|
<attribute name="gpg.passphrase"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
<sequential>
|
2009-11-10 10:24:51 -05:00
|
|
|
<echo >Signing @{input.file} Sig File: @{output.file}</echo>
|
2008-09-19 11:07:17 -04:00
|
|
|
|
2011-03-29 09:52:14 -04:00
|
|
|
<exec executable="${gpg.exe}" >
|
|
|
|
<arg value="--batch"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
<arg value="--armor"/>
|
|
|
|
<arg value="--output"/>
|
|
|
|
<arg value="@{output.file}"/>
|
2011-03-29 09:52:14 -04:00
|
|
|
<arg value="--default-key"/>
|
|
|
|
<arg value="${gpg.key}"/>
|
2009-11-10 10:24:51 -05:00
|
|
|
<arg value="--passphrase"/>
|
|
|
|
<arg value="@{gpg.passphrase}"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
<arg value="--detach-sig"/>
|
|
|
|
<arg value="@{input.file}"/>
|
|
|
|
</exec>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
We need to sign:
|
|
|
|
The POM
|
|
|
|
The library jar
|
|
|
|
The sources jar
|
|
|
|
the javadoc jar
|
|
|
|
-->
|
|
|
|
<macrodef name="sign-maven-artifacts" description="Signs maven artifacts">
|
|
|
|
<attribute name="artifact.id"/>
|
|
|
|
<attribute name="prefix.dir" default="${maven.dist.prefix}"/>
|
2009-11-10 10:24:51 -05:00
|
|
|
<attribute name="gpg.passphrase"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
<sequential>
|
2011-03-12 22:26:32 -05:00
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.jar" gpg.passphrase="@{gpg.passphrase}"/>
|
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}-javadoc.jar" gpg.passphrase="@{gpg.passphrase}"/>
|
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}-sources.jar" gpg.passphrase="@{gpg.passphrase}"/>
|
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.pom" gpg.passphrase="@{gpg.passphrase}"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2011-01-20 22:44:13 -05:00
|
|
|
<macrodef name="sign-maven-war-artifacts" description="Signs maven artifacts">
|
|
|
|
<attribute name="artifact.id"/>
|
|
|
|
<attribute name="prefix.dir" default="${maven.dist.prefix}"/>
|
|
|
|
<attribute name="gpg.passphrase"/>
|
|
|
|
<sequential>
|
2011-03-12 22:26:32 -05:00
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.war" gpg.passphrase="@{gpg.passphrase}"/>
|
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.pom" gpg.passphrase="@{gpg.passphrase}"/>
|
2011-01-20 22:44:13 -05:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2011-03-13 04:21:27 -04:00
|
|
|
<macrodef name="sign-maven-dependency-artifacts" description="Signs a maven artifact and its POM">
|
2008-09-19 11:07:17 -04:00
|
|
|
<attribute name="artifact.id"/>
|
|
|
|
<attribute name="prefix.dir" default="${maven.dist.prefix}"/>
|
2009-11-10 10:24:51 -05:00
|
|
|
<attribute name="gpg.passphrase"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
<sequential>
|
2011-03-12 22:26:32 -05:00
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.jar" gpg.passphrase="@{gpg.passphrase}"/>
|
2011-03-13 04:21:27 -04:00
|
|
|
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.pom" gpg.passphrase="@{gpg.passphrase}"/>
|
2008-09-19 11:07:17 -04:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2009-06-15 19:48:11 -04:00
|
|
|
<!-- setup proxy for download tasks -->
|
|
|
|
<condition property="proxy.specified">
|
|
|
|
<or>
|
|
|
|
<isset property="proxy.host"/>
|
|
|
|
<isset property="proxy.port"/>
|
|
|
|
<isset property="proxy.user"/>
|
|
|
|
</or>
|
|
|
|
</condition>
|
|
|
|
|
|
|
|
<target name="proxy.setup" if="proxy.specified">
|
|
|
|
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.password}"/>
|
|
|
|
</target>
|
|
|
|
|
2008-09-19 11:07:17 -04:00
|
|
|
|
2008-08-05 07:07:02 -04:00
|
|
|
<target name="clean-contrib"
|
2008-06-24 00:49:25 -04:00
|
|
|
description="Cleans all contrib modules and their tests">
|
|
|
|
<contrib-crawl target="clean"/>
|
|
|
|
</target>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2008-08-05 07:07:02 -04:00
|
|
|
<target name="build-contrib"
|
2008-06-24 00:49:25 -04:00
|
|
|
description="Builds all contrib modules and their tests">
|
|
|
|
<contrib-crawl target="build"/>
|
|
|
|
</target>
|
|
|
|
|
2008-08-05 07:07:02 -04:00
|
|
|
<target name="test-contrib" depends="build-contrib">
|
2008-08-01 02:28:08 -04:00
|
|
|
<contrib-crawl target="test" failonerror="true"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
</target>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2011-06-17 03:28:37 -04:00
|
|
|
<target name="compile-test-contrib" depends="build-contrib">
|
|
|
|
<contrib-crawl target="compileTests" failonerror="true"/>
|
|
|
|
</target>
|
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<target name="dist-contrib" description="Make the contribs ready for distribution">
|
2008-08-01 02:28:08 -04:00
|
|
|
<contrib-crawl target="dist" failonerror="true" />
|
2008-06-24 00:49:25 -04:00
|
|
|
</target>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
<target name="example-contrib" description="Tell the contrib to add their stuff to examples">
|
|
|
|
<contrib-crawl target="example" failonerror="true" />
|
|
|
|
</target>
|
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- Creates a Manifest file for Jars and WARs -->
|
|
|
|
<target name="make-manifest">
|
|
|
|
<!-- If possible, include the svnversion -->
|
2008-08-29 14:18:16 -04:00
|
|
|
<exec dir="." executable="${svnversion.exe}" outputproperty="svnversion" failifexecutionfails="false">
|
2008-06-24 00:49:25 -04:00
|
|
|
<arg line="."/>
|
|
|
|
</exec>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2008-06-24 00:49:25 -04:00
|
|
|
<!-- no description, don't advertise -->
|
2008-08-13 06:08:04 -04:00
|
|
|
<mkdir dir="${dest}/META-INF/" />
|
|
|
|
<manifest mode="replace" file="${dest}/META-INF/MANIFEST.MF">
|
2008-06-24 00:49:25 -04:00
|
|
|
<!--
|
|
|
|
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
|
|
|
|
http://java.sun.com/j2se/1.5.0/docs/guide/versioning/spec/versioning2.html
|
|
|
|
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Package.html
|
|
|
|
http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/package-summary.html
|
|
|
|
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
|
|
|
|
-->
|
|
|
|
<!-- Don't set 'Manifest-Version' it identifies the version of the
|
|
|
|
manifest file format, and should always be 1.0 (the default)
|
|
|
|
|
|
|
|
Don't set 'Created-by' attribute, its purpose is
|
|
|
|
to identify the version of java used to build the jar,
|
|
|
|
which ant will do by default.
|
|
|
|
|
|
|
|
Ant will happily override these with bogus strings if you
|
|
|
|
tell it to, so don't.
|
|
|
|
|
|
|
|
NOTE: we don't use section info because all of our manifest data
|
|
|
|
applies to the entire jar/war ... no package specific info.
|
|
|
|
-->
|
|
|
|
<attribute name="Extension-Name"
|
|
|
|
value="org.apache.solr"/>
|
|
|
|
<attribute name="Specification-Title"
|
|
|
|
value="Apache Solr Search Server"/>
|
|
|
|
<!-- spec version must match "digit+{.digit+}*" -->
|
|
|
|
<attribute name="Specification-Version"
|
|
|
|
value="${specversion}"/>
|
|
|
|
<attribute name="Specification-Vendor"
|
|
|
|
value="The Apache Software Foundation"/>
|
|
|
|
<attribute name="Implementation-Title"
|
|
|
|
value="org.apache.solr"/>
|
|
|
|
<!-- impl version can be any string -->
|
|
|
|
<attribute name="Implementation-Version"
|
|
|
|
value="${version} ${svnversion} - ${user.name} - ${DSTAMP} ${TSTAMP}"/>
|
|
|
|
<attribute name="Implementation-Vendor"
|
|
|
|
value="The Apache Software Foundation"/>
|
|
|
|
<attribute name="X-Compile-Source-JDK"
|
|
|
|
value="${java.compat.version}"/>
|
|
|
|
<attribute name="X-Compile-Target-JDK"
|
|
|
|
value="${java.compat.version}"/>
|
|
|
|
</manifest>
|
|
|
|
</target>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2011-03-18 14:40:02 -04:00
|
|
|
<!-- Validation -->
|
|
|
|
<target name="validate" depends="validate-solr"/>
|
|
|
|
<target name="validate-solr" depends="check-legal-solr" unless="validated-solr"/>
|
|
|
|
|
2011-03-22 14:03:57 -04:00
|
|
|
<target name="check-legal-solr" depends="compile-tools">
|
2011-03-18 14:40:02 -04:00
|
|
|
<java classname="org.apache.lucene.validation.DependencyChecker" failonerror="true" fork="true">
|
|
|
|
<classpath>
|
2011-03-22 14:03:57 -04:00
|
|
|
<path refid="tools.runtime.classpath" />
|
2011-03-18 14:40:02 -04:00
|
|
|
</classpath>
|
|
|
|
<!-- TODO: it might be better to just automatically find all directories that contain jar files, but that could take a
|
|
|
|
long time. This should be faster, but we could miss a directory
|
|
|
|
-->
|
|
|
|
<!-- Solr -->
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/analysis-extras/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/clustering/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/dataimporthandler/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/extraction/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/uima/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/example/example-DIH/solr/db/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/example/example-DIH/solr/mail/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/example/example/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/src/test-files/solr/lib" />
|
|
|
|
</java>
|
|
|
|
</target>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2011-05-30 20:08:14 -04:00
|
|
|
<path id="tools.runtime.classpath">
|
|
|
|
<pathelement location="${common-solr.dir}/../lucene/build/classes/tools"/>
|
|
|
|
</path>
|
|
|
|
<target name="compile-tools" description="Compile the Test Framework and Validation tools">
|
|
|
|
<sequential>
|
|
|
|
<subant target="compile-tools" inheritall="false" failonerror="true">
|
|
|
|
<fileset dir="${common-solr.dir}/../lucene" includes="build.xml" />
|
|
|
|
</subant>
|
|
|
|
</sequential>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2008-08-28 16:17:07 -04:00
|
|
|
</project>
|