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.
|
|
|
|
-->
|
|
|
|
|
2012-09-06 09:53:35 -04:00
|
|
|
<project name="common-solr" default="default" xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
|
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
|
|
|
|
|
|
|
<property name="Name" value="Solr" />
|
2011-07-08 02:41:23 -04:00
|
|
|
|
2013-03-18 08:28:52 -04:00
|
|
|
<!-- solr uses 1.7 -->
|
|
|
|
<property name="javac.source" value="1.7"/>
|
|
|
|
<property name="javac.target" value="1.7"/>
|
2012-01-18 14:28:39 -05:00
|
|
|
<property name="javac.args" value=""/>
|
2011-07-08 02:41:23 -04:00
|
|
|
|
2012-09-20 11:37:42 -04:00
|
|
|
<property name="dest" location="${common-solr.dir}/build" />
|
2011-07-08 02:41:23 -04:00
|
|
|
<property name="build.dir" location="${dest}/${ant.project.name}"/>
|
|
|
|
<property name="dist" location="${common-solr.dir}/dist"/>
|
|
|
|
<property name="package.dir" location="${common-solr.dir}/package"/>
|
|
|
|
<property name="maven.dist.dir" location="${package.dir}/maven"/>
|
|
|
|
<property name="lucene-libs" location="${dest}/lucene-libs" />
|
2012-09-20 11:37:42 -04:00
|
|
|
<property name="tests.userdir" location="src/test-files"/>
|
|
|
|
<property name="example" location="${common-solr.dir}/example" />
|
|
|
|
<property name="javadoc.dir" location="${dest}/docs"/>
|
2011-07-09 19:01:53 -04:00
|
|
|
<property name="tests.cleanthreads.sysprop" value="perClass"/>
|
2010-08-24 09:20:15 -04:00
|
|
|
|
2012-09-21 08:12:09 -04:00
|
|
|
<property name="changes.target.dir" location="${dest}/docs/changes"/>
|
|
|
|
<property name="license.dir" location="${common-solr.dir}/licenses"/>
|
2012-08-29 02:26:02 -04:00
|
|
|
|
2012-04-14 22:07:08 -04:00
|
|
|
<import file="${common-solr.dir}/../lucene/module-build.xml"/>
|
2012-04-04 13:53:32 -04:00
|
|
|
|
2013-04-23 10:17:17 -04:00
|
|
|
<!-- backwards compatibility with existing targets/tasks; TODO: remove this! -->
|
|
|
|
<property name="fullnamever" value="${final.name}"/>
|
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<path id="additional.dependencies">
|
2012-09-06 18:47:01 -04:00
|
|
|
<fileset dir="${common-solr.dir}/core/lib" excludes="${common.classpath.excludes}"/>
|
|
|
|
<fileset dir="${common-solr.dir}/solrj/lib" excludes="${common.classpath.excludes}"/>
|
2012-04-04 13:53:32 -04:00
|
|
|
<fileset dir="${common-solr.dir}/example/lib" excludes="${common.classpath.excludes}"/>
|
2012-05-07 13:24:42 -04:00
|
|
|
<fileset dir="${common-solr.dir}/example/example-DIH/solr/db/lib" excludes="${common.classpath.excludes}"/>
|
2012-04-04 13:53:32 -04:00
|
|
|
<fileset dir="lib" excludes="${common.classpath.excludes}" erroronmissingdir="false"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
</path>
|
2008-08-29 14:18:16 -04:00
|
|
|
|
2013-02-05 04:15:35 -05:00
|
|
|
<!-- defined here to be able to make the forbidden-api checker correctly
|
|
|
|
reference it. 'ivy.xml' is also referencing this property. -->
|
|
|
|
<property name="commons-io.version" value="2.1" />
|
2011-04-01 02:58:12 -04:00
|
|
|
|
2012-07-23 13:33:24 -04:00
|
|
|
<path id="solr.lucene.libs">
|
|
|
|
<!-- List of jars that will be used as the foundation for both
|
|
|
|
the base classpath, as well as copied into the lucene-libs dir
|
|
|
|
in the release.
|
|
|
|
-->
|
|
|
|
<!-- NOTE: lucene-core is explicitly not included because of the
|
|
|
|
base.classpath (compilation & tests are done directly against
|
|
|
|
the class files w/o needing to build the jar)
|
|
|
|
-->
|
|
|
|
<pathelement location="${analyzers-common.jar}"/>
|
|
|
|
<pathelement location="${analyzers-kuromoji.jar}"/>
|
|
|
|
<pathelement location="${analyzers-phonetic.jar}"/>
|
2013-03-01 04:41:03 -05:00
|
|
|
<pathelement location="${codecs.jar}"/>
|
2012-07-23 13:33:24 -04:00
|
|
|
<pathelement location="${highlighter.jar}"/>
|
|
|
|
<pathelement location="${memory.jar}"/>
|
|
|
|
<pathelement location="${misc.jar}"/>
|
|
|
|
<pathelement location="${spatial.jar}"/>
|
|
|
|
<pathelement location="${suggest.jar}"/>
|
|
|
|
<pathelement location="${grouping.jar}"/>
|
|
|
|
<pathelement location="${queries.jar}"/>
|
|
|
|
<pathelement location="${queryparser.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<path id="solr.base.classpath">
|
2011-07-08 02:41:23 -04:00
|
|
|
<pathelement location="${common-solr.dir}/build/solr-solrj/classes/java"/>
|
|
|
|
<pathelement location="${common-solr.dir}/build/solr-core/classes/java"/>
|
2012-07-23 13:33:24 -04:00
|
|
|
<path refid="solr.lucene.libs" />
|
2012-03-30 14:04:43 -04:00
|
|
|
<path refid="additional.dependencies"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
<path refid="base.classpath"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
</path>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<path id="classpath" refid="solr.base.classpath"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<path id="solr.test.base.classpath">
|
2011-07-08 02:41:23 -04:00
|
|
|
<pathelement path="${common-solr.dir}/build/solr-test-framework/classes/java"/>
|
2013-06-26 16:18:33 -04:00
|
|
|
<fileset dir="${common-solr.dir}/test-framework/lib">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
<exclude name="junit-*.jar" />
|
|
|
|
<exclude name="randomizedtesting-runner-*.jar" />
|
|
|
|
<exclude name="ant*.jar" />
|
|
|
|
</fileset>
|
2012-03-26 16:53:33 -04:00
|
|
|
<pathelement path="${build.dir}/test-files"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
<path refid="test.base.classpath"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath" refid="solr.test.base.classpath"/>
|
|
|
|
|
|
|
|
<macrodef name="solr-contrib-uptodate">
|
|
|
|
<attribute name="name"/>
|
|
|
|
<attribute name="property" default="@{name}.uptodate"/>
|
|
|
|
<attribute name="classpath.property" default="@{name}.jar"/>
|
|
|
|
<!-- set jarfile only, if the target jar file has no generic name -->
|
2013-01-12 12:51:57 -05:00
|
|
|
<attribute name="jarfile" default="${common-solr.dir}/build/contrib/solr-@{name}/solr-@{name}-${version}.jar"/>
|
2011-07-14 17:02:51 -04:00
|
|
|
<sequential>
|
2011-04-01 02:58:12 -04:00
|
|
|
<!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/java'"/>-->
|
|
|
|
<property name="@{classpath.property}" location="@{jarfile}"/>
|
|
|
|
<uptodate property="@{property}" targetfile="@{jarfile}">
|
2011-06-01 18:37:09 -04:00
|
|
|
<srcfiles dir="${common-solr.dir}/contrib/@{name}/src/java" includes="**/*.java"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
</uptodate>
|
2008-09-19 11:07:17 -04:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2012-02-13 09:12:59 -05:00
|
|
|
<target name="validate" depends="compile-tools">
|
2011-03-18 14:40:02 -04:00
|
|
|
</target>
|
2011-07-08 02:41:23 -04:00
|
|
|
|
|
|
|
<target name="init-dist" >
|
|
|
|
<mkdir dir="${build.dir}"/>
|
|
|
|
<mkdir dir="${package.dir}"/>
|
|
|
|
<mkdir dir="${dist}"/>
|
|
|
|
<mkdir dir="${maven.dist.dir}"/>
|
2011-05-30 20:08:14 -04:00
|
|
|
</target>
|
|
|
|
|
2011-07-28 00:02:09 -04:00
|
|
|
<target name="prep-lucene-jars"
|
2013-03-01 04:41:03 -05:00
|
|
|
depends="jar-lucene-core, jar-analyzers-phonetic, jar-analyzers-kuromoji, jar-codecs, jar-suggest, jar-highlighter, jar-memory,
|
2011-08-20 00:57:58 -04:00
|
|
|
jar-misc, jar-spatial, jar-grouping, jar-queries, jar-queryparser">
|
2011-07-28 00:02:09 -04:00
|
|
|
<property name="solr.deps.compiled" value="true"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lucene-jars-to-solr" depends="prep-lucene-jars">
|
|
|
|
<!-- TODO: clean this up -->
|
|
|
|
<sequential>
|
2011-07-08 02:41:23 -04:00
|
|
|
<ant dir="${common.dir}" target="default" inheritall="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
2012-07-23 13:33:24 -04:00
|
|
|
<path refid="solr.lucene.libs" />
|
|
|
|
<!-- NOTE: lucene-core is not already included in "solr.lucene.libs"
|
|
|
|
because of it's use in classpaths.
|
|
|
|
-->
|
2011-07-28 00:02:09 -04:00
|
|
|
<fileset file="${lucene-core.jar}" />
|
2011-07-08 02:41:23 -04:00
|
|
|
</copy>
|
2011-07-28 00:02:09 -04:00
|
|
|
</sequential>
|
2011-07-08 02:41:23 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Shared core/solrj/test-framework/contrib targets -->
|
2012-02-15 10:30:53 -05:00
|
|
|
|
|
|
|
<macrodef name="solr-jarify" description="Builds a Solr JAR file">
|
|
|
|
<attribute name="basedir" default="${build.dir}/classes/java"/>
|
|
|
|
<attribute name="destfile" default="${build.dir}/${final.name}.jar"/>
|
|
|
|
<attribute name="title" default="Apache Solr Search Server: ${ant.project.name}"/>
|
|
|
|
<attribute name="excludes" default="**/pom.xml,**/*.iml"/>
|
|
|
|
<attribute name="metainf.source.dir" default="${common-solr.dir}"/>
|
|
|
|
<attribute name="implementation.title" default="org.apache.solr"/>
|
2013-04-09 09:51:01 -04:00
|
|
|
<attribute name="spec.version" default="${spec.version}"/>
|
2012-02-15 10:30:53 -05:00
|
|
|
<attribute name="manifest.file" default="${manifest.file}"/>
|
|
|
|
<element name="nested" optional="true" implicit="true"/>
|
|
|
|
<sequential>
|
|
|
|
<jarify basedir="@{basedir}" destfile="@{destfile}"
|
|
|
|
title="@{title}" excludes="@{excludes}"
|
|
|
|
metainf.source.dir="@{metainf.source.dir}"
|
|
|
|
implementation.title="@{implementation.title}"
|
|
|
|
spec.version="@{spec.version}"
|
|
|
|
manifest.file="@{manifest.file}">
|
|
|
|
<nested/>
|
|
|
|
</jarify>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2013-02-06 12:57:53 -05:00
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<target name="jar-core" depends="compile-core">
|
2012-02-15 10:30:53 -05:00
|
|
|
<solr-jarify/>
|
2011-07-08 02:41:23 -04:00
|
|
|
</target>
|
|
|
|
|
2012-05-07 15:03:39 -04:00
|
|
|
<target name="compile-core" depends="prep-lucene-jars,resolve-example,common.compile-core"/>
|
2012-03-26 16:53:33 -04:00
|
|
|
<target name="compile-test" depends="sync-resources,compile-solr-test-framework,common.compile-test"/>
|
2011-07-28 00:02:09 -04:00
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<target name="dist" depends="jar-core">
|
|
|
|
<copy file="${build.dir}/${fullnamever}.jar" todir="${dist}"/>
|
2011-05-30 20:08:14 -04:00
|
|
|
</target>
|
|
|
|
|
2012-04-21 20:07:15 -04:00
|
|
|
<property name="lucenedocs" location="${common.dir}/build/docs"/>
|
2012-04-21 03:51:46 -04:00
|
|
|
|
|
|
|
<!-- dependency to ensure all lucene javadocs are present -->
|
2013-03-01 04:41:03 -05:00
|
|
|
<target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-codecs,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial,javadocs-test-framework"/>
|
2012-04-21 03:51:46 -04:00
|
|
|
|
|
|
|
<!-- create javadocs for the current module -->
|
2012-09-20 12:15:10 -04:00
|
|
|
<target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs,javadocs-solr-core">
|
2011-07-08 02:41:23 -04:00
|
|
|
<sequential>
|
2012-09-20 11:37:42 -04:00
|
|
|
<mkdir dir="${javadoc.dir}/${name}"/>
|
2012-04-21 03:51:46 -04:00
|
|
|
<solr-invoke-javadoc>
|
|
|
|
<solrsources>
|
2011-07-08 02:41:23 -04:00
|
|
|
<packageset dir="${src.dir}"/>
|
2012-04-21 03:51:46 -04:00
|
|
|
</solrsources>
|
2012-09-20 12:15:10 -04:00
|
|
|
<links>
|
|
|
|
<link href="../solr-solrj"/>
|
|
|
|
<link href="../solr-core"/>
|
|
|
|
</links>
|
2012-04-21 03:51:46 -04:00
|
|
|
</solr-invoke-javadoc>
|
2012-09-20 11:37:42 -04:00
|
|
|
<solr-jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
</sequential>
|
|
|
|
</target>
|
2011-05-30 20:08:14 -04:00
|
|
|
|
2012-09-20 12:15:10 -04:00
|
|
|
<target name="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
|
2013-01-12 12:51:57 -05:00
|
|
|
<uptodate property="solr-core-javadocs.uptodate" targetfile="${build.dir}/solr-core/solr-core-${version}-javadoc.jar">
|
2012-09-20 12:15:10 -04:00
|
|
|
<srcfiles dir="${common-solr.dir}/core/src/java" includes="**/*.java"/>
|
|
|
|
</uptodate>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
|
2013-01-12 12:51:57 -05:00
|
|
|
<uptodate property="solrj-javadocs.uptodate" targetfile="${build.dir}/solr-solrj/solr-solrj-${version}-javadoc.jar">
|
2012-09-20 12:15:10 -04:00
|
|
|
<srcfiles dir="${common-solr.dir}/solrj/src/java" includes="**/*.java"/>
|
|
|
|
</uptodate>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javadocs-solr-core" depends="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
|
|
|
|
<ant dir="${common-solr.dir}/core" target="javadocs" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="solr-core-javadocs.uptodate" value="true"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javadocs-solrj" depends="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
|
|
|
|
<ant dir="${common-solr.dir}/solrj" target="javadocs" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="solrj-javadocs.uptodate" value="true"/>
|
|
|
|
</target>
|
|
|
|
|
2012-04-21 03:51:46 -04:00
|
|
|
<!-- macro to create solr javadocs with links to lucene. make sure calling task depends on lucene-javadocs -->
|
|
|
|
<macrodef name="solr-invoke-javadoc">
|
|
|
|
<element name="solrsources" optional="yes"/>
|
2012-09-20 12:15:10 -04:00
|
|
|
<element name="links" optional="yes"/>
|
2012-09-20 11:37:42 -04:00
|
|
|
<attribute name="destdir" default="${javadoc.dir}/${name}"/>
|
2012-04-21 03:51:46 -04:00
|
|
|
<attribute name="title" default="${Name} ${version} ${name} API"/>
|
|
|
|
<attribute name="overview" default="${src.dir}/overview.html"/>
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="@{destdir}"/>
|
|
|
|
<invoke-javadoc destdir="@{destdir}" title="@{title}" overview="@{overview}">
|
|
|
|
<sources>
|
|
|
|
<solrsources/>
|
2012-07-26 15:38:41 -04:00
|
|
|
<link offline="true" href="${lucene.javadoc.url}core" packagelistloc="${lucenedocs}/core"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-common" packagelistloc="${lucenedocs}/analyzers-common"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-icu" packagelistloc="${lucenedocs}/analyzers-icu"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-kuromoji" packagelistloc="${lucenedocs}/analyzers-kuromoji"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-morfologik" packagelistloc="${lucenedocs}/analyzers-morfologik"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-phonetic" packagelistloc="${lucenedocs}/analyzers-phonetic"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-smartcn" packagelistloc="${lucenedocs}/analyzers-smartcn"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-stempel" packagelistloc="${lucenedocs}/analyzers-stempel"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}analyzers-uima" packagelistloc="${lucenedocs}/analyzers-uima"/>
|
2013-03-01 04:41:03 -05:00
|
|
|
<link offline="true" href="${lucene.javadoc.url}codecs" packagelistloc="${lucenedocs}/codecs"/>
|
2012-07-26 15:38:41 -04:00
|
|
|
<link offline="true" href="${lucene.javadoc.url}suggest" packagelistloc="${lucenedocs}/suggest"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}grouping" packagelistloc="${lucenedocs}/grouping"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}queries" packagelistloc="${lucenedocs}/queries"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}queryparser" packagelistloc="${lucenedocs}/queryparser"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}highlighter" packagelistloc="${lucenedocs}/highlighter"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}memory" packagelistloc="${lucenedocs}/memory"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}misc" packagelistloc="${lucenedocs}/misc"/>
|
|
|
|
<link offline="true" href="${lucene.javadoc.url}spatial" packagelistloc="${lucenedocs}/spatial"/>
|
2012-09-20 12:15:10 -04:00
|
|
|
<links/>
|
2012-04-21 03:51:46 -04:00
|
|
|
<link href=""/>
|
|
|
|
</sources>
|
|
|
|
</invoke-javadoc>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2012-09-22 10:42:46 -04:00
|
|
|
<target name="define-lucene-javadoc-url" depends="resolve-groovy" unless="lucene.javadoc.url">
|
|
|
|
<script language="groovy" classpathref="groovy.classpath"><![CDATA[
|
|
|
|
String url, version = project.getProperty('version');
|
2012-09-20 16:39:26 -04:00
|
|
|
if (version.contains('-SNAPSHOT')) {
|
|
|
|
url = new File(project.getProperty('common.dir'), 'build' + File.separator + 'docs').toURI().toASCIIString();
|
2012-09-22 10:42:46 -04:00
|
|
|
if (!(url =~ /\/$/)) url += '/';
|
2012-09-20 16:39:26 -04:00
|
|
|
} else {
|
|
|
|
version = version.replace('.', '_');
|
2012-09-20 16:59:43 -04:00
|
|
|
url = 'http://lucene.apache.org/core/' + version + '/';
|
2012-09-20 16:39:26 -04:00
|
|
|
}
|
2012-09-22 10:42:46 -04:00
|
|
|
self.log('Using the following URL to refer to Lucene Javadocs: ' + url);
|
2012-09-20 16:39:26 -04:00
|
|
|
project.setProperty('lucene.javadoc.url', url);
|
|
|
|
]]></script>
|
2011-12-03 16:52:04 -05:00
|
|
|
</target>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<target name="jar-src" depends="init">
|
2012-02-15 10:30:53 -05:00
|
|
|
<solr-jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
</target>
|
|
|
|
|
2012-04-03 16:52:02 -04:00
|
|
|
<target name="m2-deploy-solr-parent-pom" depends="filter-pom-templates"
|
|
|
|
unless="deployed.solr.parent.pom.uptodate">
|
|
|
|
<m2-deploy pom.xml="${filtered.pom.templates.dir}/solr/pom.xml"/> <!-- Solr parent POM -->
|
|
|
|
<property name="deployed.solr.parent.pom.uptodate" value="true"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="dist-maven"
|
|
|
|
depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common"/>
|
|
|
|
|
2012-09-06 18:17:03 -04:00
|
|
|
<target name="dist-maven-src-java"
|
|
|
|
depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common-src-java"/>
|
|
|
|
|
2013-01-03 04:18:17 -05:00
|
|
|
<target name="-validate-maven-dependencies" depends="-validate-maven-dependencies.init">
|
|
|
|
<m2-validate-dependencies pom.xml="${maven.pom.xml}" licenseDirectory="${license.dir}">
|
2012-09-06 09:53:35 -04:00
|
|
|
<additional-filters>
|
|
|
|
<replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
|
|
|
|
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
|
|
|
|
<replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
|
|
|
|
</additional-filters>
|
|
|
|
<excludes>
|
|
|
|
<rsel:or>
|
2013-01-02 18:29:45 -05:00
|
|
|
<rsel:name name="**/lucene-*-${maven.version.glob}.jar" handledirsep="true"/>
|
|
|
|
<rsel:name name="**/solr-*-${maven.version.glob}.jar" handledirsep="true"/>
|
2012-09-06 09:53:35 -04:00
|
|
|
<!-- TODO: figure out what is going on here with servlet-apis -->
|
|
|
|
<rsel:name name="**/*servlet*.jar" handledirsep="true"/>
|
|
|
|
</rsel:or>
|
|
|
|
</excludes>
|
|
|
|
</m2-validate-dependencies>
|
|
|
|
</target>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<!-- Solr core targets -->
|
|
|
|
<target name="compile-solr-core" description="Compile Solr core." unless="solr.core.compiled">
|
|
|
|
<ant dir="${common-solr.dir}/core" target="compile-core" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="solr.core.compiled" value="true"/>
|
|
|
|
</target>
|
|
|
|
<target name="compile-test-solr-core" description="Compile solr core tests">
|
|
|
|
<ant dir="${common-solr.dir}/core" target="compile-test" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="solr.core.compiled" value="true"/>
|
|
|
|
</target>
|
|
|
|
<target name="dist-core" depends="init-dist"
|
|
|
|
description="Creates the Solr JAR Distribution file.">
|
|
|
|
<ant dir="${common-solr.dir}/core" target="dist" inheritall="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Solrj targets -->
|
|
|
|
<target name="compile-solrj" description="Compile the java client." unless="solrj.compiled">
|
|
|
|
<ant dir="${common-solr.dir}/solrj" target="compile-core" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="solrj.compiled" value="true"/>
|
|
|
|
</target>
|
|
|
|
<target name="compile-test-solrj" description="Compile java client tests">
|
|
|
|
<ant dir="${common-solr.dir}/solrj" target="compile-test" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="solrj.compiled" value="true"/>
|
|
|
|
</target>
|
|
|
|
<target name="dist-solrj" depends="init-dist"
|
|
|
|
description="Creates the Solr-J JAR Distribution file.">
|
|
|
|
<ant dir="${common-solr.dir}/solrj" target="dist" inheritall="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
</target>
|
2013-02-06 12:57:53 -05:00
|
|
|
<target name="jar-solrj" description="Jar Solr-J">
|
|
|
|
<ant dir="${common-solr.dir}/solrj" target="jar-core" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
</target>
|
2011-07-08 02:41:23 -04:00
|
|
|
|
2012-03-26 16:59:42 -04:00
|
|
|
<!-- TODO: really a copy should work: but sync is currently safer
|
|
|
|
since some buggy tests don't create their own tempdir but
|
|
|
|
modify this target directory directly... -->
|
2012-03-26 16:53:33 -04:00
|
|
|
<target name="sync-resources">
|
2012-03-26 16:59:42 -04:00
|
|
|
<sync todir="${build.dir}/test-files">
|
2012-03-26 16:53:33 -04:00
|
|
|
<fileset dir="${tests.userdir}"/>
|
2012-03-26 16:59:42 -04:00
|
|
|
</sync>
|
2012-03-26 16:53:33 -04:00
|
|
|
</target>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<!-- Solr test-framework targets -->
|
|
|
|
<target name="compile-solr-test-framework" description="Compile the Solr test-framework" unless="solr.test.framework.compiled">
|
|
|
|
<ant dir="${common-solr.dir}/test-framework" target="compile-core" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
2011-07-28 00:02:09 -04:00
|
|
|
<property name="solr.core.compiled" value="true"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
<property name="solr.test.framework.compiled" value="true"/>
|
|
|
|
</target>
|
|
|
|
|
2013-02-06 12:57:53 -05:00
|
|
|
<target name="jar-solr-test-framework" depends="compile-solr-test-framework">
|
|
|
|
<ant dir="${common-solr.dir}/test-framework" target="jar-core" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
</target>
|
|
|
|
|
2012-05-07 15:03:39 -04:00
|
|
|
<!-- resolve dependencies in the example (relied upon by compile/tests) -->
|
|
|
|
<target name="resolve-example" unless="example.libs.uptodate">
|
2012-03-30 14:04:43 -04:00
|
|
|
<ant dir="${common-solr.dir}/example" target="resolve" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
2012-05-07 15:03:39 -04:00
|
|
|
<ant dir="${common-solr.dir}/example/example-DIH" target="resolve" inheritAll="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
<property name="example.libs.uptodate" value="true"/>
|
2012-03-30 14:04:43 -04:00
|
|
|
</target>
|
|
|
|
|
2012-04-17 09:36:19 -04:00
|
|
|
<macrodef name="contrib-crawl">
|
|
|
|
<attribute name="target" default=""/>
|
|
|
|
<attribute name="failonerror" default="true"/>
|
|
|
|
<sequential>
|
|
|
|
<subant target="@{target}" failonerror="@{failonerror}" inheritall="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
<fileset dir="." includes="contrib/*/build.xml"/>
|
|
|
|
</subant>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<!-- Solr contrib targets -->
|
2011-07-28 00:02:09 -04:00
|
|
|
<target name="compile-contrib" description="Compile contrib modules">
|
|
|
|
<contrib-crawl target="compile-core"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
</target>
|
2012-09-20 11:37:42 -04:00
|
|
|
|
2011-07-28 09:15:59 -04:00
|
|
|
<target name="compile-test-contrib" description="Compile contrib modules' tests">
|
|
|
|
<contrib-crawl target="compile-test"/>
|
|
|
|
</target>
|
2011-07-28 00:02:09 -04:00
|
|
|
|
2012-09-20 11:37:42 -04:00
|
|
|
<target name="javadocs-contrib" description="Compile contrib modules">
|
|
|
|
<contrib-crawl target="javadocs"/>
|
|
|
|
</target>
|
|
|
|
|
2013-02-06 12:57:53 -05:00
|
|
|
<target name="jar-contrib" description="Jar contrib modules">
|
|
|
|
<contrib-crawl target="jar-core"/>
|
|
|
|
</target>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<target name="contribs-add-to-war">
|
|
|
|
<mkdir dir="${dest}/web"/>
|
|
|
|
<delete dir="${dest}/web" includes="**/*" failonerror="false"/>
|
|
|
|
<contrib-crawl target="add-to-war"/>
|
|
|
|
</target>
|
2012-11-30 13:33:44 -05:00
|
|
|
|
|
|
|
<!-- hack for now to disable *all* Solr tests on Jenkins when "tests.disable-solr" property is set -->
|
|
|
|
<target name="test" unless="tests.disable-solr">
|
2012-11-30 13:53:23 -05:00
|
|
|
<antcall target="common.test" inheritrefs="true" inheritall="true"/>
|
2012-11-30 13:33:44 -05:00
|
|
|
</target>
|
2008-08-28 16:17:07 -04:00
|
|
|
</project>
|