You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2011/07/18 15:35:33 UTC

svn commit: r1147873 [12/13] - in /lucene/dev/branches/positions: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/lucene/contrib/ dev-tools/idea/lucene/contrib/demo/ dev-tools/idea/lucene/contrib/memory/ dev-tools/idea/lucene/contrib/querypa...

Modified: lucene/dev/branches/positions/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/positions/solr/common-build.xml?rev=1147873&r1=1147872&r2=1147873&view=diff
==============================================================================
--- lucene/dev/branches/positions/solr/common-build.xml (original)
+++ lucene/dev/branches/positions/solr/common-build.xml Mon Jul 18 13:34:29 2011
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-<project name="common-solr" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+<project name="common-solr" default="default">
   <description>
     This file is designed for importing into a main build file, and not intended
     for standalone use.
@@ -23,591 +23,185 @@
 
   <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="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"/>
-
-  <!-- default arguments to pass to jvm executing tests -->
-  <property name="args" value="" />
-
-  <!-- TODO: measure toning this down by default to 1 -->
+  <property name="version" value="4.0-SNAPSHOT"/>
+  <property name="fullname" value="apache-${ant.project.name}"/>
+  <property name="fullnamever" value="${fullname}-${version}"/>
+  <property name="final.name" value="${fullnamever}"/>
+  
+  <!-- solr uses 1.6 -->
+  <property name="javac.source" value="1.6"/>
+  <property name="javac.target" value="1.6"/>
+  
+  <property name="dest" value="${common-solr.dir}/build" />
+  <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" />
+  <property name="manifest.file" location="${dest}/META-INF/MANIFEST.MF"/>
+  <property name="tests.userdir" value="src/test-files"/>
+  <property name="example" value="${common-solr.dir}/example" />
+  <property name="javadoc.dir" location="${build.dir}/docs/api"/>
+  <property name="javadoc.link" value="http://java.sun.com/javase/6/docs/api/"/>
+  <property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>
   <property name="tests.threadspercpu" value="2"/>
-  <condition property="tests.sequential">
-    <or>
-      <isset property="testcase"/>
-      <equals arg1="${tests.threadspercpu}" arg2="0"/>
-    </or>
+  <property name="tests.cleanthreads.sysprop" value="perClass"/>
+
+  <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>
 
-  <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" />
-  <property name="tests.directory" value="random" />
+  <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>
 
-  <condition property="dir.prop" value="-Dsolr.directoryFactory=solr.StandardDirectoryFactory">
-    <isset property="use.fsdir"/>
-  </condition>
+  <pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies"/>
 
-  <!-- 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.
+  <import file="${common-solr.dir}/../lucene/contrib/contrib-build.xml"/>
+
+  <!-- Solr Specification Version
 
-       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}" />
+  <property name="solr.spec.version" 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://download.oracle.com/javase/6/docs/api/"/>
-  <property name="javadoc.link.junit"
-            value="http://junit.sourceforge.net/javadoc/"/>
-  <property name="javadoc.link.lucene"
-            value="https://builds.apache.org/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 either
-       "m2.repository.private.key" or "m2.repository.password" 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"/>
-
-  <path id="maven-ant-tasks.classpath">
-    <fileset dir="${common-solr.dir}/../lucene/lib">
-      <include name="maven-ant-tasks-*.jar"/>
-    </fileset>
+  <!-- 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"/>
+  <module-uptodate name="grouping" jarfile="${common.dir}/../modules/grouping/build/lucene-grouping-${version}.jar"
+        property="grouping.uptodate" classpath.property="grouping.jar"/>
+  <module-uptodate name="queries" jarfile="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"
+        property="queries.uptodate" classpath.property="queries.jar"/>
+  <module-uptodate name="queryparser" jarfile="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"
+        property="queryparser.uptodate" classpath.property="queryparser.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-contrib" contrib-src-name="queries" property="queries-contrib.uptodate" classpath.property="queries-contrib.jar"/>
+  <contrib-uptodate name="spatial" property="spatial.uptodate" classpath.property="spatial.jar"/>
+
+  <target name="compile-analyzers-common" unless="analyzers-common.uptodate">
+  	<ant dir="${common.dir}/../modules/analysis/common" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-analyzers-phonetic" unless="analyzers-phonetic.uptodate">
+  	<ant dir="${common.dir}/../modules/analysis/phonetic" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-suggest" unless="suggest.uptodate">
+  	<ant dir="${common.dir}/../modules/suggest" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-grouping" unless="grouping.uptodate">
+  	<ant dir="${common.dir}/../modules/grouping" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-queries" unless="queries.uptodate">
+  	<ant dir="${common.dir}/../modules/queries" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-queryparser" unless="queryparser.uptodate">
+  	<ant dir="${common.dir}/../modules/queryparser" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-highlighter" unless="highlighter.uptodate">
+  	<ant dir="${common.dir}/contrib/highlighter" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-memory" unless="memory.uptodate">
+  	<ant dir="${common.dir}/contrib/memory" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-misc" unless="misc.uptodate">
+  	<ant dir="${common.dir}/contrib/misc" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-queries-contrib" unless="queries-contrib.uptodate">
+  	<ant dir="${common.dir}/contrib/queries" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <target name="compile-spatial" unless="spatial.uptodate">
+  	<ant dir="${common.dir}/contrib/spatial" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  <!-- xml-query-parser contrib is required by the "luke" target -->
+  <target name="compile-xml-query-parser" unless="xml-query-parser.uptodate">
+  	<ant dir="${common.dir}/contrib/xml-query-parser" target="compile-core" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+
+  <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-contrib.jar}"/>
+  	<pathelement path="${spatial.jar}"/>
+  	<pathelement path="${suggest.jar}"/>
+    <pathelement path="${grouping.jar}"/>
+    <pathelement path="${queries.jar}"/>
+    <pathelement path="${queryparser.jar}"/>
+    <pathelement location="${common-solr.dir}/build/solr-solrj/classes/java"/>
+    <pathelement location="${common-solr.dir}/build/solr-core/classes/java"/>
+    <path refid="base.classpath"/>
   </path>
 
