2006-01-29 10:16:56 -05:00
|
|
|
<!-- Solr build file -->
|
2006-11-09 18:13:58 -05: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.
|
|
|
|
-->
|
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<project name="solr" default="usage" basedir=".">
|
|
|
|
<!-- Initialize property values: allow easy customization via build.properties -->
|
|
|
|
<property file="build.properties" />
|
|
|
|
|
2006-02-17 19:17:44 -05:00
|
|
|
<property name="Name" value="Solr" />
|
|
|
|
|
2006-11-29 02:08:17 -05:00
|
|
|
<tstamp>
|
|
|
|
<format property="year" pattern="yyyy"/>
|
|
|
|
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
|
|
|
|
<format property="TSTAMP" pattern="HH:mm:ss"/>
|
2006-12-05 02:34:22 -05:00
|
|
|
<!-- datetime format that is safe to treat as part of a dotted version -->
|
|
|
|
<format property="dateversion" pattern="yyyy.MM.dd.HH.mm.ss" />
|
2006-11-29 02:08:17 -05:00
|
|
|
</tstamp>
|
|
|
|
|
|
|
|
<!-- Java Version we are compatible with -->
|
|
|
|
<property name="java.compat.version" value="1.5" />
|
|
|
|
|
2006-12-05 02:34:22 -05:00
|
|
|
<!-- Solr Implimentation Version -->
|
|
|
|
<!--
|
|
|
|
This can be any string value that does not include spaces
|
|
|
|
This will be used when creating build artifact file names.
|
2006-01-29 10:16:56 -05:00
|
|
|
|
2006-12-05 02:34:22 -05:00
|
|
|
By default, this should be set to "X.Y.N-dev" where X.Y.N is
|
|
|
|
"1 greater" then the last version released (on this branch).
|
|
|
|
-->
|
2006-12-16 22:37:59 -05:00
|
|
|
<property name="version" value="1.2-dev" />
|
2006-12-05 02:34:22 -05: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).
|
|
|
|
-->
|
2006-12-16 22:37:59 -05:00
|
|
|
<property name="specversion" value="1.1.${dateversion}" />
|
2006-12-05 02:34:22 -05:00
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<!-- 3rd party libraries for compilation -->
|
|
|
|
<property name="lib" value="lib" />
|
|
|
|
|
|
|
|
<!-- solr source files -->
|
|
|
|
<property name="src" value="src" />
|
|
|
|
|
|
|
|
<!-- Destination for compiled classes and binaries -->
|
|
|
|
<property name="dest" value="build" />
|
|
|
|
|
|
|
|
<!-- Destination for distribution files (demo WAR, src distro, etc.) -->
|
|
|
|
<property name="dist" value="dist" />
|
|
|
|
|
2006-12-08 16:01:58 -05:00
|
|
|
<!-- Type of checksum to compute for distribution files -->
|
|
|
|
<property name="checksum.algorithm" value="md5" />
|
|
|
|
|
2006-02-15 20:05:55 -05:00
|
|
|
<!-- Example directory -->
|
|
|
|
<property name="example" value="example" />
|
|
|
|
|
2006-11-28 17:36:42 -05:00
|
|
|
<property name="fullname" value="apache-${ant.project.name}"/>
|
2007-01-17 18:46:30 -05:00
|
|
|
<property name="fullnamever" value="apache-${ant.project.name}-${version}"/>
|
2006-11-28 17:36:42 -05:00
|
|
|
|
2006-05-27 17:55:39 -04:00
|
|
|
<!-- Javadoc properties -->
|
2006-11-29 02:08:17 -05:00
|
|
|
<property name="javadoc.years" value="2006 - ${year}" />
|
2006-02-17 19:17:44 -05:00
|
|
|
<property name="build.docs" value="${dest}/docs"/>
|
2006-05-27 20:41:33 -04:00
|
|
|
<property name="build.javadoc" value="${build.docs}/api"/>
|
|
|
|
<property name="javadoc.access" value="protected"/>
|
2006-02-17 19:17:44 -05:00
|
|
|
<property name="javadoc.link.java"
|
|
|
|
value="http://java.sun.com/j2se/1.5.0/docs/api/"/>
|
2006-05-26 21:35:44 -04:00
|
|
|
<property name="javadoc.link.junit"
|
|
|
|
value="http://junit.sourceforge.net/javadoc/"/>
|
|
|
|
<property name="javadoc.link.lucene"
|
|
|
|
value="http://lucene.apache.org/java/docs/api/"/>
|
2006-02-17 19:17:44 -05:00
|
|
|
<property name="javadoc.packages" value="org.apache.solr.*"/>
|
|
|
|
|
2006-05-27 17:55:39 -04:00
|
|
|
<!-- JUnit properties -->
|
2006-04-11 00:36:46 -04:00
|
|
|
<property name="junit.output.dir" location="${dest}/test-results"/>
|
|
|
|
<property name="junit.reports" location="${dest}/test-results/reports"/>
|
|
|
|
<property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
|
2007-01-05 18:14:26 -05:00
|
|
|
<available property="junitPresent"
|
|
|
|
classname="junit.framework.TestCase" />
|
2006-04-11 00:36:46 -04:00
|
|
|
|
2006-12-08 16:01:58 -05: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"/>
|
|
|
|
<!-- NOTE: we use the value of @{file} in the names any properties
|
|
|
|
set because macro's don't have variables, and otherwise we
|
|
|
|
wouldn't be able to checksum more then one file per build
|
|
|
|
-->
|
|
|
|
<sequential>
|
|
|
|
<checksum file="@{file}"
|
|
|
|
property="@{file}.sum"
|
|
|
|
algorithm="${checksum.algorithm}" />
|
|
|
|
<basename file="@{file}" property="@{file}.base" />
|
|
|
|
<concat destfile="@{file}.${checksum.algorithm}"
|
|
|
|
force="yes"
|
|
|
|
append="false"
|
|
|
|
fixlastline="yes">
|
|
|
|
<header trimleading="yes">${@{file}.sum} </header>
|
|
|
|
<!-- empty fileset to trick concat -->
|
|
|
|
<fileset dir="." excludes="**" />
|
|
|
|
<footer trimleading="yes">${@{file}.base}
|
|
|
|
</footer>
|
|
|
|
</concat>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<!-- Default target: usage. Prints out instructions. -->
|
|
|
|
<target name="usage"
|
|
|
|
description="Prints out instructions">
|
|
|
|
<echo message="Welcome to the Solr project!" />
|
2006-12-08 02:48:20 -05:00
|
|
|
<echo message="Use 'ant example' to create a runnable example configuration." />
|
|
|
|
<echo message="And for developers:"/>
|
|
|
|
<echo message="Use 'ant clean' to clean compiled files." />
|
2006-01-29 10:50:23 -05:00
|
|
|
<echo message="Use 'ant compile' to compile the source code." />
|
2006-11-28 17:36:42 -05:00
|
|
|
<echo message="Use 'ant dist' to build the project WAR and JAR files." />
|
|
|
|
<echo message="Use 'ant package' to build a .zip and .tgz for distribution." />
|
2006-01-29 10:16:56 -05:00
|
|
|
<echo message="Use 'ant test' to run unit tests." />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Clean: cleans compiled files and other temporary artifacts. -->
|
|
|
|
<target name="clean"
|
|
|
|
description="Cleans compiled files and other temporary artifacts.">
|
|
|
|
<delete dir="${dest}" />
|
2006-02-17 19:17:44 -05:00
|
|
|
<delete dir="${dist}" />
|
2006-01-29 10:16:56 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2006-01-29 10:50:23 -05:00
|
|
|
<!-- ========================================================================= -->
|
2006-01-29 10:16:56 -05:00
|
|
|
<!-- ===================== COMPILATION-RELATED TASKS ========================= -->
|
2006-01-29 10:50:23 -05:00
|
|
|
<!-- ========================================================================= -->
|
2006-01-29 10:16:56 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- The compilation classpath -->
|
|
|
|
<path id="compile.classpath">
|
|
|
|
<fileset dir="${lib}">
|
2006-02-06 11:24:21 -05:00
|
|
|
<include name="*.jar" />
|
2006-01-29 10:16:56 -05:00
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<!-- Compile the project. -->
|
|
|
|
<target name="compile"
|
2006-12-24 10:07:37 -05:00
|
|
|
description="Compile the source code."
|
|
|
|
depends="checkJunitPresence">
|
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<mkdir dir="${dest}" />
|
2006-01-29 10:50:23 -05:00
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<javac destdir="${dest}"
|
2006-11-29 02:08:17 -05:00
|
|
|
target="${java.compat.version}"
|
|
|
|
source="${java.compat.version}"
|
2006-05-27 17:55:39 -04:00
|
|
|
debug="on"
|
|
|
|
encoding="utf8"
|
2006-01-29 10:16:56 -05:00
|
|
|
classpathref="compile.classpath">
|
2006-01-29 10:50:23 -05:00
|
|
|
<src path="${src}/java" />
|
2006-04-11 00:36:46 -04:00
|
|
|
<src path="${src}/webapp/src" />
|
2006-01-29 10:50:23 -05:00
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2006-09-13 10:33:28 -04:00
|
|
|
<target name="javadoc" depends="compile"
|
|
|
|
description="Generates javadoc documentation.">
|
2006-06-06 03:53:40 -04:00
|
|
|
|
2006-02-17 19:17:44 -05:00
|
|
|
<mkdir dir="${build.javadoc}"/>
|
2006-06-06 03:53:40 -04:00
|
|
|
|
|
|
|
<!-- we do this to make sure whatever classes where in ant's
|
|
|
|
classpath at runtime are in the classpath used by javadoc
|
|
|
|
(ie: junit.jar)
|
|
|
|
-->
|
|
|
|
<path id="javadoc.classpath">
|
|
|
|
<path refid="compile.classpath"/>
|
|
|
|
<!-- aparently ant.library.dir isn't allways set right? -->
|
|
|
|
<fileset dir="${ant.home}/lib">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${ant.library.dir}">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
2006-02-17 19:17:44 -05:00
|
|
|
<javadoc
|
|
|
|
destdir="${build.javadoc}"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
2006-05-27 17:55:39 -04:00
|
|
|
encoding="utf8"
|
2006-05-27 20:41:33 -04:00
|
|
|
access="${javadoc.access}"
|
2007-01-17 18:46:30 -05:00
|
|
|
windowtitle="${Name} ${version} API"
|
|
|
|
doctitle="${Name} ${version} API (${specversion})"
|
2006-11-29 02:08:17 -05:00
|
|
|
bottom="Copyright &copy; ${javadoc.years} The Apache Software Foundation"
|
2006-02-17 19:17:44 -05:00
|
|
|
>
|
|
|
|
<packageset dir="${src}/java"/>
|
2006-11-28 17:36:42 -05:00
|
|
|
<packageset dir="${src}/webapp/src"/>
|
2006-02-17 19:17:44 -05:00
|
|
|
<link href="${javadoc.link.java}"/>
|
2006-05-26 21:35:44 -04:00
|
|
|
<link href="${javadoc.link.junit}"/>
|
|
|
|
<link href="${javadoc.link.lucene}"/>
|
2006-06-06 03:53:40 -04:00
|
|
|
<classpath refid="javadoc.classpath"/>
|
2006-02-17 19:17:44 -05:00
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2006-01-29 10:50:23 -05:00
|
|
|
<!-- ========================================================================= -->
|
2006-01-29 10:16:56 -05:00
|
|
|
<!-- ===================== TESTING-RELATED TASKS ============================= -->
|
2006-01-29 10:50:23 -05:00
|
|
|
<!-- ========================================================================= -->
|
2006-01-29 10:16:56 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Classpath for unit test compilation. -->
|
|
|
|
<!-- For now, it's the same as main classpath. Later it will have JUnit, Clover, etc. -->
|
|
|
|
<path id="test.compile.classpath">
|
|
|
|
<path refid="compile.classpath" />
|
2006-02-07 17:04:39 -05:00
|
|
|
<pathelement location="${dest}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.run.classpath">
|
|
|
|
<path refid="test.compile.classpath" />
|
|
|
|
<pathelement location="${dest}/tests"/>
|
2006-01-29 10:16:56 -05:00
|
|
|
</path>
|
|
|
|
|
2006-12-24 10:07:37 -05:00
|
|
|
<!-- Check that JUnit is present. -->
|
2007-01-05 18:14:26 -05:00
|
|
|
<target name="checkJunitPresence">
|
|
|
|
<!-- no description so it doesn't show up in -projecthelp -->
|
|
|
|
<fail unless="junitPresent">
|
|
|
|
##################################################################
|
|
|
|
JUnit not found.
|
|
|
|
Please make sure junit.jar is in ANT_HOME/lib, or made available
|
|
|
|
to Ant using other mechanisms like -lib or CLASSPATH.
|
|
|
|
##################################################################
|
|
|
|
</fail>
|
2006-12-24 10:07:37 -05:00
|
|
|
</target>
|
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<!-- Compile unit tests. -->
|
|
|
|
<target name="compileTests"
|
|
|
|
description="Compile unit tests."
|
2006-12-24 10:07:37 -05:00
|
|
|
depends="compile,checkJunitPresence">
|
|
|
|
|
2006-01-29 10:16:56 -05:00
|
|
|
<mkdir dir="${dest}/tests" />
|
2006-02-07 17:04:39 -05:00
|
|
|
<javac
|
|
|
|
destdir="${dest}/tests"
|
2006-11-29 02:08:17 -05:00
|
|
|
target="${java.compat.version}"
|
|
|
|
source="${java.compat.version}"
|
2006-03-22 20:00:38 -05:00
|
|
|
debug="on"
|
2006-05-27 17:55:39 -04:00
|
|
|
encoding="utf8"
|
2006-02-07 17:04:39 -05:00
|
|
|
classpathref="test.compile.classpath">
|
|
|
|
<src path="${src}/test" />
|
2006-01-29 10:16:56 -05:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Run unit tests. -->
|
|
|
|
<target name="test"
|
|
|
|
description="Runs the unit tests."
|
2006-04-11 00:36:46 -04:00
|
|
|
depends="compileTests, junit" />
|
|
|
|
|
|
|
|
<target name="junit" depends="compileTests">
|
|
|
|
<!-- no description so it doesn't show up in -projecthelp -->
|
|
|
|
<mkdir dir="${junit.output.dir}"/>
|
|
|
|
|
2006-09-13 10:33:28 -04:00
|
|
|
<junit printsummary="withOutAndErr"
|
2006-04-11 00:36:46 -04:00
|
|
|
haltonfailure="no"
|
|
|
|
errorProperty="tests.failed"
|
|
|
|
failureProperty="tests.failed"
|
2006-04-19 02:00:20 -04:00
|
|
|
dir="src/test/test-files/"
|
2006-04-11 00:36:46 -04:00
|
|
|
>
|
2007-01-21 09:56:35 -05:00
|
|
|
<formatter type="brief" usefile="false" if="junit.details"/>
|
2006-04-11 00:36:46 -04:00
|
|
|
<syspropertyset>
|
|
|
|
<propertyref prefix="solr" />
|
|
|
|
</syspropertyset>
|
2007-02-16 11:42:49 -05:00
|
|
|
<!-- solr.test.sys.prop1/2 used by TestConfig -->
|
|
|
|
<sysproperty key="solr.test.sys.prop1" value="propone"/>
|
|
|
|
<sysproperty key="solr.test.sys.prop2" value="proptwo"/>
|
2006-04-11 00:36:46 -04:00
|
|
|
<classpath refid="test.run.classpath"/>
|
|
|
|
<formatter type="xml"/>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
|
|
|
<fileset dir="src/test" includes="${junit.includes}"/>
|
|
|
|
</batchtest>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
|
|
|
<fileset dir="src/test" includes="**/${testcase}.java"/>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
|
|
|
|
<fail if="tests.failed">Tests failed!</fail>
|
|
|
|
</target>
|
|
|
|
|
2006-09-13 10:33:28 -04:00
|
|
|
<target name="test-reports"
|
|
|
|
description="Generates HTML test reports.">
|
2006-04-11 00:36:46 -04:00
|
|
|
<mkdir dir="${junit.reports}"/>
|
|
|
|
<junitreport todir="${junit.output.dir}">
|
|
|
|
<fileset dir="${junit.output.dir}">
|
|
|
|
<include name="TEST-*.xml"/>
|
|
|
|
</fileset>
|
|
|
|
<report format="frames" todir="${junit.reports}"/>
|
|
|
|
</junitreport>
|
|
|
|
</target>
|
2006-01-29 10:16:56 -05:00
|
|
|
|
|
|
|
|
2006-01-29 10:50:23 -05:00
|
|
|
<!-- ========================================================================= -->
|
2006-01-29 10:16:56 -05:00
|
|
|
<!-- ===================== DISTRIBUTION-RELATED TASKS ======================== -->
|
2006-01-29 10:50:23 -05:00
|
|
|
<!-- ========================================================================= -->
|
2006-01-29 10:16:56 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Creates the Solr distribution files. -->
|
|
|
|
<target name="dist"
|
|
|
|
description="Creates the Solr distribution files."
|
2006-12-01 12:40:39 -05:00
|
|
|
depends="dist-war, dist-jar" />
|
2006-01-29 10:16:56 -05:00
|
|
|
|
2006-11-29 02:08:17 -05:00
|
|
|
<!-- Creates a Manifest file for Jars and WARs -->
|
|
|
|
<target name="make-manifest" >
|
|
|
|
<!-- no description, don't advertise -->
|
|
|
|
<mkdir dir="${dest}/META-INF/" />
|
|
|
|
<manifest mode="replace" file="${dest}/META-INF/MANIFEST.MF">
|
|
|
|
<!--
|
|
|
|
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
|
2006-12-05 02:34:22 -05:00
|
|
|
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
|
2006-11-29 02:08:17 -05:00
|
|
|
-->
|
2006-12-05 02:34:22 -05:00
|
|
|
<!-- Don't set 'Manifest-Version' it identifies the version of the
|
|
|
|
manifest file format, and should allways be 1.0 (the default)
|
|
|
|
|
|
|
|
Don't set 'Created-by' attribute, it's purpose is
|
2006-11-29 02:08:17 -05:00
|
|
|
to identify the version of java used to build the jar,
|
2006-12-05 02:34:22 -05:00
|
|
|
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"
|
2007-01-17 18:46:30 -05:00
|
|
|
value="${version} - ${user.name} - ${DSTAMP} ${TSTAMP}"/>
|
2006-12-05 02:34:22 -05:00
|
|
|
<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}"/>
|
2006-11-29 02:08:17 -05:00
|
|
|
</manifest>
|
|
|
|
</target>
|
|
|
|
|
2006-02-07 17:04:39 -05:00
|
|
|
<!-- Creates the Solr WAR file. -->
|
2006-01-29 10:16:56 -05:00
|
|
|
<target name="dist-war"
|
2006-12-08 16:01:58 -05:00
|
|
|
description="Creates the Solr WAR Distribution file."
|
2006-12-08 03:01:51 -05:00
|
|
|
depends="compile, make-manifest, dist-jar">
|
2006-01-29 10:16:56 -05:00
|
|
|
<mkdir dir="${dist}" />
|
2006-11-28 17:36:42 -05:00
|
|
|
<war destfile="${dist}/${fullnamever}.war"
|
2006-11-29 02:08:17 -05:00
|
|
|
webxml="${src}/webapp/WEB-INF/web.xml"
|
|
|
|
filesetmanifest="skip"
|
|
|
|
manifest="${dest}/META-INF/MANIFEST.MF">
|
|
|
|
<lib dir="${lib}">
|
|
|
|
<exclude name="servlet-api*.jar" />
|
|
|
|
</lib>
|
2006-12-08 03:01:51 -05:00
|
|
|
<lib dir="${dist}">
|
|
|
|
<include name="${fullnamever}.jar" />
|
|
|
|
</lib>
|
2006-11-29 02:08:17 -05:00
|
|
|
<fileset dir="${src}/webapp/resources" />
|
2006-12-01 12:40:39 -05:00
|
|
|
<metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
|
2006-01-29 10:16:56 -05:00
|
|
|
</war>
|
|
|
|
</target>
|
|
|
|
|
2006-02-17 19:17:44 -05:00
|
|
|
<!-- Creates the solr jar. -->
|
|
|
|
<target name="dist-jar"
|
2006-12-08 16:01:58 -05:00
|
|
|
description="Creates the Solr JAR Distribution file."
|
2006-11-29 02:08:17 -05:00
|
|
|
depends="compile, make-manifest">
|
2006-01-29 10:16:56 -05:00
|
|
|
<mkdir dir="${dist}" />
|
2006-11-28 17:36:42 -05:00
|
|
|
<jar destfile="${dist}/${fullnamever}.jar"
|
2006-02-17 19:17:44 -05:00
|
|
|
basedir="${dest}"
|
2006-11-29 02:08:17 -05:00
|
|
|
includes="org/apache/**"
|
|
|
|
filesetmanifest="skip"
|
2006-12-01 12:40:39 -05:00
|
|
|
manifest="${dest}/META-INF/MANIFEST.MF">
|
|
|
|
<metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
|
|
|
|
</jar>
|
2006-01-29 10:16:56 -05:00
|
|
|
</target>
|
|
|
|
|
2006-02-15 20:05:55 -05:00
|
|
|
<target name="example"
|
2006-12-08 03:32:57 -05:00
|
|
|
description="Creates a runnable example configuration."
|
2006-11-28 17:36:42 -05:00
|
|
|
depends="dist-war">
|
|
|
|
<copy file="${dist}/${fullnamever}.war"
|
2006-05-04 08:53:31 -04:00
|
|
|
tofile="${example}/webapps/${ant.project.name}.war"/>
|
|
|
|
<copy todir="${example}/solr/bin">
|
|
|
|
<fileset dir="${src}/scripts">
|
|
|
|
<exclude name="scripts.conf"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2006-05-09 12:27:51 -04:00
|
|
|
<chmod dir="${example}/solr/bin" perm="755" includes="**"/>
|
2006-12-08 02:48:20 -05:00
|
|
|
<echo>See ${example}/README.txt for how to run the Solr example configuration.</echo>
|
2006-02-15 20:05:55 -05:00
|
|
|
</target>
|
|
|
|
|
2006-02-17 19:17:44 -05:00
|
|
|
<!-- make a distribution -->
|
|
|
|
<target name="package"
|
2006-12-08 16:01:58 -05:00
|
|
|
description="Packages the Solr Distribution files and Documentation."
|
|
|
|
depends="dist, example, javadoc">
|
2006-11-28 17:36:42 -05:00
|
|
|
|
2006-12-15 14:53:10 -05:00
|
|
|
<copy todir="${build.docs}">
|
|
|
|
<fileset dir="site" />
|
|
|
|
</copy>
|
2006-12-16 16:08:42 -05:00
|
|
|
|
2006-11-28 17:36:42 -05:00
|
|
|
<tar destfile="${dist}/${fullnamever}.tgz" compression="gzip">
|
|
|
|
<tarfileset dir="."
|
|
|
|
prefix="${fullnamever}"
|
2006-12-01 12:40:39 -05:00
|
|
|
includes="LICENSE.txt NOTICE.txt *.txt *.xml lib/** src/** example/**"
|
2006-12-17 16:38:20 -05:00
|
|
|
excludes="**/data/ **/logs/ **/classes/ **/*.sh **/bin/ src/scripts/" />
|
|
|
|
<tarfileset dir="."
|
|
|
|
mode="755"
|
|
|
|
prefix="${fullnamever}"
|
|
|
|
includes="**/*.sh **/bin/ src/scripts/" />
|
2006-11-28 17:36:42 -05:00
|
|
|
<tarfileset dir="."
|
|
|
|
prefix="${fullnamever}"
|
|
|
|
includes="dist/*.jar dist/*.war" />
|
2006-12-15 14:53:10 -05:00
|
|
|
<tarfileset dir="${build.docs}"
|
|
|
|
prefix="${fullnamever}/docs/" />
|
2006-11-28 17:36:42 -05:00
|
|
|
</tar>
|
2006-12-08 16:01:58 -05:00
|
|
|
<solr-checksum file="${dist}/${fullnamever}.tgz"/>
|
2006-11-28 17:36:42 -05:00
|
|
|
|
2006-12-16 16:08:42 -05:00
|
|
|
<gunzip src="${dist}/${fullnamever}.tgz" dest="${dest}/${fullnamever}.tar"/>
|
|
|
|
<untar src="${dest}/${fullnamever}.tar" dest="${dest}"/>
|
|
|
|
|
|
|
|
<fixcrlf srcdir="${dest}/${fullnamever}"
|
|
|
|
eol="crlf"
|
|
|
|
includes="**/*.txt **/*.xml **/*.java **/*.html **/*.csv **/*.css **/*.properties **/*.jsp **/*.xsl **/*.py **/*.rb **/*.js **/*.json **/*.pl"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<zip destfile="${dist}/${fullnamever}.zip">
|
|
|
|
<zipfileset dir="${dest}/${fullnamever}"
|
2006-12-17 17:28:56 -05:00
|
|
|
prefix="${fullnamever}"
|
|
|
|
excludes="**/*.sh **/bin/ src/scripts/" />
|
|
|
|
<zipfileset dir="${dest}/${fullnamever}"
|
|
|
|
prefix="${fullnamever}"
|
|
|
|
includes="**/*.sh **/bin/ src/scripts/"
|
|
|
|
filemode="755" />
|
2006-12-16 16:08:42 -05:00
|
|
|
</zip>
|
|
|
|
<solr-checksum file="${dist}/${fullnamever}.zip"/>
|
|
|
|
|
2006-02-17 19:17:44 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="nightly"
|
2006-11-28 17:36:42 -05:00
|
|
|
depends="test, package">
|
2006-12-08 16:01:58 -05:00
|
|
|
<!-- no description, don't advertise -->
|
2006-02-17 19:17:44 -05:00
|
|
|
</target>
|
|
|
|
|
2006-02-06 11:24:21 -05:00
|
|
|
</project>
|
2006-02-15 20:05:55 -05:00
|
|
|
|