Apache Lucene open-source search software
SOLR-2452: merged with trunk up to r1130266. Removed duplicate solr-contrib-uptodate definition in solr/contrib/contrib-build.xml. Fixed directory glob in solr-contrib-uptodate target: .../src/main/java/ -> .../src/java/
Steven Rowe036078baea90
diff --cc lucene/common-build.xmlindex 4b112a1806e,c2dace95c2c..a0e185e3bb9--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@@ -536,6 -537,6 +540,8 @@@<sysproperty key="testmethod" value="${testmethod}"/><sysproperty key="jetty.testMode" value="1"/>++++ <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/><formatter type="xml"/><formatter classname="${junit.details.formatter}" usefile="false"/>diff --cc solr/build.xmlindex 84f6a21bb24,8ca35e2b0d1..4df4c6a24b4--- a/solr/build.xml+++ b/solr/build.xml@@@ -16,76 -16,161 +16,76 @@@See the License for the specific language governing permissions andlimitations under the License.-->+<project name="solr-core" default="usage">+ <description>Solr</description>-<project name="solr" default="usage" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">+ <property name="src.dir" location="src/java"/>- <property name="solr-path" value="." />-- <import file="common-build.xml"/>-- <!-- 3rd party libraries for compilation -->- <property name="lib" location="lib" />-- <!-- solr source files -->- <property name="src" location="src" />- <property name="web.xml" location="${src}/webapp/web/WEB-INF/web.xml"/>-- <!-- Destination for distribution files (demo WAR, contrib JARs, etc.) -->- <property name="dist" location="dist" />+ <!-- solr uses this as the test working directory: nocommit classpath -->+ <property name="tests.userdir" value="src/test-files"/>- <property name="clover.db.dir" location="${dest}/tests/clover/db"/>- <property name="clover.report.dir" location="${dest}/tests/clover/reports"/>-- <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>-- <!-- Default target: usage. Prints out instructions. -->- <target name="usage"- description="Prints out instructions">- <echo message="Welcome to the Solr project!" />- <echo message="Use 'ant example' to create a runnable example configuration." />- <echo message="Use 'ant run-example' to create and run the example." />- <echo message="And for developers:"/>- <echo message="Use 'ant clean' to clean compiled files." />- <echo message="Use 'ant compile' to compile the source code." />- <echo message="Use 'ant dist' to build the project WAR and JAR files." />- <echo message="Use 'ant javadoc' to build javadoc under build/docs/api" />- <echo message="Use 'ant generate-maven-artifacts' to generate maven artifacts." />- <echo message="Use 'ant package' to generate zip, tgz for distribution." />- <echo message="Use 'ant luke' to start luke. see: http://luke.googlecode.com" />- <echo message="Use 'ant test' to run unit tests." />- </target>-- <!-- Clean: cleans compiled files and other temporary artifacts. -->- <target name="clean" depends="clean-contrib"- description="Cleans compiled files and other temporary artifacts.">- <delete dir="${dest}" />- <delete dir="${dist}" />- <delete dir="${package.dir}" />- <delete dir="example/solr/lib" />- <delete dir="${lucene-libs}" />- </target>-- <target name="clean-dest"- description="Cleans out ${dest} but leaves ${dist} and ${package.dir} alone. This allows us to run nightly and clover together in Hudson">- <delete includeemptydirs="true" >- <fileset dir="${dest}">- <exclude name="docs/"/>- </fileset>- </delete>- </target>-- <!-- ========================================================================= -->- <!-- ===================== COMPILATION-RELATED TASKS ========================= -->- <!-- ========================================================================= -->-- <!-- The compilation classpath -->- <path id="compile.classpath">- <fileset dir="${lib}">- <include name="*.jar" />- </fileset>- <path refid="lucene.classpath"/>+ <path id="additional.dependencies">+ <fileset dir="lib" includes="**/*.jar"/>+ <fileset dir="example/lib" includes="**/*.jar"/></path>-- <target name="compile-solrj"- description="Compile the java client."- depends="compile-lucene">-- <solr-javac destdir="${dest}/solrj"- classpathref="compile.classpath">- <src path="${src}/common" />- <src path="${src}/solrj" />- </solr-javac>- </target>--- <!-- This depend on all of solr -->- <path id="compile.classpath.solrj">- <path refid="compile.classpath" />- <pathelement location="${dest}/solrj"/>- <!-- jetty -->- <fileset dir="example/lib">- <include name="**/*.jar" />- </fileset>- </path>-- <!-- Compile the project. -->- <target name="compile"- description="Compile the source code."- depends="compile-solrj">-- <solr-javac destdir="${dest}/solr"- classpathref="compile.classpath.solrj">- <src path="${src}/java" />- <src path="${src}/webapp/src" />- </solr-javac>- </target>-- <target name="javadoc-dep">- <copy failonerror="false" todir="${build.docs}">- <fileset dir="site" />- </copy>- </target>-- <target name="javadoc-solrj" depends="compile-solrj,javadoc-dep" description="Generates solrj javadoc documentation.">- <sequential>- <mkdir dir="${build.javadoc}/solrj"/>-- <path id="javadoc.classpath">- <path refid="compile.classpath"/>- </path>-- <invoke-javadoc- destdir="${build.javadoc}/solrj"- title="${Name}-j ${version} API (${specversion})">- <sources>- <packageset dir="${src}/common"/>- <packageset dir="${src}/solrj"/>- </sources>- </invoke-javadoc>- </sequential>- </target>- <target name="javadoc-core" depends="compile,javadoc-dep" description="Generates javadoc documentation for core.">+ <import file="common-build.xml"/>+ <!-- add some descriptions to some inherited targets -->+ <target name="compile" description="Compile the source code."+ depends="compile-core, build-contrib"/>+ <target name="test" description="Validate, then run core and contrib unit tests."- depends="validate-solr, common.test, test-contrib"/>++ depends="validate-solr, common-solr.test, test-contrib"/>+ <target name="test-core" description="Runs the core unit tests."+ depends="common.test"/>+ <target name="compile-test" description="Compile unit tests."+ depends="compile-test-framework, common.compile-test"/>+ <target name="javadocs" description="Generate javadocs for core, client, test-framework, and contrib"+ depends="contrib-build.javadocs, javadocs-solrj, javadocs-test-framework, javadocs-contrib"/>+ <target name="javadocs-core" description="Generate javadocs for core."+ depends="contrib-build.javadocs"/>++ <!-- hackish we have to call init/clover here, but solr core depends upon solrj? -->+ <target name="compile-core" depends="init, clover, compile-analyzers-common,+ compile-analyzers-phonetic, compile-suggest, compile-highlighter,+ compile-memory, compile-misc, compile-queries, compile-spatial,+ compile-solrj, common.compile-core, compile-webapp"+ unless="solr-core.compiled">+ </target>++ <target name="compile-webapp" depends="compile-solrj">+ <compile srcdir="src/webapp/src"+ destdir="${build.dir}/classes/webapp">+ <classpath refid="classpath"/>+ </compile>+ </target>++ <!-- TODO: factor solrj into a separate dir so its a normal module?+ we have to reinvent wheels the way it is now -->++ <target name="compile-solrj" description="Compile the java client.">+ <compile srcdir="src/common:src/solrj"+ destdir="${build.dir}/classes/solrj">+ <classpath refid="classpath"/>+ </compile>+ </target>++ <!-- hacky? -->+ <target name="compile-test-framework" depends="compile-core">+ <compile srcdir="src/test-framework" destdir="${build.dir}/classes/test-framework">+ <classpath refid="test.base.classpath"/>+ </compile>+ </target>++ <target name="javadocs-solrj" depends="compile-solrj" description="Generates solrj javadoc documentation."><sequential>- <mkdir dir="${build.javadoc}/solr"/>-- <path id="javadoc.classpath">- <path refid="compile.classpath"/>- <path refid="compile.classpath.solrj"/>- <pathelement location="${dest}/solrj"/>- </path>-+ <mkdir dir="${javadoc.dir}/solrj"/><invoke-javadoc- destdir="${build.javadoc}/solr"- title="${Name} ${version} core API (${specversion})">+ destdir="${javadoc.dir}/solrj"+ title="${Name}-j ${version} API (${specversion})"><sources>- <packageset dir="${src}/java" />- <packageset dir="${src}/webapp/src"/>+ <packageset dir="src/common"/>+ <packageset dir="src/solrj"/></sources></invoke-javadoc></sequential>diff --cc solr/common-build.xmlindex 26e1cf0eb5f,d5671ea379d..e3b0b22b791--- a/solr/common-build.xml+++ b/solr/common-build.xml@@@ -23,75 -23,301 +23,76 @@@<dirname file="${ant.file.common-solr}" property="common-solr.dir"/>- <!-- change this together with the default and test's solrconfig.xml after starting a new development branch: -->- <property name="tests.luceneMatchVersion" value="4.0"/>-- <!-- Initialize property values: allow easy customization via build.properties -->- <property file="build.properties" />-<property name="Name" value="Solr" />+ <property name="version" value="4.0-SNAPSHOT"/>+ <property name="final.name" value="apache-${name}-${version}"/>++ <!-- solr uses 1.6 -->+ <property name="javac.source" value="1.6"/>+ <property name="javac.target" value="1.6"/>++ <!-- solr uses its own build/dist directories -->+ <property name="build.dir" location="${common-solr.dir}/build"/>+ <property name="dist.dir" location="${common-solr.dir}/dist"/>+ <property name="tests.userdir" value="${common-solr.dir}/src/test-files"/>+ <property name="javadoc.dir" location="${common-solr.dir}/build/docs/api"/>+ <property name="javadoc.link" value="http://java.sun.com/javase/6/docs/api/"/>++ <path id="additional.dependencies">+ <fileset dir="${common-solr.dir}/lib" includes="**/*.jar"/>+ <fileset dir="${common-solr.dir}/example/lib" includes="**/*.jar"/>+ <fileset dir="lib" includes="**/*.jar" erroronmissingdir="false"/>+ </path>- <property name="name" value="${ant.project.name}"/>-- <property name="dev-tools.dir" value="${solr-path}/../dev-tools"/>- <property name="prettify.dir" value="${solr-path}/../lucene/src/tools/prettify"/>- <property name="package.dir" location="package"/>-- <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>-- <property name="junit.details" value="1"/>+ <pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies"/>- <!-- default arguments to pass to jvm executing tests -->- <property name="args" value="" />+ <property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>- <!-- TODO: measure toning this down by default to 1 --><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" />- <property name="tests.codecprovider" value="random" />- <property name="tests.codec" value="randomPerField" />- <property name="tests.locale" value="random" />- <property name="tests.timezone" value="random" />- <property name="tests.iter" value="1" />- <property name="tests.seed" value="random" />- <property name="tests.nightly" value="false" />- <property name="tests.verbose" value="false" />+ <import file="../lucene/contrib/contrib-build.xml"/>+ <property name="tests.directory" value="random" />- <condition property="dir.prop" value="-Dsolr.directoryFactory=solr.StandardDirectoryFactory">- <isset property="use.fsdir"/>- </condition>-- <!-- Example directory -->- <property name="example" value="${common-solr.dir}/example" />- <!--- 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" />- <property name="svn.exe" value="svn" />-- <!-- Java Version we are compatible with -->- <property name="java.compat.version" value="1.6" />-- <!-- clover wants to run with -lib, otherwise we prefer a repeatable- classpath -->- <property name="javac.includeAntRuntime" value="${run.clover}"/>-- <!-- Solr Implementation Version -->- <!--- This can be any string value that does not include spaces- This will be used when creating build artifact file names.-- By default, this should be set to "X.Y.N-SNAPSHOT" where X.Y.N is- "1 greater" then the last version released (on this branch).- -->- <property name="version" value="4.0-SNAPSHOT" />-- <!-- 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).- -->- <property name="specversion" value="4.0.0.${dateversion}" />--- <!-- 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}"/>-- <!-- Destination for compiled classes and binaries -->- <property name="dest" value="build" />-- <!-- Destination for Lucene jars -->- <property name="lucene-libs" location="lucene-libs" />-- <!-- Javadoc properties -->- <property name="javadoc.years" value="2006 - ${year}" />- <property name="javadoc.access" value="protected"/>- <property name="javadoc.link.java"- value="http://java.sun.com/javase/6/docs/api/"/>- <property name="javadoc.link.junit"- value="http://junit.sourceforge.net/javadoc/"/>- <property name="javadoc.link.lucene"- value="https://hudson.apache.org/hudson/job/Lucene-trunk/javadoc/all/"/>- <property name="javadoc.packages" value="org.apache.solr.*"/>- <property name="build.docs" value="${dest}/docs"/>- <property name="build.javadoc" value="${common-solr.dir}/${build.docs}/api"/>- <property name="build.javadoc.solrj" value="${build.docs}/api-solrj"/>-- <!-- JUnit properties -->- <property name="testmethod" value=""/>- <property name="junit.includes" value="**/Test*.java,**/*Test.java"/>- <property name="junit.output.dir" location="${common-solr.dir}/${dest}/test-results"/>- <property name="junit.reports" location="${common-solr.dir}/${dest}/test-results/reports"/>- <property name="junit.formatter" value="plain"/>- <condition property="junit.details.formatter"- value="org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"- else="org.apache.lucene.util.LuceneJUnitResultFormatter">- <isset property="tests.sequential"/>- </condition>- <property name="junit.parallel.selector" value="org.apache.lucene.util.LuceneJUnitDividingSelector"/>-- <!-- Maven properties -->- <property name="maven.build.dir" value="${basedir}/build/maven"/>- <property name="maven.dist.dir" value="${package.dir}/maven"/>-- <property name="maven.dist.prefix" value="${maven.dist.dir}/org/apache/solr"/>-- <!-- 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"/>-- <available property="maven.ant.tasks.present" classname="org.apache.maven.artifact.ant.Pom" />-- <!-- End Maven Properties -->-- <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>-- <!-- Lucene -->-- <path id="lucene.classpath">- <pathelement location="${common-solr.dir}/../lucene/build/classes/java" />- <pathelement location="${common-solr.dir}/../modules/analysis/build/common/classes/java" />- <pathelement location="${common-solr.dir}/../modules/analysis/build/phonetic/classes/java" />- <pathelement location="${common-solr.dir}/../modules/suggest/build/classes/java" />- <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" />- </path>-- <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">- <fileset dir="../modules/analysis/common" includes="build.xml" />- <fileset dir="../modules/analysis/phonetic" includes="build.xml" />- <fileset dir="../modules/suggest" includes="build.xml" />- <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" />- </subant>- </sequential>- </target>-- <target name="lucene-jars-to-solr" depends="prep-lucene-jars">- <mkdir dir="${lucene-libs}"/>- <copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">- <fileset dir="../lucene/build/">- <include name="lucene-core-${version}.jar" />- </fileset>- <fileset dir="../modules/analysis/build/common">- <include name="lucene-analyzers-common-${version}.jar" />- </fileset>- <fileset dir="../modules/analysis/build/phonetic">- <include name="lucene-analyzers-phonetic-${version}.jar" />- </fileset>- <fileset dir="../modules/suggest/build">- <include name="lucene-suggest-${version}.jar" />- </fileset>- <fileset dir="../lucene/build/contrib/highlighter">- <include name="lucene-highlighter-${version}.jar" />- </fileset>- <fileset dir="../lucene/build/contrib/memory">- <include name="lucene-memory-${version}.jar" />- </fileset>- <fileset dir="../lucene/build/contrib/misc">- <include name="lucene-misc-${version}.jar" />- </fileset>- <fileset dir="../lucene/build/contrib/queries">- <include name="lucene-queries-${version}.jar" />- </fileset>- <fileset dir="../lucene/build/contrib/spatial">- <include name="lucene-spatial-${version}.jar" />- </fileset>- </copy>- </target>-- <target name="compile-lucene" unless="lucene-compiled">- <property name="lucene-compiled" value="true"/>- <subant target="default">- <fileset dir="../modules/analysis/common" includes="build.xml"/>- <fileset dir="../modules/analysis/phonetic" includes="build.xml"/>- <fileset dir="../modules/suggest" includes="build.xml"/>- <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"/>- </subant>- </target>--- <!-- 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"- includeAntRuntime="${javac.includeAntRuntime}"- sourcepath=""- classpathref="@{classpathref}">- <compilerarg line="-Xlint -Xlint:-deprecation -Xlint:-serial"/>- <nested />- </javac>- </sequential>- </macrodef>-- <!-- Macro for building Jars -->- <macrodef name="solr-jar">- <attribute name="destfile" />- <attribute name="basedir" default="." />- <attribute name="includes" default="org/apache/**" />- <attribute name="excludes" default="" />- <attribute name="manifest" default="${common-solr.dir}/${dest}/META-INF/MANIFEST.MF" />- <element name="nested" optional="true" implicit="true" />- <sequential>- <jar destfile="@{destfile}"- basedir="@{basedir}"- includes="@{includes}"- excludes="@{excludes}"- filesetmanifest="skip"- manifest="@{manifest}">- <metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt"/>- <nested />- </jar>- </sequential>- </macrodef>+ <!-- solr depends on the following modules/contribs -->+ <module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"+ property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/>+ <module-uptodate name="analysis/phonetic" jarfile="${common.dir}/../modules/analysis/build/phonetic/lucene-analyzers-phonetic-${version}.jar"+ property="analyzers-phonetic.uptodate" classpath.property="analyzers-phonetic.jar"/>+ <module-uptodate name="suggest" jarfile="${common.dir}/../modules/suggest/build/lucene-suggest-${version}.jar"+ property="suggest.uptodate" classpath.property="suggest.jar"/>+ <contrib-uptodate name="highlighter" property="highlighter.uptodate" classpath.property="highlighter.jar"/>+ <contrib-uptodate name="memory" property="memory.uptodate" classpath.property="memory.jar"/>+ <contrib-uptodate name="misc" property="misc.uptodate" classpath.property="misc.jar"/>+ <contrib-uptodate name="queries" property="queries.uptodate" classpath.property="queries.jar"/>+ <contrib-uptodate name="spatial" property="spatial.uptodate" classpath.property="spatial.jar"/>++ <path id="solr.base.classpath">+ <pathelement path="${analyzers-common.jar}"/>+ <pathelement path="${analyzers-phonetic.jar}"/>+ <pathelement path="${highlighter.jar}"/>+ <pathelement path="${memory.jar}"/>+ <pathelement path="${misc.jar}"/>+ <pathelement path="${queries.jar}"/>+ <pathelement path="${spatial.jar}"/>+ <pathelement path="${suggest.jar}"/>+ <pathelement location="${common-solr.dir}/build/classes/solrj"/>+ <pathelement location="${common-solr.dir}/build/classes/webapp"/>+ <pathelement location="${common-solr.dir}/build/classes/java"/>+ <path refid="base.classpath"/>+ </path>- <!-- 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>- <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"/>- </sequential>- </macrodef>+ <path id="classpath" refid="solr.base.classpath"/>+ <path id="solr.test.base.classpath">+ <pathelement path="${common-solr.dir}/build/classes/test-framework"/>+ <pathelement path="${common-solr.dir}/build/classes/test"/>+ <pathelement path="${tests.userdir}"/>+ <path refid="test.base.classpath"/>+ </path>++ <path id="test.classpath" refid="solr.test.base.classpath"/>+ <!-- TODO: lucene and solr should share this macro --><macrodef name="contrib-crawl"><attribute name="target" default=""/><attribute name="failonerror" default="true"/>@@@ -104,18 -331,107 +105,18 @@@</sequential></macrodef>- <property name="failonjavadocwarning" value="true"/>- <macrodef name="invoke-javadoc">- <element name="sources" optional="yes"/>- <attribute name="destdir"/>- <attribute name="title" default="${Name} ${version} API (${specversion})"/>- <sequential>- <mkdir dir="@{destdir}"/>- <copy todir="@{destdir}/prettify" overwrite="false">- <fileset dir="${prettify.dir}"/>- </copy>- <record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>- <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}"- stylesheetfile="@{destdir}/prettify/stylesheet+prettify.css"- bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved.">- <tag name="todo" description="To Do:"/>- <tag name="uml.property" description="UML Property:"/>- <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."/>- <link offline="true" packagelistLoc="${build.javadoc}"/>- <link href="${javadoc.link.java}"/>- <link href="${javadoc.link.junit}"/>- <link href="${javadoc.link.lucene}"/>- <header><![CDATA[- <script src="{@docRoot}/prettify/prettify.js" type="text/javascript"></script>- <script language="JavaScript">window.onload=function(){windowTitle();prettyPrint();}</script>- ]]></header>-- <sources />-- <classpath refid="javadoc.classpath"/>- </javadoc>- <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>- </sequential>- </macrodef>-- <!-- NOTE, the pom.xml MUST be a relative path. An absolute path may break the build on windows -->- <macrodef name="m2-deploy" description="Builds a Maven artifact">- <element name="artifact-attachments" optional="yes"/>- <attribute name="pom.xml" default="pom.xml"/>- <attribute name="jar.file" default="${jar.file}"/>- <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"/>- <sequential>- <copy file="@{pom.xml}" tofile="${maven.build.dir}/@{pom.xml}">- <filterset begintoken="@" endtoken="@">- <filter token="version" value="${version}"/>- </filterset>- </copy>- <artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>- <artifact:pom id="maven.project" file="${maven.build.dir}/@{pom.xml}" />- <artifact:deploy file="@{jar.file}">- <remoteRepository url="${m2.repository.url}">- <authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}"/>- </remoteRepository>- <pom refid="maven.project"/>- </artifact:deploy>+ <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 -->+ <attribute name="jarfile" default="${common-solr.dir}/build/contrib/@{name}/@{name}-${version}.jar"/>+ <sequential>+ <!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/java'"/>-->+ <property name="@{classpath.property}" location="@{jarfile}"/>+ <uptodate property="@{property}" targetfile="@{jarfile}">- <srcfiles dir="${common-solr.dir}/contrib/@{name}/src/main/java" includes="**/*.java"/>++ <srcfiles dir="${common-solr.dir}/contrib/@{name}/src/java" includes="**/*.java"/>+ </uptodate></sequential></macrodef>@@@ -155,4 -635,17 +156,17 @@@<arg value="${basedir}/src/test-files/solr/lib" /></java></target>-+ <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>+-++ <target name="test" depends="compile-test,validate-solr,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>++</project>diff --cc solr/contrib/contrib-build.xmlindex f30881f601d,00000000000..98d67d8ee64mode 100644,000000..100644--- a/solr/contrib/contrib-build.xml+++ b/solr/contrib/contrib-build.xml@@@ -1,49 -1,0 +1,38 @@@+<?xml version="1.0"?>++<!--+ 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="solr-contrib-build">+ <!-- TODO: adjust build.dir/dist.dir appropriately when a contrib project is run individually -->+ <property name="build.dir" location="../../build/contrib/${ant.project.name}"/>+ <property name="dist.dir" location="../../dist"/>++ <import file="../common-build.xml"/>++ <target name="build-solr" unless="solr.core.compiled">+ <ant dir="${common-solr.dir}" target="compile-test" inheritAll="false"/>+ <!-- set the property for this ant execution to speed up later tasks depending on this -->+ <property name="solr.core.compiled" value="true"/>+ </target>++ <target name="compile-core" depends="build-solr, common.compile-core"/>++++ <!-- redefine common-solr.test, and exclude 'validate-solr' dependency, since it should only run at solr/ level -->++ <target name="test" depends="compile-test,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>+- <macrodef name="solr-contrib-uptodate">- <attribute name="name"/>- <attribute name="property" default="solr-@{name}.uptodate"/>- <attribute name="classpath.property" default="solr-@{name}.jar"/>- <!-- set jarfile only, if the target jar file has no generic name -->- <attribute name="jarfile" default="${common-solr.dir}/build/contrib/solr-@{name}/apache-solr-@{name}-${version}.jar"/>- <sequential>- <!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/main/java'"/>-->- <property name="@{classpath.property}" location="@{jarfile}"/>- <uptodate property="@{property}" targetfile="@{jarfile}">- <srcfiles dir="../@{name}/src/main/java" includes="**/*.java"/>- </uptodate>- </sequential>- </macrodef>+</project>