-  <!-- 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-contrib/classes/java" />
-    <pathelement location="${common-solr.dir}/../lucene/build/contrib/spatial/classes/java" />
-    <pathelement location="${common-solr.dir}/../modules/grouping/build/classes/java" />
-    <pathelement location="${common-solr.dir}/../modules/queries/build/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" />
-        <fileset dir="../modules/grouping" 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-contrib">
-        <include name="lucene-queries-contrib-${version}.jar" />
-      </fileset>
-      <fileset dir="../lucene/build/contrib/spatial">
-        <include name="lucene-spatial-${version}.jar" />
-      </fileset>
-      <fileset dir="../modules/grouping/build">
-        <include name="lucene-grouping-${version}.jar" />
-      </fileset>
-      <fileset dir="../modules/queries/build">
-        <include name="lucene-queries-${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"/>
-      <fileset dir="../modules/grouping" includes="build.xml"/>
-      <fileset dir="../modules/queries" 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>
-
-  <!-- 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>
-
-
-  <macrodef name="contrib-crawl">
-    <attribute name="target" default=""/>
-    <attribute name="failonerror" default="true"/>
-    <sequential>
-      <subant target="@{target}" failonerror="@{failonerror}">
-        <property name="lucene-compiled" value="${lucene-compiled}"/>
-        <fileset dir="."
-                 includes="contrib/*/build.xml"
-        />
-      </subant>
-    </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 &amp;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}" password="${m2.repository.password}"/>
-        </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}" password="${m2.repository.password}"/>
-        </remoteRepository>
-        <pom refid="maven.project"/>
-      </artifact:deploy>
-    </sequential>
-  </macrodef>
-
-  <property name="gpg.exe" value="gpg" />
-  <property name="gpg.key" value="CODE SIGNING KEY" />
-  <macrodef name="sign-artifact" description="Signs the artifact">
-    <attribute name="input.file"/>
-    <attribute name="output.file" default="@{input.file}.asc"/>
-    <attribute name="gpg.passphrase"/>
-    <sequential>
-      <echo >Signing @{input.file} Sig File: @{output.file}</echo>
+  <path id="classpath" refid="solr.base.classpath"/>
 
-      <exec executable="${gpg.exe}" >
-        <arg value="--batch"/>
-        <arg value="--armor"/>
-        <arg value="--output"/>
-        <arg value="@{output.file}"/>
-        <arg value="--default-key"/>
-        <arg value="${gpg.key}"/>
-        <arg value="--passphrase"/>
-        <arg value="@{gpg.passphrase}"/>
-        <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}"/>
-    <attribute name="gpg.passphrase"/>
-    <sequential>
-      <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}"/>
-    </sequential>
-  </macrodef>
-
-  <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>
-      <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}"/>
-    </sequential>
-  </macrodef>
+  <path id="solr.test.base.classpath">
+    <pathelement path="${common-solr.dir}/build/solr-test-framework/classes/java"/>
+    <pathelement path="${common-solr.dir}/build/solr-core/classes/test"/>
+  	<pathelement path="${tests.userdir}"/>
+  	<path refid="test.base.classpath"/>
+  </path>
+ 
+  <path id="test.classpath" refid="solr.test.base.classpath"/>
 
-  <macrodef name="sign-maven-dependency-artifacts" description="Signs a maven artifact and its POM">
-    <attribute name="artifact.id"/>
-    <attribute name="prefix.dir" default="${maven.dist.prefix}"/>
-    <attribute name="gpg.passphrase"/>
-    <sequential>
-      <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}.pom"  gpg.passphrase="@{gpg.passphrase}"/>
+  <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/solr-@{name}/apache-solr-@{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/java" includes="**/*.java"/>
+      </uptodate>
     </sequential>
   </macrodef>
 
-  <!-- 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>
-
-
-  <target name="clean-contrib"
-	          description="Cleans all contrib modules and their tests">
-	<contrib-crawl target="clean"/>
-  </target>
-
-  <target name="build-contrib"
-          description="Builds all contrib modules and their tests">
-    <contrib-crawl target="build"/>
-  </target>
-
-  <target name="test-contrib" depends="build-contrib">
-    <contrib-crawl target="test" failonerror="true"/>
-  </target>
-
-  <target name="compile-test-contrib" depends="build-contrib">
-    <contrib-crawl target="compileTests" failonerror="true"/>
-  </target>
-
-  <target name="dist-contrib" description="Make the contribs ready for distribution">
-  	<contrib-crawl target="dist" failonerror="true" />
-  </target>
-
-  <target name="example-contrib" description="Tell the contrib to add their stuff to examples">
-  	<contrib-crawl target="example" failonerror="true" />
-  </target>
-
-  <!-- Creates a Manifest file for Jars and WARs -->
-  <target name="make-manifest">
-     <!-- If possible, include the svnversion -->
-     <exec dir="." executable="${svnversion.exe}" outputproperty="svnversion" failifexecutionfails="false">
-      <arg line="."/>
-     </exec>
-
-     <!-- 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.6.0/docs/guide/jar/jar.html#JAR%20Manifest
-        http://java.sun.com/j2se/1.6.0/docs/guide/versioning/spec/versioning2.html
-        http://java.sun.com/j2se/1.6.0/docs/api/java/lang/Package.html
-        http://java.sun.com/j2se/1.6.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>
-
-  <!-- Validation -->
   <target name="validate" depends="validate-solr"/>
   <target name="validate-solr" depends="check-legal-solr" unless="validated-solr"/>
 
@@ -621,38 +215,163 @@
        -->
       <!-- Solr -->
       <arg value="-c" />
-      <arg value="${basedir}/lib" />
+      <arg value="${common-solr.dir}/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/analysis-extras/lib" />
+      <arg value="${common-solr.dir}/contrib/analysis-extras/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/clustering/lib" />
+      <arg value="${common-solr.dir}/contrib/clustering/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/dataimporthandler/lib" />
+      <arg value="${common-solr.dir}/contrib/dataimporthandler/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/extraction/lib" />
+      <arg value="${common-solr.dir}/contrib/dataimporthandler-extras/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/uima/lib" />
+      <arg value="${common-solr.dir}/contrib/extraction/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/example/example-DIH/solr/db/lib" />
+      <arg value="${common-solr.dir}/contrib/uima/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/example/example-DIH/solr/mail/lib" />
+      <arg value="${common-solr.dir}/example/example-DIH/solr/db/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/example/example/lib" />
+      <arg value="${common-solr.dir}/example/example-DIH/solr/mail/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/src/test-files/solr/lib" />
+      <arg value="${common-solr.dir}/example/example/lib" />
+      <arg value="-c" />
+      <arg value="${common-solr.dir}/core/src/test-files/solr/lib" />
     </java>
+    <property name="validated-solr" value="true"/>
   </target>
-
   <path id="tools.runtime.classpath">
-    <pathelement location="${common-solr.dir}/../lucene/build/classes/tools"/>
+    <pathelement location="${common.dir}/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 name="init-dist" >
+    <mkdir dir="${build.dir}"/>
+    <mkdir dir="${package.dir}"/>
+    <mkdir dir="${dist}"/>
+    <mkdir dir="${maven.dist.dir}"/>
   </target>
 
+  <target name="prep-lucene-jars"
+          depends="compile-analyzers-common, compile-analyzers-phonetic, compile-suggest,
+                   compile-highlighter, compile-memory, compile-misc, compile-queries-contrib,
+                   compile-spatial, compile-grouping, compile-queries, compile-queryparser">
+    <ant dir="${common.dir}" target="default" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
 
+  <target name="lucene-jars-to-solr" depends="prep-lucene-jars">
+    <copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
+      <fileset file="${common.dir}/build/lucene-core-${version}.jar" />
+      <fileset file="${analyzers-common.jar}" />
+      <fileset file="${analyzers-phonetic.jar}" />
+      <fileset file="${suggest.jar}" />
+      <fileset file="${grouping.jar}" />
+      <fileset file="${queries.jar}" />
+      <fileset file="${queryparser.jar}" />
+      <fileset file="${highlighter.jar}" />
+      <fileset file="${memory.jar}" />
+      <fileset file="${misc.jar}" />
+      <fileset file="${queries-contrib.jar}" />
+      <fileset file="${spatial.jar}" />
+    </copy>
+  </target>
+
+  <!-- Shared core/solrj/test-framework/contrib targets -->
+  <target name="jar-core" depends="compile-core">
+    <mkdir dir="${dest}/META-INF/"/>
+    <jarify title="Apache Solr Search Server: ${ant.project.name}"
+            metainf.source.dir="${common-solr.dir}"
+            implementation.title="org.apache.solr"
+            spec.version="${solr.spec.version}"/>
+  </target>
+
+  <target name="dist" depends="jar-core">
+    <copy file="${build.dir}/${fullnamever}.jar" todir="${dist}"/>
+  </target>
+
+  <target name="javadocs" depends="compile-core">
+   	<sequential>
+      <mkdir dir="${javadoc.dir}"/>
+      <invoke-javadoc destdir="${javadoc.dir}"
+                      title="${Name} ${version} ${name} API">
+        <sources>
+          <link href=""/>
+          <packageset dir="${src.dir}"/>
+        </sources>
+      </invoke-javadoc>
+      <jarify basedir="${javadoc.dir}"
+              destfile="${build.dir}/${final.name}-javadoc.jar"
+              title="Apache Solr Search Server: ${ant.project.name}"
+              metainf.source.dir="${common-solr.dir}"
+              implementation.title="org.apache.solr"
+              spec.version="${solr.spec.version}"/>
+     </sequential>
+  </target>
+
+  <target name="jar-src" depends="init">
+  	<jarify basedir="${src.dir}"
+            destfile="${build.dir}/${final.name}-src.jar"
+            implementation.title="org.apache.solr"
+            metainf.source.dir="${common-solr.dir}"
+            spec.version="${solr.spec.version}"/>
+  </target>
+
+  <!-- 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>
+
+  <!-- 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>
+    <property name="solr.test.framework.compiled" value="true"/>
+  </target>
+
+  <!-- Solr contrib targets -->
+  <target name="build-contrib" depends="compile-test"
+          description="Builds all contrib modules and their tests">
+    <contrib-crawl target="build-artifacts-and-tests"/>
+  </target>
+  <target name="contribs-add-to-war">
+    <mkdir dir="${dest}/web"/>
+    <delete dir="${dest}/web" includes="**/*" failonerror="false"/>
+    <contrib-crawl target="add-to-war"/>
+  </target>
 </project>

Modified: lucene/dev/branches/positions/solr/contrib/analysis-extras/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/positions/solr/contrib/analysis-extras/build.xml?rev=1147873&r1=1147872&r2=1147873&view=diff
==============================================================================
--- lucene/dev/branches/positions/solr/contrib/analysis-extras/build.xml (original)
+++ lucene/dev/branches/positions/solr/contrib/analysis-extras/build.xml Mon Jul 18 13:34:29 2011
@@ -17,213 +17,55 @@
     limitations under the License.
  -->
 
-<project name="solr-analysis-extras" default="build">
-
-  <property name="solr-path" value="../.."/>
-
-  <import file="../../common-build.xml"/>
+<project name="solr-analysis-extras" default="default">
 
   <description>
     Additional analysis components
   </description>
 
-  <property name="example.local" value="example"/>
-  
-  <!-- support for the additional analyzers modules -->
-  <path id="modules.classpath">
-    <pathelement location="${common-solr.dir}/../modules/analysis/build/icu/classes/java" />
-    <pathelement location="${common-solr.dir}/../modules/analysis/build/smartcn/classes/java" />
-  	<pathelement location="${common-solr.dir}/../modules/analysis/build/stempel/classes/java" />
-  </path>
-	
-  <target name="prep-module-jars">
-    <subant target="jar" inheritall="false" failonerror="true">
-      <fileset dir="${common-solr.dir}/../modules/analysis/icu" includes="build.xml" />
-      <fileset dir="${common-solr.dir}/../modules/analysis/smartcn" includes="build.xml" />
-      <fileset dir="${common-solr.dir}/../modules/analysis/stempel" includes="build.xml" />
-    </subant>
-  </target>
-
-  <target name="module-jars-to-solr" depends="prep-module-jars">
-    <mkdir dir="${lucene-libs}"/>
-    <copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
-      <fileset dir="${common-solr.dir}/../modules/analysis/build/icu">
-        <include name="lucene-analyzers-icu-${version}.jar" />
-      </fileset>
-      <fileset dir="${common-solr.dir}/../modules/analysis/build/smartcn">
-          <include name="lucene-analyzers-smartcn-${version}.jar" />
-  	  </fileset>
-      <fileset dir="${common-solr.dir}/../modules/analysis/build/stempel">
-        <include name="lucene-analyzers-stempel-${version}.jar" />
-	  </fileset>
-    </copy>
-  </target>
-	 
-  <path id="common.classpath">
-    <fileset dir="lib"/>
-    <pathelement location="${solr-path}/build/solr"/>
-    <pathelement location="${solr-path}/build/solrj"/>
-    <path refid="lucene.classpath"/>
-  	<path refid="modules.classpath"/>
-    <fileset dir="${solr-path}/lib" includes="*.jar"/>
-  </path>
+  <import file="../contrib-build.xml"/>
 
-  <path id="test.classpath">
-    <pathelement path="${dest}/classes"/>
-    <pathelement path="${dest}/test-classes"/>
-    <pathelement path="${java.class.path}"/>
-    <pathelement location="${common-solr.dir}/build/test-framework"/> <!-- include solr test code -->
-    <pathelement location="${common-solr.dir}/../lucene/build/classes/test-framework" />  <!-- include some lucene test code -->
-    <path refid="common.classpath"/>
+  <module-uptodate name="analysis/icu" jarfile="${common.dir}/../modules/analysis/build/icu/lucene-analyzers-icu-${version}.jar"
+	    property="analyzers-icu.uptodate" classpath.property="analyzers-icu.jar"/>
+  <module-uptodate name="analysis/smartcn" jarfile="${common.dir}/../modules/analysis/build/smartcn/lucene-analyzers-smartcn-${version}.jar"
+		property="analyzers-smartcn.uptodate" classpath.property="analyzers-smartcn.jar"/>
+  <module-uptodate name="analysis/stempel" jarfile="${common.dir}/../modules/analysis/build/stempel/lucene-analyzers-stempel-${version}.jar"
+		property="analyzers-stempel.uptodate" classpath.property="analyzers-stempel.jar"/>
+
+  <path id="classpath">
+  	<pathelement path="${analyzers-icu.jar}"/>
+  	<pathelement path="${analyzers-smartcn.jar}"/>
+  	<pathelement path="${analyzers-stempel.jar}"/>
+    <path refid="solr.base.classpath"/>
   </path>
 
-  <target name="clean">
-    <delete failonerror="false" dir="${dest}"/>
-
-    <!-- example doesn't create this anymore, but clean it up
-         if it's still there from an old build
-      -->
-    <delete dir="example/lib" />
-  	<delete dir="${lucene-libs}" />
-  </target>
-
-
-  <target name="init" depends="module-jars-to-solr">
-    <mkdir dir="${dest}/classes"/>
-    
-    <mkdir dir="${build.javadoc}"/>
-    <subant target="compileTestFramework">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-    <subant target="make-manifest">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-  </target>
-
-
-  <target name="compile" depends="init">
-    <solr-javac destdir="${dest}/classes"
-                classpathref="common.classpath">
-      <src path="src/java"/>
-    </solr-javac>
-  </target>
-
-  <target name="build" depends="compile">
-    <solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
-              manifest="../../${dest}/META-INF/MANIFEST.MF"/>
-  </target>
-
-  <target name="compileTests" depends="compile">
-    <solr-javac destdir="${dest}/test-classes"
-                classpathref="test.classpath">
-      <src path="src/test"/>
-    </solr-javac>
-    <!-- Copy any data files present to the classpath -->
-    <copy todir="${dest}/test-classes">
-      <fileset dir="src/test-files" excludes="**/*.java"/>
+  <target name="compile-analyzers-icu" unless="analyzers-icu.uptodate">
+  	<ant dir="${common.dir}/../modules/analysis/icu" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+
+  <target name="compile-analyzers-smartcn" unless="analyzers-smartcn.uptodate">
+  	<ant dir="${common.dir}/../modules/analysis/smartcn" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+
+  <target name="compile-analyzers-stempel" unless="analyzers-stempel.uptodate">
+  	<ant dir="${common.dir}/../modules/analysis/stempel" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+
+  <target name="module-jars-to-solr"
+          depends="compile-analyzers-icu, compile-analyzers-smartcn, compile-analyzers-stempel">
+    <mkdir dir="${build.dir}/lucene-libs"/>
+    <copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
+      <fileset file="${analyzers-icu.jar}"/>
+      <fileset file="${analyzers-smartcn.jar}"/>
+      <fileset file="${analyzers-stempel.jar}"/>
     </copy>
   </target>
 
-  <target name="example" depends="build,dist">
-    <!-- this task use to copy lib's but that's no longer needed because
-         ../lib and ../lib/downloads are now included explicitly by
-         example/conf/solrconfig.xml
-      -->
-  </target>
-
-
-  <target name="test" depends="compileTests">
-    <mkdir dir="${junit.output.dir}"/>
-
-    <condition property="runall">
-      <not>
-        <or>
-          <isset property="testcase"/>
-          <isset property="testpackage"/>
-          <isset property="testpackageroot"/>
-        </or>
-      </not>
-    </condition>
-
-    <junit printsummary="no"
-           haltonfailure="no"
-           maxmemory="512M"
-           errorProperty="tests.failed"
-           failureProperty="tests.failed"
-           dir="${junit.output.dir}"
-           tempdir="${junit.output.dir}"
-           forkmode="perBatch"
-            >
-      <sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
-      <sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
-      <sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
-      <sysproperty key="tests.codec" value="${tests.codec}"/>
-      <sysproperty key="tests.locale" value="${tests.locale}"/>
-      <sysproperty key="tests.timezone" value="${tests.timezone}"/>
-      <sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
-      <sysproperty key="tests.seed" value="${tests.seed}"/>
-      <sysproperty key="tests.verbose" value="${tests.verbose}"/>
-      <sysproperty key="tests.iter" value="${tests.iter}"/>
-      <!-- set whether or not nightly tests should run -->
-      <sysproperty key="tests.nightly" value="${tests.nightly}"/>
-      <sysproperty key="jetty.testMode" value="1"/>
-      <sysproperty key="tempDir" file="${junit.output.dir}"/>
-      <sysproperty key="testmethod" value="${testmethod}"/>
-      <sysproperty key="tests.directory" value="${tests.directory}"/>
-      <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
-      <jvmarg line="${args}"/>
-      <formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
-      <classpath refid="test.classpath"/>
-      <assertions>
-        <enable package="org.apache.lucene"/>
-        <enable package="org.apache.solr"/>
-      </assertions>
-      <formatter type="${junit.formatter}"/>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="runall">
-        <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>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
-        <fileset dir="src/test" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" />
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
-        <fileset dir="src/test" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" />
-      </batchtest>
-    </junit>
-
-    <fail if="tests.failed">Tests failed!</fail>
-  </target>
-
-  <target name="dist" depends="build">
-    <!--
-      <copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"/>
-      <copy todir="${solr-path}/build/web/WEB-INF/lib" flatten="true">
-        <fileset dir="lib">
-          <include name="**/*.jar"/>
-        </fileset>
-      </copy>
-    -->
-    <copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/dist"/>
-  </target>
-
-  <target name="javadoc">
-    <sequential>
-      <mkdir dir="${build.javadoc}/contrib-${name}"/>
-
-      <path id="javadoc.classpath">
-        <path refid="common.classpath"/>
-      </path>
-
-      <invoke-javadoc
-              destdir="${build.javadoc}/contrib-${name}"
-              title="${Name} ${version} contrib-${fullnamever} API">
-        <sources>
-          <packageset dir="src/java"/>
-        </sources>
-      </invoke-javadoc>
-    </sequential>
-  </target>
-
+  <target name="compile-core" depends="module-jars-to-solr, solr-contrib-build.compile-core"/>
 </project>

Modified: lucene/dev/branches/positions/solr/contrib/clustering/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/positions/solr/contrib/clustering/build.xml?rev=1147873&r1=1147872&r2=1147873&view=diff
==============================================================================
--- lucene/dev/branches/positions/solr/contrib/clustering/build.xml (original)
+++ lucene/dev/branches/positions/solr/contrib/clustering/build.xml Mon Jul 18 13:34:29 2011
@@ -17,187 +17,11 @@
     limitations under the License.
  -->
 
-<project name="solr-clustering" default="build">
-
-  <property name="solr-path" value="../.."/>
-
-  <import file="../../common-build.xml"/>
+<project name="solr-clustering" default="default">
 
   <description>
     Clustering Integraton
   </description>
 
-  <property name="example.local" value="example"/>
-  
-  <path id="common.classpath">
-  	<fileset dir="lib" includes="*.jar"/>
-    <pathelement location="${solr-path}/build/solr"/>
-    <pathelement location="${solr-path}/build/solrj"/>
-    <path refid="lucene.classpath"/>
-    <fileset dir="${solr-path}/lib" includes="*.jar"/>
-  </path>
-
-  <path id="test.classpath">
-    <pathelement path="${dest}/classes"/>
-    <pathelement path="${dest}/test-classes"/>
-    <pathelement path="${java.class.path}"/>
-    <pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
-    <pathelement location="${solr-path}/../lucene/build/classes/test-framework" />  <!-- include some lucene test code -->
-    <path refid="common.classpath"/>
-    <!-- DistributedClusteringComponentTest uses Jetty -->
-    <fileset dir="${solr-path}/example/lib">
-      <include name="**/*.jar" />
-    </fileset>
-  </path>
-
-  <target name="clean">
-    <delete failonerror="false" dir="${dest}"/>
-
-    <!-- example doesn't create this anymore, but clean it up
-         if it's still there from an old build
-      -->
-    <delete dir="example/lib" />
-  </target>
-
-
-  <target name="init">
-    <mkdir dir="${dest}/classes"/>
-    
-    <mkdir dir="${build.javadoc}"/>
-    <subant target="compileTestFramework">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-    <subant target="make-manifest">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-  </target>
-
-
-  <target name="compile" depends="init">
-    <solr-javac destdir="${dest}/classes"
-                classpathref="common.classpath">
-      <src path="src/main/java"/>
-    </solr-javac>
-  </target>
-
-  <target name="build" depends="compile">
-    <solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
-              manifest="../../${dest}/META-INF/MANIFEST.MF"/>
-  </target>
-
-  <target name="compileTests" depends="compile">
-    <solr-javac destdir="${dest}/test-classes"
-                classpathref="test.classpath">
-      <src path="src/test/java"/>
-    </solr-javac>
-    <!-- Copy any data files present to the classpath -->
-    <copy todir="${dest}/test-classes">
-      <fileset dir="src/test/resources" excludes="**/*.java"/>
-    </copy>
-  </target>
-
-  <target name="example" depends="build,dist">
-    <!-- this task use to copy lib's but that's no longer needed because
-         ../lib and ../lib/downloads are now included explicitly by
-         example/conf/solrconfig.xml
-      -->
-  </target>
-
-
-  <target name="test" depends="compileTests">
-    <mkdir dir="${junit.output.dir}"/>
-
-    <condition property="runall">
-      <not>
-        <or>
-          <isset property="testcase"/>
-          <isset property="testpackage"/>
-          <isset property="testpackageroot"/>
-        </or>
-      </not>
-    </condition>
-
-    <junit printsummary="no"
-           haltonfailure="no"
-           maxmemory="512M"
-           errorProperty="tests.failed"
-           failureProperty="tests.failed"
-           dir="${junit.output.dir}"
-           tempdir="${junit.output.dir}"
-           forkmode="perBatch"
-            >
-      <sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
-      <sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
-      <sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
-      <sysproperty key="tests.codec" value="${tests.codec}"/>
-      <sysproperty key="tests.locale" value="${tests.locale}"/>
-      <sysproperty key="tests.timezone" value="${tests.timezone}"/>
-      <sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
-      <sysproperty key="tests.seed" value="${tests.seed}"/>
-      <sysproperty key="tests.verbose" value="${tests.verbose}"/>
-      <sysproperty key="tests.iter" value="${tests.iter}"/>
-      <!-- set whether or not nightly tests should run -->
-      <sysproperty key="tests.nightly" value="${tests.nightly}"/>
-      <sysproperty key="jetty.testMode" value="1"/>
-      <sysproperty key="tempDir" file="${junit.output.dir}"/>
-      <sysproperty key="testmethod" value="${testmethod}"/>
-      <sysproperty key="tests.directory" value="${tests.directory}"/>
-      <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
-      <jvmarg line="${args}"/>
-      <formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
-      <classpath refid="test.classpath"/>
-      <assertions>
-        <enable package="org.apache.lucene"/>
-        <enable package="org.apache.solr"/>
-      </assertions>
-      <formatter type="${junit.formatter}"/>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="runall">
-        <fileset dir="src/test/java" includes="${junit.includes}">
-          <exclude name="**/AbstractClusteringTest*"/>
-        </fileset>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
-        <fileset dir="src/test/java" includes="**/${testcase}.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
-        <fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" />
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
-        <fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" />
-      </batchtest>
-    </junit>
-
-    <fail if="tests.failed">Tests failed!</fail>
-  </target>
-
-  <target name="dist" depends="build">
-    <!--
-      <copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"/>
-      <copy todir="${solr-path}/build/web/WEB-INF/lib" flatten="true">
-        <fileset dir="lib">
-          <include name="**/*.jar"/>
-        </fileset>
-      </copy>
-    -->
-    <copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/dist"/>
-  </target>
-
-  <target name="javadoc">
-    <sequential>
-      <mkdir dir="${build.javadoc}/contrib-${name}"/>
-
-      <path id="javadoc.classpath">
-        <path refid="common.classpath"/>
-      </path>
-
-      <invoke-javadoc
-              destdir="${build.javadoc}/contrib-${name}"
-              title="${Name} ${version} contrib-${fullnamever} API">
-        <sources>
-          <packageset dir="src/main/java"/>
-        </sources>
-      </invoke-javadoc>
-    </sequential>
-  </target>
-
+  <import file="../contrib-build.xml"/>
 </project>

Modified: lucene/dev/branches/positions/solr/contrib/dataimporthandler/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/positions/solr/contrib/dataimporthandler/CHANGES.txt?rev=1147873&r1=1147872&r2=1147873&view=diff
==============================================================================
--- lucene/dev/branches/positions/solr/contrib/dataimporthandler/CHANGES.txt (original)
+++ lucene/dev/branches/positions/solr/contrib/dataimporthandler/CHANGES.txt Mon Jul 18 13:34:29 2011
@@ -14,7 +14,11 @@ $Id$
 
 ==================  3.4.0-dev ==============
 
-(No changes)
+Bug Fixes
+----------------------
+* SOLR-2644: When using threads=2 the default logging is set too high (Bill Bell via shalin)
+* SOLR-2492: DIH does not commit if only deletes are processed (James Dyer via shalin)
+* SOLR-2186: DataImportHandler's multi-threaded option throws NPE (Lance Norskog, Frank Wesemann, shalin)
 
 ==================  3.3.0 ==================
 

Modified: lucene/dev/branches/positions/solr/contrib/dataimporthandler/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/positions/solr/contrib/dataimporthandler/build.xml?rev=1147873&r1=1147872&r2=1147873&view=diff
==============================================================================
--- lucene/dev/branches/positions/solr/contrib/dataimporthandler/build.xml (original)
+++ lucene/dev/branches/positions/solr/contrib/dataimporthandler/build.xml Mon Jul 18 13:34:29 2011
@@ -17,303 +17,15 @@
     limitations under the License.
  -->
 
-<project name="solr-dataimporthandler" default="build">
+<project name="solr-dataimporthandler" default="default">
 	
-  <property name="solr-path" value="../.." />
-  <property name="tikalibs-path" value="../extraction/lib" />
-
-  <import file="../../common-build.xml"/>
-  
   <description>
     Data Import Handler
   </description>
-  <path id="classpath.jetty">
-    <!-- jetty -->
-    <fileset dir="${solr-path}/example/lib">
-      <include name="**/*.jar" />
-    </fileset>
-  </path>
-  <path id="common.classpath">
-  	<pathelement location="${solr-path}/build/solr" />
-  	<pathelement location="${solr-path}/build/solrj" />
-  	<fileset dir="${solr-path}/lib" includes="*.jar"/>
-    <path refid="lucene.classpath"/>
-  </path>
-
-  <path id="extras.classpath">
-  	<pathelement location="${solr-path}/build/solr" />
-  	<pathelement location="${solr-path}/build/solrj" />
-  	<pathelement location="target/classes" />
-  	<fileset dir="${solr-path}/lib" includes="*.jar"/>
-  	<fileset dir="lib/" includes="*.jar"/>
-  	<fileset dir="${tikalibs-path}" includes="*.jar"/>
-    <path refid="lucene.classpath"/>
-  </path>
-	
-  <path id="test.classpath">
-  	<path refid="common.classpath" />
-  	<path refid="classpath.jetty" />
-	  <pathelement path="target/classes" />
-  	<pathelement path="target/test-classes" />
-    <pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
-    <pathelement location="${solr-path}/../lucene/build/classes/test-framework" />  <!-- include some lucene test code -->
-    <pathelement path="${java.class.path}"/>
-  </path>
-
-  <path id="test.extras.classpath">
-  	<path refid="extras.classpath" />
-  	<path refid="classpath.jetty" />
-	  <pathelement path="target/classes" />
-	  <pathelement path="target/extras/classes" />
-  	<pathelement path="target/test-classes" />
-  	<pathelement path="target/extras/test-classes" />
-    <pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
-    <pathelement location="${solr-path}/../lucene/build/classes/test-framework" />  <!-- include some lucene test code -->
-    <pathelement path="${java.class.path}"/>
-  </path>
-	
-  <target name="clean">
-  	<delete failonerror="false" dir="target"/>
-    <delete failonerror="false">
-      <fileset dir="src/test/resources" includes="**/dataimport.properties" />
-    </delete>
-    <!-- Clean up examples -->
-    <delete failonerror="false">
-      <!-- we no longer copy things into this directory, but we still clean it up
-           the files are still there from a previous checkout
-        -->
-      <fileset dir="${example}/example-DIH/solr/mail/lib" includes="*.jar" />
-    </delete>
-  </target>
-	
-  <target name="init">
-  	<mkdir dir="target/classes"/>
-    <mkdir dir="${build.javadoc}" />
-    <subant target="compileTestFramework">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-    <subant target="make-manifest">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-  </target>
-	
-  <target name="compile" depends="init">
-    <solr-javac destdir="target/classes"
-                classpathref="common.classpath">
-      <src path="src/main/java" />
-    </solr-javac>
-  </target>
-
-  <target name="compileExtras" depends="compile">
-    <solr-javac destdir="target/extras/classes"
-                classpathref="extras.classpath">
-      <src path="src/extras/main/java" />
-    </solr-javac>
-  </target>
-	
-  <target name="build" depends="compile,compileExtras">
-    <solr-jar destfile="target/${fullnamever}.jar" basedir="target/classes"
-              manifest="../../${dest}/META-INF/MANIFEST.MF" />
-    <solr-jar destfile="target/apache-${ant.project.name}-extras-${version}.jar" basedir="target/extras/classes"
-              manifest="../../${dest}/META-INF/MANIFEST.MF" />
-  </target>
-	
-  <target name="compileTests" depends="compileCoreTests,compileExtrasTests"/>
-  
-  <target name="compileCoreTests" depends="compile">
-  	<solr-javac destdir="target/test-classes"
-  	                classpathref="test.classpath">
-  	  <src path="src/test/java" />
-  	</solr-javac>
-    <!-- Copy any data files present to the classpath -->
-    <copy todir="target/test-classes">
-      <fileset dir="src/test/resources" excludes="**/*.java"/>
-    </copy>
-  </target>
-
-  <target name="compileExtrasTests" depends="compileExtras">
-  	<solr-javac destdir="target/extras/test-classes"
-  	                classpathref="test.classpath">
-  	  <src path="src/extras/test/java" />
-  	</solr-javac>
-    <!-- Copy any data files present to the classpath -->
-    <copy todir="target/extras/test-classes">
-      <fileset dir="src/extras/test/resources" excludes="**/*.java"/>
-    </copy>
-  </target>
-
-  <property name="tempDir" value="${junit.output.dir}/temp" />
-  <target  name="test" depends="testCore,testExtras"/>
-	
-  <target name="testCore" depends="compileCoreTests">
-  	<mkdir dir="${junit.output.dir}"/>
-    <!-- <mkdir dir="@{tempDir}/@{pattern}"/> 
-       This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
-    -->
-  	<touch file="${tempDir}/quiet.ant" verbose="false" mkdirs="true"/>
-    <condition property="runall">
-      <not>
-        <or>
-          <isset property="testcase"/>
-          <isset property="testpackage"/>
-          <isset property="testpackageroot"/>
-        </or>
-      </not>
-    </condition>
-    
-  	<junit printsummary="no"
-           haltonfailure="no"
-           maxmemory="512M"
-           errorProperty="tests.failed"
-           failureProperty="tests.failed"
-           dir="${tempDir}"
-           tempdir="${tempDir}"
-           forkmode="perBatch"
-           >
-      <sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
-      <sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
-      <sysproperty key="tests.codec" value="${tests.codec}"/>
-      <sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
-      <sysproperty key="tests.locale" value="${tests.locale}"/>
-      <sysproperty key="tests.timezone" value="${tests.timezone}"/>
-      <sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
-      <sysproperty key="tests.iter" value="${tests.iter}"/>
-      <sysproperty key="tests.seed" value="${tests.seed}"/>
-      <sysproperty key="tests.verbose" value="${tests.verbose}"/>
-      <!-- set whether or not nightly tests should run -->
-      <sysproperty key="tests.nightly" value="${tests.nightly}"/>
-      <sysproperty key="jetty.testMode" value="1"/>
-      <sysproperty key="tempDir" file="${tempDir}"/>
-      <sysproperty key="testmethod" value="${testmethod}"/>
-      <sysproperty key="tests.directory" value="${tests.directory}"/>
-      <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
-      <jvmarg line="${args}"/>
-      <formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
-      <classpath refid="test.classpath"/>
-      <formatter type="${junit.formatter}"/>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="runall">
-        <fileset dir="src/test/java" includes="${junit.includes}"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
-        <fileset dir="src/test/java" includes="**/${testcase}.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
-        <fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
-        <fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
-      </batchtest>
-    </junit>
-
-    <fail if="tests.failed">Tests failed!</fail>
-  </target>
-
-  <target name="testExtras" depends="compileExtrasTests">
-  	<mkdir dir="${junit.output.dir}"/>
-    <!-- <mkdir dir="@{tempDir}/@{pattern}"/> 
-       This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
-    -->
-  	<touch file="${tempDir}/quiet.ant" verbose="false" mkdirs="true"/>
-
-    <condition property="runall">
-      <not>
-        <or>
-          <isset property="testcase"/>
-          <isset property="testpackage"/>
-          <isset property="testpackageroot"/>
-        </or>
-      </not>
-    </condition>    
-    
-  	<junit printsummary="no"
-           haltonfailure="no"
-           maxmemory="512M"
-           errorProperty="tests.failed"
-           failureProperty="tests.failed"
-           dir="${tempDir}"
-           tempdir="${tempDir}"
-           forkmode="perBatch"
-           >
-      <sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
-      <sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
-      <sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
-      <sysproperty key="tests.codec" value="${tests.codec}"/>
-      <sysproperty key="tests.locale" value="${tests.locale}"/>
-      <sysproperty key="tests.timezone" value="${tests.timezone}"/>
-      <sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
-      <sysproperty key="tests.iter" value="${tests.iter}"/>
-      <sysproperty key="tests.seed" value="${tests.seed}"/>
-      <sysproperty key="tests.verbose" value="${tests.verbose}"/>
-      <!-- set whether or not nightly tests should run -->
-      <sysproperty key="tests.nightly" value="${tests.nightly}"/>
-      <sysproperty key="jetty.testMode" value="1"/>
-      <sysproperty key="tempDir" file="${tempDir}"/>
-      <sysproperty key="testmethod" value="${testmethod}"/>
-      <sysproperty key="tests.directory" value="${tests.directory}"/>
-      <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
-      <jvmarg line="${args}"/>
-      <formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
-      <classpath refid="test.extras.classpath"/>
-      <assertions>
-        <enable package="org.apache.lucene"/>
-        <enable package="org.apache.solr"/>
-      </assertions>
-      <formatter type="${junit.formatter}"/>
-  	  
-      <batchtest fork="yes" todir="${junit.output.dir}" if="runall">
-        <fileset dir="src/extras/test/java" includes="${junit.includes}"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
-        <fileset dir="src/extras/test/java" includes="**/${testcase}.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
-        <fileset dir="src/extras/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
-        <fileset dir="src/extras/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
-      </batchtest>
-  	  
-  	  
-    </junit>
-
-    <fail if="tests.failed">Tests failed!</fail>
-  </target>
-	
-  <target name="dist" depends="build">
-  	<copy todir="../../build/web">
-  		<fileset dir="src/main/webapp" includes="**" />
-  	</copy>
-  	<mkdir dir="../../build/web/WEB-INF/lib"/>
-  	<!--<copy file="target/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"></copy>-->
-  	<copy file="target/${fullnamever}.jar" todir="${solr-path}/dist"></copy>
-  	<copy file="target/apache-${ant.project.name}-extras-${version}.jar" todir="${solr-path}/dist"></copy>
-  </target>
-	
-  <target name="javadoc">
-   	<sequential>
-      <mkdir dir="${build.javadoc}/contrib-${name}"/>
 
-      <path id="javadoc.classpath">
-        <path refid="common.classpath"/>
-        <path refid="extras.classpath"/>
-      </path>
+  <!-- the tests have some parallel problems: writability to single copy of dataimport.properties -->
+  <property name="tests.threadspercpu" value="0"/>
 
-      <invoke-javadoc
-        destdir="${build.javadoc}/contrib-${name}"
-      	title="${Name} ${version} contrib-${fullnamever} API">
-        <sources>
-          <packageset dir="src/main/java"/>
-          <packageset dir="src/extras/main/java"/>
-        </sources>
-      </invoke-javadoc>
-    </sequential>
-  </target>
+  <import file="../contrib-build.xml"/>
 
-  <target name="example" depends="build,dist">
-    <!--
-        this target use to copy libs, but that is no longer needed.
-        now we just depend on dist to ensure the extra's jar exists.
-     -->
-  </target>
-  
 </project>

Modified: lucene/dev/branches/positions/solr/contrib/extraction/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/positions/solr/contrib/extraction/build.xml?rev=1147873&r1=1147872&r2=1147873&view=diff
==============================================================================
--- lucene/dev/branches/positions/solr/contrib/extraction/build.xml (original)
+++ lucene/dev/branches/positions/solr/contrib/extraction/build.xml Mon Jul 18 13:34:29 2011
@@ -17,180 +17,12 @@
     limitations under the License.
  -->
 
-<project name="solr-cell" default="build">
+<project name="solr-cell" default="default">
 
-  <property name="solr-path" value="../.." />
-
-  <import file="../../common-build.xml"/>
-  
   <description>
     Solr Integration with Tika for extracting content from binary file formats such as Microsoft Word and Adobe PDF.
   </description>
 
-  <path id="common.classpath">
-    <pathelement location="${solr-path}/build/solr" />
-    <pathelement location="${solr-path}/build/solrj" />
-    <fileset dir="lib" includes="*.jar"/>
-    <fileset dir="${solr-path}/lib" includes="*.jar"/>
-    <path refid="lucene.classpath"/>
-  </path>
-
-  <path id="test.classpath">
-    <path refid="common.classpath" />
-    <pathelement path="${dest}/classes" />
-    <pathelement path="${dest}/test-classes" />
-    <pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
-    <pathelement location="${solr-path}/../lucene/build/classes/test-framework" />  <!-- include some lucene test code -->
-    <pathelement path="${java.class.path}"/>
-  </path>
-
-  <target name="clean">
-    <delete failonerror="false" dir="${dest}"/>
-  </target>
-
-  <target name="init">
-    <mkdir dir="${dest}/classes"/>
-    <mkdir dir="${build.javadoc}" />
-    <subant target="compileTestFramework">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-    <subant target="make-manifest">
-      <fileset dir="${solr-path}" includes="build.xml"/>
-    </subant>
-
-  </target>
-
-  <target name="compile" depends="init">
-    <solr-javac destdir="${dest}/classes"
-    classpathref="common.classpath">
-      <src path="src/main/java" />
-    </solr-javac>
-  </target>
-
-  <target name="build" depends="compile">
-    <solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
-              manifest="../../${dest}/META-INF/MANIFEST.MF">
-
-    </solr-jar>
-  </target>
-
-  <target name="compileTests" depends="compile">
-  	<solr-javac destdir="${dest}/test-classes"
-  	                classpathref="test.classpath">
-  	  <src path="src/test/java" />
-  	</solr-javac>
-    <!-- Copy any data files present to the classpath -->
-    <copy todir="${dest}/test-classes">
-      <fileset dir="src/test/resources" excludes="**/*.java"/>
-    </copy>
-  </target>
-
-  <property name="tempDir" value="${junit.output.dir}/temp" />
-
-  <target name="test" depends="compileTests">
-  	<mkdir dir="${junit.output.dir}"/>
-    <!-- <mkdir dir="@{tempDir}/@{pattern}"/> 
-       This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
-    -->
-  	<touch file="${tempDir}/quiet.ant" verbose="false" mkdirs="true"/>
-
-    <condition property="runall">
-      <not>
-        <or>
-          <isset property="testcase"/>
-          <isset property="testpackage"/>
-          <isset property="testpackageroot"/>
-        </or>
-      </not>
-    </condition>    
-    
-  	<junit printsummary="no"
-           haltonfailure="no"
-           maxmemory="512M"
-           errorProperty="tests.failed"
-           failureProperty="tests.failed"
-           dir="${tempDir}"
-           tempdir="${tempDir}"
-           forkmode="perBatch"
-           >
-      <sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
-      <sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
-      <sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
-      <sysproperty key="tests.codec" value="${tests.codec}"/>
-      <sysproperty key="tests.locale" value="${tests.locale}"/>
-      <sysproperty key="tests.timezone" value="${tests.timezone}"/>
-      <sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
-      <sysproperty key="tests.iter" value="${tests.iter}"/>
-      <sysproperty key="tests.seed" value="${tests.seed}"/>
-      <sysproperty key="tests.verbose" value="${tests.verbose}"/>
-      <!-- set whether or not nightly tests should run -->
-      <sysproperty key="tests.nightly" value="${tests.nightly}"/>
-      <sysproperty key="jetty.testMode" value="1"/>
-      <sysproperty key="tempDir" file="${tempDir}"/>
-      <sysproperty key="testmethod" value="${testmethod}"/>
-      <sysproperty key="tests.directory" value="${tests.directory}"/>
-      <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
-      <jvmarg line="${args}"/>
-      <formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
-      <classpath refid="test.classpath"/>
-      <assertions>
-        <enable package="org.apache.lucene"/>
-        <enable package="org.apache.solr"/>
-      </assertions>
-      <formatter type="${junit.formatter}"/>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="runall">
-        <fileset dir="src/test/java" includes="${junit.includes}"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
-        <fileset dir="src/test/java" includes="**/${testcase}.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
-        <fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
-      </batchtest>
-      <batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
-        <fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
-      </batchtest>
-    </junit>
-
-    <fail if="tests.failed">Tests failed!</fail>
-  </target>
-
-  <target name="test-reports"
-          description="Generates HTML test reports.">
-    <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>
-
-  <target name="dist" depends="build">
-    <copy file="build/${fullnamever}.jar" todir="${solr-path}/dist"/>
-  </target>
-
-  <target name="example" depends="build">
-    <!-- :NOOP: this use to copy libs but now we can refer to them by path -->
-  </target>
-
-  <target name="javadoc">
-   	<sequential>
-      <mkdir dir="${build.javadoc}/contrib-${name}"/>
-
-      <path id="javadoc.classpath">
-        <path refid="common.classpath"/>
-      </path>
-
-      <invoke-javadoc
-        destdir="${build.javadoc}/contrib-${name}"
-      	title="${Name} ${version} contrib-${fullnamever} API">
-        <sources>
-          <packageset dir="src/main/java"/>
-        </sources>
-      </invoke-javadoc>
-    </sequential>
-  </target>
-
+  <import file="../contrib-build.xml"/>
 
 </project>