lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject svn commit: r1144174 [6/7] - in /lucene/dev/branches/solr2452: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/lucene/contrib/ dev-tools/idea/lucene/contrib/queryparser/ dev-tools/idea/solr/ dev-tools/idea/solr/contrib/analysis-extras/ dev-t...
Date Fri, 08 Jul 2011 06:41:31 GMT
Modified: lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java (original)
+++ lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java Fri Jul  8 06:41:23 2011
@@ -195,21 +195,14 @@ public class CustomScoreQuery extends Qu
       return CustomScoreQuery.this;
     }
 
-    /*(non-Javadoc) @see org.apache.lucene.search.Weight#getValue() */
     @Override
-    public float getValue() {
-      return getBoost();
-    }
-
-    /*(non-Javadoc) @see org.apache.lucene.search.Weight#sumOfSquaredWeights() */
-    @Override
-    public float sumOfSquaredWeights() throws IOException {
-      float sum = subQueryWeight.sumOfSquaredWeights();
+    public float getValueForNormalization() throws IOException {
+      float sum = subQueryWeight.getValueForNormalization();
       for(int i = 0; i < valSrcWeights.length; i++) {
         if (qStrict) {
-          valSrcWeights[i].sumOfSquaredWeights(); // do not include ValueSource part in the query normalization
+          valSrcWeights[i].getValueForNormalization(); // do not include ValueSource part in the query normalization
         } else {
-          sum += valSrcWeights[i].sumOfSquaredWeights();
+          sum += valSrcWeights[i].getValueForNormalization();
         }
       }
       sum *= getBoost() * getBoost(); // boost each sub-weight
@@ -218,14 +211,14 @@ public class CustomScoreQuery extends Qu
 
     /*(non-Javadoc) @see org.apache.lucene.search.Weight#normalize(float) */
     @Override
-    public void normalize(float norm) {
-      norm *= getBoost(); // incorporate boost
-      subQueryWeight.normalize(norm);
+    public void normalize(float norm, float topLevelBoost) {
+      topLevelBoost *= getBoost(); // incorporate boost
+      subQueryWeight.normalize(norm, topLevelBoost);
       for(int i = 0; i < valSrcWeights.length; i++) {
         if (qStrict) {
-          valSrcWeights[i].normalize(1); // do not normalize the ValueSource part
+          valSrcWeights[i].normalize(1, 1); // do not normalize the ValueSource part
         } else {
-          valSrcWeights[i].normalize(norm);
+          valSrcWeights[i].normalize(norm, topLevelBoost);
         }
       }
     }
@@ -245,7 +238,7 @@ public class CustomScoreQuery extends Qu
       for(int i = 0; i < valSrcScorers.length; i++) {
          valSrcScorers[i] = valSrcWeights[i].scorer(context, scorerContext.scoreDocsInOrder(true));
       }
-      return new CustomScorer(CustomScoreQuery.this.getCustomScoreProvider(context), this, subQueryScorer, valSrcScorers);
+      return new CustomScorer(CustomScoreQuery.this.getCustomScoreProvider(context), this, getBoost(), subQueryScorer, valSrcScorers);
     }
 
     @Override
@@ -265,11 +258,11 @@ public class CustomScoreQuery extends Qu
         valSrcExpls[i] = valSrcWeights[i].explain(info, doc);
       }
       Explanation customExp = CustomScoreQuery.this.getCustomScoreProvider(info).customExplain(doc,subQueryExpl,valSrcExpls);
-      float sc = getValue() * customExp.getValue();
+      float sc = getBoost() * customExp.getValue();
       Explanation res = new ComplexExplanation(
         true, sc, CustomScoreQuery.this.toString() + ", product of:");
       res.addDetail(customExp);
-      res.addDetail(new Explanation(getValue(), "queryBoost")); // actually using the q boost as q weight (== weight value)
+      res.addDetail(new Explanation(getBoost(), "queryBoost")); // actually using the q boost as q weight (== weight value)
       return res;
     }
 
@@ -294,10 +287,10 @@ public class CustomScoreQuery extends Qu
     private float vScores[]; // reused in score() to avoid allocating this array for each doc 
 
     // constructor
-    private CustomScorer(CustomScoreProvider provider, CustomWeight w,
+    private CustomScorer(CustomScoreProvider provider, CustomWeight w, float qWeight,
         Scorer subQueryScorer, Scorer[] valSrcScorers) throws IOException {
       super(w);
-      this.qWeight = w.getValue();
+      this.qWeight = qWeight;
       this.subQueryScorer = subQueryScorer;
       this.valSrcScorers = valSrcScorers;
       this.vScores = new float[valSrcScorers.length];

Modified: lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java (original)
+++ lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java Fri Jul  8 06:41:23 2011
@@ -78,21 +78,16 @@ public class BoostedQuery extends Query 
     }
 
     @Override
-    public float getValue() {
-      return getBoost();
-    }
-
-    @Override
-    public float sumOfSquaredWeights() throws IOException {
-      float sum = qWeight.sumOfSquaredWeights();
+    public float getValueForNormalization() throws IOException {
+      float sum = qWeight.getValueForNormalization();
       sum *= getBoost() * getBoost();
       return sum ;
     }
 
     @Override
-    public void normalize(float norm) {
-      norm *= getBoost();
-      qWeight.normalize(norm);
+    public void normalize(float norm, float topLevelBoost) {
+      topLevelBoost *= getBoost();
+      qWeight.normalize(norm, topLevelBoost);
     }
 
     @Override
@@ -101,7 +96,7 @@ public class BoostedQuery extends Query 
       if(subQueryScorer == null) {
         return null;
       }
-      return new BoostedQuery.CustomScorer(context, this, subQueryScorer, boostVal);
+      return new BoostedQuery.CustomScorer(context, this, getBoost(), subQueryScorer, boostVal);
     }
 
     @Override
@@ -128,11 +123,11 @@ public class BoostedQuery extends Query 
     private final DocValues vals;
     private final AtomicReaderContext readerContext;
 
-    private CustomScorer(AtomicReaderContext readerContext, BoostedQuery.BoostedWeight w,
+    private CustomScorer(AtomicReaderContext readerContext, BoostedQuery.BoostedWeight w, float qWeight,
         Scorer scorer, ValueSource vs) throws IOException {
       super(w);
       this.weight = w;
-      this.qWeight = w.getValue();
+      this.qWeight = qWeight;
       this.scorer = scorer;
       this.readerContext = readerContext;
       this.vals = vs.getValues(weight.fcontext, readerContext);

Modified: lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java (original)
+++ lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java Fri Jul  8 06:41:23 2011
@@ -77,25 +77,20 @@ public class FunctionQuery extends Query
     }
 
     @Override
-    public float getValue() {
-      return queryWeight;
-    }
-
-    @Override
-    public float sumOfSquaredWeights() throws IOException {
+    public float getValueForNormalization() throws IOException {
       queryWeight = getBoost();
       return queryWeight * queryWeight;
     }
 
     @Override
-    public void normalize(float norm) {
-      this.queryNorm = norm;
+    public void normalize(float norm, float topLevelBoost) {
+      this.queryNorm = norm * topLevelBoost;
       queryWeight *= this.queryNorm;
     }
 
     @Override
     public Scorer scorer(AtomicReaderContext context, ScorerContext scorerContext) throws IOException {
-      return new AllScorer(context, this);
+      return new AllScorer(context, this, queryWeight);
     }
 
     @Override
@@ -114,10 +109,10 @@ public class FunctionQuery extends Query
     final boolean hasDeletions;
     final Bits liveDocs;
 
-    public AllScorer(AtomicReaderContext context, FunctionWeight w) throws IOException {
+    public AllScorer(AtomicReaderContext context, FunctionWeight w, float qWeight) throws IOException {
       super(w);
       this.weight = w;
-      this.qWeight = w.getValue();
+      this.qWeight = qWeight;
       this.reader = context.reader;
       this.maxDoc = reader.maxDoc();
       this.hasDeletions = reader.hasDeletions();

Modified: lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java (original)
+++ lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java Fri Jul  8 06:41:23 2011
@@ -22,6 +22,7 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.queries.function.DocValues;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.TFIDFSimilarity;
 import org.apache.lucene.util.BytesRef;
 
 import java.io.IOException;
@@ -42,9 +43,11 @@ public class IDFValueSource extends DocF
   public DocValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
     IndexSearcher searcher = (IndexSearcher)context.get("searcher");
     Similarity sim = searcher.getSimilarityProvider().get(field);
-    // todo: we need docFreq that takes a BytesRef
-    int docfreq = searcher.docFreq(new Term(indexedField, indexedBytes.utf8ToString()));
-    float idf = sim.idf(docfreq, searcher.maxDoc());
+    if (!(sim instanceof TFIDFSimilarity)) {
+      throw new UnsupportedOperationException("requires a TFIDFSimilarity (such as DefaultSimilarity)");
+    }
+    int docfreq = searcher.docFreq(new Term(indexedField, indexedBytes));
+    float idf = ((TFIDFSimilarity)sim).idf(docfreq, searcher.maxDoc());
     return new ConstDoubleDocValues(idf, this);
   }
 }

Modified: lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java (original)
+++ lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java Fri Jul  8 06:41:23 2011
@@ -23,6 +23,8 @@ import org.apache.lucene.queries.functio
 import org.apache.lucene.queries.function.docvalues.FloatDocValues;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.TFIDFSimilarity;
+
 import java.io.IOException;
 import java.util.Map;
 
@@ -49,7 +51,11 @@ public class NormValueSource extends Val
   @Override
   public DocValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
     IndexSearcher searcher = (IndexSearcher)context.get("searcher");
-    final Similarity similarity = searcher.getSimilarityProvider().get(field);
+    Similarity sim = searcher.getSimilarityProvider().get(field);
+    if (!(sim instanceof TFIDFSimilarity)) {
+      throw new UnsupportedOperationException("requires a TFIDFSimilarity (such as DefaultSimilarity)");
+    }
+    final TFIDFSimilarity similarity = (TFIDFSimilarity) sim;
     final byte[] norms = readerContext.reader.norms(field);
     if (norms == null) {
       return new ConstDoubleDocValues(0.0, this);

Modified: lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java (original)
+++ lucene/dev/branches/solr2452/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java Fri Jul  8 06:41:23 2011
@@ -24,6 +24,7 @@ import org.apache.lucene.queries.functio
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.TFIDFSimilarity;
 import org.apache.lucene.util.BytesRef;
 
 import java.io.IOException;
@@ -43,7 +44,11 @@ public class TFValueSource extends TermF
   public DocValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
     Fields fields = readerContext.reader.fields();
     final Terms terms = fields.terms(field);
-    final Similarity similarity = ((IndexSearcher)context.get("searcher")).getSimilarityProvider().get(field);
+    final Similarity sim = ((IndexSearcher)context.get("searcher")).getSimilarityProvider().get(field);
+    if (!(sim instanceof TFIDFSimilarity)) {
+      throw new UnsupportedOperationException("requires a TFIDFSimilarity (such as DefaultSimilarity)");
+    }
+    final TFIDFSimilarity similarity = (TFIDFSimilarity) sim;
 
     return new FloatDocValues(this) {
       DocsEnum docs ;

Modified: lucene/dev/branches/solr2452/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/CHANGES.txt?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/CHANGES.txt (original)
+++ lucene/dev/branches/solr2452/solr/CHANGES.txt Fri Jul  8 06:41:23 2011
@@ -302,6 +302,14 @@ Bug Fixes
 
 * SOLR-2636: Fix explain functionality for negative queries. (Tom Hill via yonik)
 
+* SOLR-2538: Range Faceting on long/double fields could overflow if values 
+  bigger then the max int/float were used.
+  (Erbi Hanka, hossman)
+
+* SOLR-2230: CommonsHttpSolrServer.addFile could not be used to send 
+  multiple files in a single request.
+  (Stephan Günther, hossman)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/branches/solr2452/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/build.xml Fri Jul  8 06:41:23 2011
@@ -1,5 +1,4 @@
-<!-- Solr build file -->
-
+<?xml version="1.0"?>
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
@@ -16,161 +15,472 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<project name="solr-core" default="usage">
+<project name="solr" default="usage">
   <description>Solr</description>
-
-  <property name="src.dir" location="src/java"/>
-
-  <!-- solr uses this as the test working directory: nocommit classpath -->
-  <property name="tests.userdir" value="src/test-files"/>
-
-  <path id="additional.dependencies">
-  	<fileset dir="lib" includes="**/*.jar"/>
-  	<fileset dir="example/lib" includes="**/*.jar"/>
-  </path>
-
-  <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-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-contrib, compile-spatial, 
-        compile-grouping, compile-queries, 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="${javadoc.dir}/solrj"/>
-      <invoke-javadoc
-        destdir="${javadoc.dir}/solrj"
-        title="${Name}-j ${version} API (${specversion})">
-        <sources>
-          <packageset dir="src/common"/>
-          <packageset dir="src/solrj"/>
-        </sources>
-      </invoke-javadoc>
-    </sequential>
-  </target>
-
-  <target name="javadocs-test-framework" depends="compile-test-framework"
-          description="Generates javadoc documentation for the Solr test-framework.">
-    <sequential>
-      <mkdir dir="${build.javadoc}/test-framework"/>
-      <path id="javadoc.classpath">
-        <path refid="test.classpath"/> <!-- nocommit switch to testframework.compile.classpath -->
-      </path>
-      <invoke-javadoc
-        destdir="${javadoc.dir}/test-framework"
-        title="${Name} ${version} Test Framework API (${specversion})">
-        <sources>
-          <packageset dir="src/test-framework" />
-        </sources>
-      </invoke-javadoc>
-    </sequential>
-  </target>
-
-  <!-- Default target: usage.  Prints out instructions. -->
-  <target name="usage"
-          description="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="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 javadocs' to build javadocs 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>
-
-  <!-- TODO: lucene/solr could share these -->
-  <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="javadocs-contrib" description="Generate javadocs for contrib classes"
-  	      depends="build-contrib">
-    <contrib-crawl target="javadocs" failonerror="true"/>
+  
+  <import file="common-build.xml"/>
+  
+  <!-- ========================================================================= -->
+  <!-- ============================== USER TASKS =============================== -->
+  <!-- ========================================================================= -->
+ 
+  <target name="example" description="Creates a runnable example configuration."
+          depends="prep-lucene-jars,dist-contrib,dist-war,build-contrib">
+    <copy file="${dist}/${fullnamever}.war"
+          tofile="${example}/webapps/${ant.project.name}.war"/>
+    <jar destfile="${example}/exampledocs/post.jar"
+         basedir="${dest}/solr-core/classes/java"
+         includes="org/apache/solr/util/SimplePostTool*.class">
+      <manifest>
+        <attribute name="Main-Class" value="org.apache.solr.util.SimplePostTool"/>
+      </manifest>
+    </jar>
+    <delete includeemptydirs="true">
+      <fileset dir="${example}/work" includes="**/*"/>
+    </delete>
+    <echo>See ${example}/README.txt for how to run the Solr example configuration.</echo>
+  </target>
+ 
+  <target name="run-example" depends="example"
+          description="Run Solr interactively, via Jetty.  -Dexample.debug=true to enable JVM debugger">
+    <property name="example.solr.home" location="example/solr"/>
+    <property name="example.data.dir" location="example/solr/data"/>
+    <property name="example.debug.suspend" value="n"/>
+    <property name="example.jetty.port" value="8983"/>
+    <condition property="example.jvm.line" value="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${example.debug.suspend},address=5005">
+      <isset property="example.debug"/>
+    </condition>
+    <property name="example.jvm.line" value=""/>
+    <property name="example.heap.size" value="512M"/>
+    <java jar="${example}/start.jar" fork="true" dir="${example}" maxmemory="${example.heap.size}">
+      <jvmarg line="${example.jvm.line}"/>
+      <sysproperty key="solr.solr.home" file="${example.solr.home}"/>
+      <sysproperty key="solr.data.dir" file="${example.data.dir}"/>
+      <sysproperty key="jetty.port" value="${example.jetty.port}"/>
+    </java>
+  </target>
+ 
+  <!-- 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>
+ 
+  <property  name="luke.version" value="1.0.1"/>
+  <available file="luke/luke-${luke.version}.jar" property="luke.jar.exists" />
+  <target name="luke-download" unless="luke.jar.exists" depends="proxy.setup,compile-xml-query-parser">
+    <mkdir dir="luke"/>
+    <get src="http://luke.googlecode.com/files/luke-${luke.version}.jar"
+         dest="luke/luke-${luke.version}.jar"/>
+  </target>
+  <path id="luke.classpath">
+    <pathelement location="${common.dir}/build/classes/java" />
+    <pathelement location="${common.dir}/build/contrib/xml-query-parser/classes/java" />
+  </path>
+  <target name="luke" depends="luke-download">
+    <java fork="true"
+          classname="org.getopt.luke.Luke"
+          logError="true"
+          failonerror="true">
+      <classpath>
+        <fileset dir="luke">
+          <include name="luke-${luke.version}.jar"/>
+        </fileset>
+        <path refid="classpath"/>
+        <path refid="luke.classpath"/>
+        <path refid="test.classpath"/>
+      </classpath>
+    </java>
+  </target>
+  
+  <!-- ========================================================================= -->
+  <!-- ========================== BUILD/TEST TASKS ============================= -->
+  <!-- ========================================================================= -->
+  
+  <target name="compile" description="Compile the source code."
+          depends="compile-core, build-contrib"/>
+  <target name="test" description="Validate, then run core, solrj, and contrib unit tests."
+          depends="validate-solr, test-core, test-jsp, test-contrib"/>
+  <target name="test-core" description="Runs the core and solrj unit tests."
+          depends="test-solr-core, test-solrj"/>
+  <target name="compile-test" description="Compile unit tests."
+          depends="compile-solr-test-framework, compile-test-solr-core, compile-test-solrj"/>
+  <target name="javadocs" description="Calls javadocs-all" depends="javadocs-all"/>
+  <target name="compile-core" depends="compile-solr-core" unless="solr.core.compiled"/>
+  
+  <!-- Solr core targets -->
+  <target name="test-solr-core" description="Test solr core">
+    <ant dir="core" target="test" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  
+  <!-- Solrj targets -->
+  <target name="test-solrj" description="Test java client">
+    <ant dir="solrj" target="test" inheritAll="false"/>
   </target>
-
+  
+  <!-- Solr contrib targets -->
   <target name="test-contrib" description="Run contrib unit tests."
-  	      depends="build-contrib">
+          depends="build-contrib">
     <contrib-crawl target="test" failonerror="true"/>
   </target>
-
-  <target name="compile-analyzers-common" unless="analyzers-common.uptodate">
-  	<ant dir="${common.dir}/../modules/analysis/common" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-analyzers-phonetic" unless="analyzers-phonetic.uptodate">
-  	<ant dir="${common.dir}/../modules/analysis/phonetic" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-suggest" unless="suggest.uptodate">
-  	<ant dir="${common.dir}/../modules/suggest" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-grouping" unless="grouping.uptodate">
-  	<ant dir="${common.dir}/../modules/grouping" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-queries" unless="queries.uptodate">
-  	<ant dir="${common.dir}/../modules/queries" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-highlighter" unless="highlighter.uptodate">
-  	<ant dir="${common.dir}/contrib/highlighter" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-memory" unless="memory.uptodate">
-  	<ant dir="${common.dir}/contrib/memory" target="default" inheritAll="false"/>
-  </target>
-  <target name="compile-misc" unless="misc.uptodate">
-  	<ant dir="${common.dir}/contrib/misc" target="default" inheritAll="false"/>
+  
+  <!-- Webapp targets -->
+  <target name="test-jsp">
+    <ant dir="webapp" target="test" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  
+  <!-- Clean targets -->
+  <target name="clean" description="Cleans compiled files and other temporary artifacts.">
+    <delete dir="build" />
+    <delete dir="dist" />
+    <delete dir="package" />
+    <delete dir="example/solr/lib" />
+  </target>
+  
+  <target name="clean-dest"
+          description="Cleans out build/ but leaves build/docs/, dist/ and package/ alone.  This allows us to run nightly and clover together in Hudson">
+    <delete includeemptydirs="true" >
+      <fileset dir="build">
+        <exclude name="docs/"/>
+      </fileset>
+    </delete>
+  </target>
+  
+  <!-- ========================================================================= -->
+  <!-- ===================== DISTRIBUTION-RELATED TASKS ======================== -->
+  <!-- ========================================================================= -->
+ 
+  <target name="copy-to-stage">
+    <copy-to-stage-macro artifacts.dir="${package.dir}"/>
+  </target>
+  
+  <target name="dist"
+          description="Creates the Solr distribution files."
+          depends="dist-solrj, dist-core, dist-test-framework, dist-contrib, dist-war" />
+ 
+  <target name="dist-test-framework" depends="init-dist"
+          description="Creates the Solr test-framework JAR.">
+    <ant dir="test-framework" target="dist" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  
+  <target name="dist-contrib" depends="init-dist"
+          description="Make the contribs ready for distribution">
+    <contrib-crawl target="dist" failonerror="true" />
+  </target>
+  
+  <target name="dist-war"
+          description="Creates the Solr WAR Distribution file.">
+    <ant dir="webapp" target="dist" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+  
+  <target name="prepare-release"
+          depends="clean, package, generate-maven-artifacts, sign-artifacts"/>
+ 
+  <!-- make a distribution -->
+  <target name="package" depends="package-src-tgz,create-package"/>
+ 
+  <!-- Makes a tarball from running "svn export" at the root level.    -->
+  <!-- Copies NOTICE.txt and LICENSE.txt from solr/ to the root level. -->
+  <target name="package-src-tgz" depends="init-dist"
+          description="Packages the Solr Source Distribution">
+    <property name="source.package.file"
+              value="${package.dir}/${fullnamever}-src.tgz"/>
+    <delete file="${source.package.file}" failonerror="false" />
+    <svn-export-source source.dir=".."/>
+    <tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
+      <tarfileset dir="${svn.export.dir}"
+                  prefix="${fullnamever}"
+                  excludes="example/**/*.sh example/**/bin/"/>
+      <tarfileset dir="${svn.export.dir}"
+                  prefix="${fullnamever}"
+                  filemode="755"
+                  includes="example/**/*.sh example/**/bin/"/>
+      <tarfileset dir="${svn.export.dir}/solr" prefix="${fullnamever}"
+                  includes="NOTICE.txt,LICENSE.txt"/>
+    </tar>
+    <make-checksums file="${source.package.file}"/>
+  </target>
+  
+  <target name="create-package"
+          description="Packages the Solr Binary Distribution"
+          depends="init-dist, dist, example, javadocs">
+    <mkdir dir="${dest}/${fullnamever}"/>
+    <delete includeemptydirs="true">
+      <fileset dir="${example}/work" includes="**/*"/>
+      <fileset dir="${dest}/${fullnamever}" includes="**/*"/>
+    </delete>
+ 
+    <delete file="${package.dir}/${fullnamever}.tgz" failonerror="false" />
+    <delete file="${package.dir}/${fullnamever}.zip" failonerror="false" />
+ 
+    <mkdir dir="${dest}/contrib-lucene-libs-to-package"/>
+    <delete dir="${dest}/contrib-lucene-libs-to-package" includes="**/*"/>
+    <contrib-crawl target="add-lucene-libs-to-package"/>
+ 
+    <tar destfile="${package.dir}/${fullnamever}.tgz" compression="gzip" longfile="gnu">
+      <tarfileset dir="."
+                  prefix="${fullnamever}"
+                  includes="LICENSE.txt NOTICE.txt CHANGES.txt README.txt example/**
+                             client/README.txt client/ruby/solr-ruby/** contrib/**/lib/**
+                             contrib/**/README.txt contrib/**/CHANGES.txt"
+                  excludes="lib/README.committers.txt **/data/ **/logs/* **/classes/ **/*.sh
+                             **/bin/ **/*.iml **/*.ipr **/*.iws **/pom.xml **/*pom.xml.template" />
+      <tarfileset dir="${dest}/contrib-lucene-libs-to-package"
+                  prefix="${fullnamever}"
+                  includes="**" />
+      <tarfileset dir="."
+                  filemode="755"
+                  prefix="${fullnamever}"
+                  includes="example/**/*.sh example/**/bin/" />
+      <tarfileset dir="."
+                  prefix="${fullnamever}"
+                  includes="dist/*.jar dist/*.war dist/solrj-lib/*"
+                  excludes="**/*.tgz **/*.zip **/*.md5 **/*src*.jar **/*docs*.jar" />
+      <tarfileset dir="${dest}/docs"
+                  prefix="${fullnamever}/docs" />
+    </tar>
+    <make-checksums file="${package.dir}/${fullnamever}.tgz"/>
+ 
+    <untar compression="gzip" src="${package.dir}/${fullnamever}.tgz" dest="${dest}"/>
+ 
+    <!--
+        This is a list of text file patterns to convert to CRLF line-ending style.
+        Shell scripts and files included in shell scripts should not be converted.
+        NB: The line-ending conversion process will mangle non-UTF8-encoded files.
+       -->
+    <fixcrlf srcdir="${dest}/${fullnamever}"
+             encoding="UTF-8"
+             eol="crlf"
+             includes="**/*.alg **/*.cfg **/*.cgi **/*.cpp **/*.css **/*.csv **/*.dtd
+                        **/*.erb **/*.fcgi **/.htaccess **/*.htm **/*.html **/*.incl
+                        **/*.java **/*.javacc **/*.jflex **/*.jflex-macro **/*.jj
+                        **/*.js **/*.json **/*.jsp **/*LICENSE **/package-list **/*.pl
+                        **/*.pom **/*pom.xml.template **/*.properties **/*.py
+                        **/*.rake **/Rakefile **/*.rb **/*.rbbi **/README* **/*.rhtml
+                        **/*.rslp **/*.rxml **/*.script **/*.svg **/*.tsv **/*.txt
+                        **/UPGRADING **/USAGE **/*.uxf **/*.vm **/*.xcat **/*.xml
+                        **/*.xsl **/*.xslt **/*.yml"
+             excludes="**/stopwordsWrongEncoding.txt **/gb18030-example.xml"
+        />
+ 
+    <zip destfile="${package.dir}/${fullnamever}.zip">
+      <zipfileset dir="${dest}/${fullnamever}"
+                  prefix="${fullnamever}"
+                  excludes="**/*.sh **/bin/ src/scripts/" />
+      <zipfileset dir="${dest}/${fullnamever}"
+                  prefix="${fullnamever}"
+                  includes="**/*.sh **/bin/ src/scripts/"
+                  filemode="755" />
+    </zip>
+    <make-checksums file="${package.dir}/${fullnamever}.zip"/>
+  </target>
+ 
+  <target name="sign-artifacts">
+    <sign-artifacts-macro artifacts.dir="${package.dir}"/>
+  </target>
+ 
+  <target name="javadocs-dep">
+    <copy failonerror="false" todir="${dest}/docs">
+      <fileset dir="${common-solr.dir}/site" />
+    </copy>
+  </target>
+ 
+  <target name="javadocs-all" depends="compile,javadocs-dep"
+          description="Generate javadoc for core, java client and contrib">
+    <sequential>
+      <mkdir dir="${dest}/docs/api"/>
+ 
+      <path id="javadoc.classpath">
+        <path refid="classpath"/>
+        <fileset dir="${dest}/contrib">
+          <include name="**/lucene-libs/**/*.jar"/>
+        </fileset>
+        <fileset dir="contrib">
+          <include name="**/lib/**/*.jar"/>
+          <exclude name="**/analysis-extras/lib/**/*icu4j*.jar"/> <!-- extraction/lib/ has this one -->
+        </fileset>
+        <pathelement location="${dest}/solr-solrj/classes/java"/>
+      </path>
+ 
+      <invoke-javadoc destdir="${dest}/docs/api"
+                      overview="core/src/java/overview.html">
+        <sources>
+          <packageset dir="core/src/java" />
+          <packageset dir="solrj/src/java" />
+          <packageset dir="contrib/analysis-extras/src/java"/>
+          <packageset dir="contrib/clustering/src/java"/>
+          <packageset dir="contrib/dataimporthandler/src/java"/>
+          <packageset dir="contrib/dataimporthandler-extras/src/java"/>
+          <packageset dir="contrib/extraction/src/java"/>
+          <packageset dir="contrib/uima/src/java"/>
+          <group title="Core" packages="org.apache.*" />
+          <group title="SolrJ" packages="org.apache.solr.common.*,org.apache.solr.client.solrj*" />
+          <group title="contrib: Clustering" packages="org.apache.solr.handler.clustering*" />
+          <group title="contrib: DataImportHandler" packages="org.apache.solr.handler.dataimport*" />
+          <group title="contrib: Solr Cell" packages="org.apache.solr.handler.extraction*" />
+          <group title="contrib: Solr UIMA" packages="org.apache.solr.uima*" />
+        </sources>
+      </invoke-javadoc>
+    </sequential>
   </target>
-  <target name="compile-queries-contrib" unless="queries-contrib.uptodate">
-  	<ant dir="${common.dir}/contrib/queries" target="default" inheritAll="false"/>
+ 
+  <target name="generate-maven-artifacts">
+    <taskdef uri="antlib:org.apache.maven.artifact.ant"
+             resource="org/apache/maven/artifact/ant/antlib.xml"
+             classpathref="maven-ant-tasks.classpath" />
+    <sequential>
+      <ant target="get-maven-poms" dir=".." inheritall="false"/>
+      <m2-deploy pom.xml="pom.xml"/> <!-- Solr parent POM -->
+      <subant target="dist-maven" inheritall="false" >
+        <fileset dir="core" includes="build.xml"/>
+        <fileset dir="solrj" includes="build.xml"/>
+        <fileset dir="test-framework" includes="build.xml"/>
+        <fileset dir="webapp" includes="build.xml"/>
+      </subant>
+      <contrib-crawl target="dist-maven"/>
+    </sequential>
   </target>
-  <target name="compile-spatial" unless="spatial.uptodate">
-  	<ant dir="${common.dir}/contrib/spatial" target="default" inheritAll="false"/>
+ 
+ 
+  <!-- ========================================================================= -->
+  <!-- ========================= COMMITTERS' HELPERS =========================== -->
+  <!-- ========================================================================= -->
+ 
+  <target name="stub-factories" depends="dist-core,lucene-jars-to-solr"
+          description="Generates stub factories as needed">
+ 
+    <path id="stub.jars">
+      <!-- this needs to be a list of all jars that might contain
+            classes we want to build factories for
+         -->
+      <fileset dir="${lucene-libs}">
+        <include name="*.jar"/>
+      </fileset>
+      <fileset dir="${dist}">
+        <include name="*.jar"/>
+        <exclude name="*solrj*.jar"/>
+      </fileset>
+    </path>
+    <pathconvert property="jar.list" pathsep=" " refid="stub.jars" />
+    <path id="missing.factories.classpath">
+      <pathelement path="${common.dir}/contrib/queries/lib/jakarta-regexp-1.4.jar"/>
+      <path refid="test.classpath"/>
+    </path>
+    <property name="stub.list" value="${dest}/need-stub-factories.txt" />
+    <java fork="false"
+          classname="org.apache.solr.util.SuggestMissingFactories"
+          logError="true"
+          failonerror="true"
+          classpathref="missing.factories.classpath"
+          output="${stub.list}">
+      <arg line="${jar.list}" />
+    </java>
+    <fail unless="stub.src.path">...
+ 
+      This task requires that the property 'stub.src.path' be set.
+ 
+      It must contain a "path" listing directories containing source
+      files that this task should use when looking for classes that
+      need factories created, the format is platform specific --
+      typically it is  colon seperated in Unix, semi-colon seperated
+      on windows, ie:
+ 
+      ant stub-factories -Dstub.src.path="core/src:../lucene/contrib:../lucene/src/java:../modules/analysis"
+ 
+      FYI: The file ${stub.list} contains a list of classes
+      that seem to need stub factories. (if java files can be found to
+      use as guides for creating them).
+    </fail>
+ 
+    <pathconvert pathsep=" " property="stub.src.dirs">
+      <path>
+        <pathelement path="${stub.src.path}"/>
+      </path>
+    </pathconvert>
+    <exec executable="perl"
+          dir="core/src/java/org/apache/solr/analysis/"
+          failonerror="true">
+      <arg value="${common-solr.dir}/dev-tools/stub-analysis-factory-maker.pl"/>
+      <redirector input="${stub.list}">
+        <!-- place to put special case classes we want to ignore -->
+        <inputfilterchain>
+          <linecontainsregexp negate="true">
+            <!-- only for internal Solr highlighting purposes -->
+            <regexp pattern="TokenOrderingFilter"/>
+          </linecontainsregexp>
+          <linecontainsregexp negate="true">
+            <!-- no way to leverage this in Solr -->
+            <regexp pattern="CachingTokenFilter"/>
+          </linecontainsregexp>
+          <linecontainsregexp negate="true">
+            <!-- no way to leverage this in Solr -->
+            <regexp pattern="HyphenationCompoundWordTokenFilter"/>
+          </linecontainsregexp>
+          <linecontainsregexp negate="true">
+            <!-- no way to leverage these in Solr (yet) -->
+            <regexp pattern="Sink|Tee"/>
+          </linecontainsregexp>
+          <linecontainsregexp negate="true">
+            <!-- Solr already has a different impl for this -->
+            <regexp pattern="SynonymTokenFilter"/>
+          </linecontainsregexp>
+          <linecontainsregexp negate="true">
+            <!-- solr and lucene both have one? ? ? ? -->
+            <regexp pattern="LengthFilter"/>
+          </linecontainsregexp>
+          <linecontainsregexp negate="true">
+            <!-- solr provides it's own SnowballPorterFilter variant -->
+            <regexp pattern="SnowballFilter"/>
+          </linecontainsregexp>
+        </inputfilterchain>
+      </redirector>
+      <arg line="${stub.src.dirs}"/>
+    </exec>
+  </target>
+ 
+  <target name="build-site" depends="svn-up"
+          description="Committers' Helper: build the site and copy to site/.">
+    <delete dir="site-src/build"/>
+    <exec executable="forrest" dir="site-src"/>
+    <copy todir="site">
+      <fileset dir="site-src/build/site"/>
+    </copy>
+    <antcall target="svn-up"/>
+  </target>
+  
+  <target name="svn-up">
+    <exec executable="${svn.exe}">
+      <arg value="update"/>
+    </exec>
   </target>
-
 </project>

Modified: lucene/dev/branches/solr2452/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/common-build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/common-build.xml (original)
+++ lucene/dev/branches/solr2452/solr/common-build.xml Fri Jul  8 06:41:23 2011
@@ -25,18 +25,27 @@
   
   <property name="Name" value="Solr" />
   <property name="version" value="4.0-SNAPSHOT"/>
-  <property name="final.name" value="apache-${name}-${version}"/>
-
+  <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"/>
-
-  <!-- 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://download.oracle.com/javase/6/docs/api/"/>
+  
+  <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"/>
 
   <path id="additional.dependencies">
   	<fileset dir="${common-solr.dir}/lib" includes="**/*.jar"/>
@@ -46,12 +55,17 @@
 
   <pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies"/>
 
-  <property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>
+  <import file="${common-solr.dir}/../lucene/contrib/contrib-build.xml"/>
 
-  <property name="tests.threadspercpu" value="2"/>
+  <!-- Solr Specification Version
+
+       This will be used in the Manifest file, and therefore must
+       match the pattern "digit+{.digit+}*"
 
-  <import file="../lucene/contrib/contrib-build.xml"/>
-  <property name="tests.directory" value="random" />
+       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="solr.spec.version" value="4.0.0.${dateversion}" />
 
   <!-- solr depends on the following modules/contribs -->	
   <module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"
@@ -70,6 +84,63 @@
   <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-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}"/>
@@ -81,36 +152,22 @@
   	<pathelement path="${suggest.jar}"/>
     <pathelement path="${grouping.jar}"/>
     <pathelement path="${queries.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"/>
+    <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>
 
   <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="${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"/>
 
-  <!-- TODO: lucene and solr should share this macro -->
-  <macrodef name="contrib-crawl">
-    <attribute name="target" default=""/>
-    <attribute name="failonerror" default="true"/>
-    <sequential>
-      <subant target="@{target}" failonerror="@{failonerror}">
-        <property name="core.compiled" value="true"/>
-        <property name="solr.core.compiled" value="true"/>
-        <fileset dir="." includes="contrib/*/build.xml"/>
-      </subant>
-    </sequential>
-  </macrodef>
-
   <macrodef name="solr-contrib-uptodate">
     <attribute name="name"/>
     <attribute name="property" default="@{name}.uptodate"/>
@@ -139,40 +196,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/dataimporthandler-extras/lib" />
+      <arg value="${common-solr.dir}/contrib/dataimporthandler-extras/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/extraction/lib" />
+      <arg value="${common-solr.dir}/contrib/extraction/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/contrib/uima/lib" />
+      <arg value="${common-solr.dir}/contrib/uima/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/example/example-DIH/solr/db/lib" />
+      <arg value="${common-solr.dir}/example/example-DIH/solr/db/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/example/example-DIH/solr/mail/lib" />
+      <arg value="${common-solr.dir}/example/example-DIH/solr/mail/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/example/example/lib" />
+      <arg value="${common-solr.dir}/example/example/lib" />
       <arg value="-c" />
-      <arg value="${basedir}/src/test-files/solr/lib" />
+      <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="test" depends="compile-test,validate-solr,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>
-  
+  <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">
+    <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="${common-module.jar}" />
+      <fileset file="${queries.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/solr2452/solr/contrib/analysis-extras/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/analysis-extras/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/analysis-extras/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/analysis-extras/build.xml Fri Jul  8 06:41:23 2011
@@ -23,10 +23,6 @@
     Additional analysis components
   </description>
 
-  <property name="src.dir" location="src/java"/>
-  <property name="tests.src.dir" location="src/test"/>
-  <property name="tests.userdir" location="src/test-files"/>
-
   <import file="../contrib-build.xml"/>
 
   <module-uptodate name="analysis/icu" jarfile="${common.dir}/../modules/analysis/build/icu/lucene-analyzers-icu-${version}.jar"
@@ -44,16 +40,32 @@
   </path>
 
   <target name="compile-analyzers-icu" unless="analyzers-icu.uptodate">
-  	<ant dir="${common.dir}/../modules/analysis/icu" target="default" inheritAll="false"/>
+  	<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"/>
+  	<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"/>
+  	<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="compile-core" depends="compile-analyzers-icu, compile-analyzers-smartcn, compile-analyzers-stempel, solr-contrib-build.compile-core"/>
+  <target name="compile-core" depends="module-jars-to-solr, solr-contrib-build.compile-core"/>
 </project>

Added: lucene/dev/branches/solr2452/solr/contrib/analysis-extras/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/analysis-extras/src/java/overview.html?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/analysis-extras/src/java/overview.html (added)
+++ lucene/dev/branches/solr2452/solr/contrib/analysis-extras/src/java/overview.html Fri Jul  8 06:41:23 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: Analysis Extras contrib
+</body>
+</html>

Modified: lucene/dev/branches/solr2452/solr/contrib/clustering/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/clustering/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/clustering/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/clustering/build.xml Fri Jul  8 06:41:23 2011
@@ -23,9 +23,5 @@
     Clustering Integraton
   </description>
 
-  <property name="src.dir" location="src/java"/>
-  <property name="tests.src.dir" location="src/test"/>
-  <property name="tests.userdir" location="src/test-files"/>
-
   <import file="../contrib-build.xml"/>
 </project>

Added: lucene/dev/branches/solr2452/solr/contrib/clustering/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/clustering/src/java/overview.html?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/clustering/src/java/overview.html (added)
+++ lucene/dev/branches/solr2452/solr/contrib/clustering/src/java/overview.html Fri Jul  8 06:41:23 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: Clustering contrib
+</body>
+</html>

Modified: lucene/dev/branches/solr2452/solr/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/contrib-build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/contrib-build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/contrib-build.xml Fri Jul  8 06:41:23 2011
@@ -18,21 +18,40 @@
  -->
 
 <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"/>
-  	
+  <dirname file="${ant.file.solr-contrib-build}" property="solr-contrib.dir"/>
+  <property name="build.dir" location="${solr-contrib.dir}/../build/contrib/${ant.project.name}"/>
+
   <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 -->
+    <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="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 --> 
+  <!-- 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"/>
-  
+
+  <dirname file="${ant.file}" property="antfile.dir"/>
+
+  <available property="contrib.has.webapp" type="dir" file="${antfile.dir}/src/webapp" />
+  <target name="add-to-war" if="contrib.has.webapp">
+    <copy todir="${dest}/web" failonerror="false">
+      <fileset dir="${antfile.dir}/src/webapp"/>
+    </copy>
+  </target>
+
+  <available property="contrib.has.lucene-libs" type="dir" file="${build.dir}/lucene-libs"/>
+  <target name="add-lucene-libs-to-package" if="contrib.has.lucene-libs">
+    <pathconvert property="contrib.dir">
+      <path path="${antfile.dir}"/>
+      <flattenmapper/>
+    </pathconvert>
+    <copy todir="${dest}/contrib-lucene-libs-to-package/contrib/${contrib.dir}">
+      <fileset dir="${build.dir}" includes="lucene-libs/**"/>
+    </copy>
+  </target>
 </project>

Modified: lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/build.xml Fri Jul  8 06:41:23 2011
@@ -23,10 +23,6 @@
     Data Import Handler Extras
   </description>
   
-  <property name="src.dir" location="src/java"/>
-  <property name="tests.src.dir" location="src/test"/>
-  <property name="tests.userdir" location="src/test-files"/>
-
   <import file="../contrib-build.xml"/>
 
   <solr-contrib-uptodate name="dataimporthandler" 
@@ -34,7 +30,9 @@
                          classpath.property="solr-dataimporthandler.jar"/>
 
   <target name="compile-solr-dataimporthandler" unless="solr-dataimporthandler.uptodate">
-  	<ant dir="${common-solr.dir}/contrib/dataimporthandler" target="default" inheritAll="false"/>
+  	<ant dir="${common-solr.dir}/contrib/dataimporthandler" target="default" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
   </target>
 
   <!-- 
@@ -42,7 +40,9 @@
        we should probably fix this, the same issue exists in modules
    -->
   <target name="compile-solr-dataimporthandler-tests">
-  	<ant dir="${common-solr.dir}/contrib/dataimporthandler" target="compile-test" inheritAll="false"/>
+  	<ant dir="${common-solr.dir}/contrib/dataimporthandler" target="compile-test" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
   </target>
 
   <path id="classpath">

Added: lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/src/java/overview.html?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/src/java/overview.html (added)
+++ lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/src/java/overview.html Fri Jul  8 06:41:23 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: DataImportHandler Extras contrib
+</body>
+</html>

Modified: lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/build.xml Fri Jul  8 06:41:23 2011
@@ -23,10 +23,6 @@
     Data Import Handler
   </description>
 
-  <property name="src.dir" location="src/java"/>
-  <property name="tests.src.dir" location="src/test"/>
-  <property name="tests.userdir" location="src/test-files"/>
-
   <import file="../contrib-build.xml"/>
-  
+
 </project>

Modified: lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FieldStreamDataSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FieldStreamDataSource.java?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FieldStreamDataSource.java (original)
+++ lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FieldStreamDataSource.java Fri Jul  8 06:41:23 2011
@@ -40,7 +40,7 @@ import static org.apache.solr.handler.da
  * <p/>
  * The fieldname must be resolvable from {@link VariableResolver}
  * <p/>
- * This may be used with any {@link EntityProcessor} which uses a {@link DataSource}&lt;{@link InputStream}&gt; eg: {@link TikaEntityProcessor}
+ * This may be used with any {@link EntityProcessor} which uses a {@link DataSource}&lt;{@link InputStream}&gt; eg: TikaEntityProcessor
  * <p/>
  *
  * @since 3.1

Added: lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/overview.html?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/overview.html (added)
+++ lucene/dev/branches/solr2452/solr/contrib/dataimporthandler/src/java/overview.html Fri Jul  8 06:41:23 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: DataImportHandler contrib
+</body>
+</html>

Modified: lucene/dev/branches/solr2452/solr/contrib/extraction/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/extraction/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/extraction/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/extraction/build.xml Fri Jul  8 06:41:23 2011
@@ -23,10 +23,6 @@
     Solr Integration with Tika for extracting content from binary file formats such as Microsoft Word and Adobe PDF.
   </description>
 
-  <property name="src.dir" location="src/java"/>
-  <property name="tests.src.dir" location="src/test"/>
-  <property name="tests.userdir" location="src/test-files"/>
-
   <import file="../contrib-build.xml"/>
 
 </project>

Added: lucene/dev/branches/solr2452/solr/contrib/extraction/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/extraction/src/java/overview.html?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/extraction/src/java/overview.html (added)
+++ lucene/dev/branches/solr2452/solr/contrib/extraction/src/java/overview.html Fri Jul  8 06:41:23 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: Solr Cell contrib
+</body>
+</html>

Modified: lucene/dev/branches/solr2452/solr/contrib/uima/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/uima/build.xml?rev=1144174&r1=1144173&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/uima/build.xml (original)
+++ lucene/dev/branches/solr2452/solr/contrib/uima/build.xml Fri Jul  8 06:41:23 2011
@@ -23,10 +23,22 @@
     Solr Integration with UIMA for extracting metadata from arbitrary (text) fields and enrich document with features extracted from UIMA types (language, sentences, concepts, named entities, etc.)
   </description>
 
-  <property name="src.dir" location="src/java"/>
-  <property name="tests.src.dir" location="src/test"/>
-  <property name="tests.userdir" location="src/test-files"/>
-
   <import file="../contrib-build.xml"/>
 
+  <dirname file="${ant.file}" property="antfile.dir"/>
+
+  <target name="dist-maven" depends="contrib-build.dist-maven">
+    <m2-deploy-with-pom-template pom.xml="${antfile.dir}/lib/solr-uima-an-alchemy-pom.xml.template"
+                                 jar.file="${antfile.dir}/lib/uima-an-alchemy-2.3.1-SNAPSHOT-r1062868.jar" />
+
+    <m2-deploy-with-pom-template pom.xml="${antfile.dir}/lib/solr-uima-an-calais-pom.xml.template"
+                                 jar.file="${antfile.dir}/lib/uima-an-calais-2.3.1-SNAPSHOT-r1062868.jar" />
+
+    <m2-deploy-with-pom-template pom.xml="${antfile.dir}/lib/solr-uima-an-tagger-pom.xml.template"
+                                 jar.file="${antfile.dir}/lib/uima-an-tagger-2.3.1-SNAPSHOT-r1062868.jar" />
+
+    <m2-deploy-with-pom-template pom.xml="${antfile.dir}/lib/solr-uima-an-wst-pom.xml.template"
+                                 jar.file="${antfile.dir}/lib/uima-an-wst-2.3.1-SNAPSHOT-r1076132.jar" />
+
+  </target>
 </project>

Added: lucene/dev/branches/solr2452/solr/contrib/uima/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/uima/src/java/overview.html?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/uima/src/java/overview.html (added)
+++ lucene/dev/branches/solr2452/solr/contrib/uima/src/java/overview.html Fri Jul  8 06:41:23 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: Solr UIMA contrib
+</body>
+</html>

Added: lucene/dev/branches/solr2452/solr/core/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/build.xml?rev=1144174&view=auto
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/build.xml (added)
+++ lucene/dev/branches/solr2452/solr/core/build.xml Fri Jul  8 06:41:23 2011
@@ -0,0 +1,39 @@
+<?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-core" default="default">
+  <description>Solr Core</description>
+
+  <import file="../common-build.xml"/>
+
+  <target name="compile-core" unless="solr.core.compiled"
+          depends="prep-lucene-jars, compile-solrj, common.compile-core">
+    <property name="solr.core.compiled" value="true"/>
+  </target>
+
+  <target name="compile-test" depends="compile-solr-test-framework,common.compile-test"/>
+
+  <target name="test" depends="compile-test,junit-mkdir,junit-sequential,junit-parallel"/>
+
+  <target name="dist-maven" depends="jar-core,javadocs,jar-src,contrib-build.dist-maven">
+    <m2-deploy-with-pom-template pom.xml="${common-solr.dir}/lib/solr-commons-csv-pom.xml.template"
+                                 jar.file="${common-solr.dir}/lib/commons-csv-1.0-SNAPSHOT-r966014.jar" />
+
+    <m2-deploy-with-pom-template pom.xml="${common-solr.dir}/lib/apache-solr-noggit-pom.xml.template"
+                                 jar.file="${common-solr.dir}/lib/apache-solr-noggit-r1099557.jar" />
+  </target>
+</project>
\ No newline at end of file

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java Fri Jul  8 06:41:23 2011
@@ -89,7 +89,6 @@ public abstract class AnalysisRequestHan
       TokenStream tokenStream = null;
       try {
         tokenStream = analyzer.reusableTokenStream(context.getFieldName(), new StringReader(value));
-        tokenStream.reset();
       } catch (IOException e) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
       }

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java Fri Jul  8 06:41:23 2011
@@ -1,4 +1,20 @@
 package org.apache.solr.handler.component;
+/**
+ * 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.
+ */
 
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrResponse;

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java Fri Jul  8 06:41:23 2011
@@ -1,4 +1,20 @@
 package org.apache.solr.handler.component;
+/**
+ * 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.
+ */
 
 import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
 import org.apache.commons.httpclient.HttpClient;
@@ -18,11 +34,7 @@ import java.util.concurrent.SynchronousQ
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
-/**
- * @author noble.paul@teamaol.com (noblep01)
- *         Date: 6/21/11
- *         Time: 12:14 PM
- */
+
 public class HttpShardHandlerFactory extends ShardHandlerFactory implements PluginInfoInitialized{
   protected static Logger log = LoggerFactory.getLogger(HttpShardHandlerFactory.class);
 

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandler.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandler.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandler.java Fri Jul  8 06:41:23 2011
@@ -1,4 +1,20 @@
 package org.apache.solr.handler.component;
+/**
+ * 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.
+ */
 
 
 import org.apache.solr.common.params.ModifiableSolrParams;

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java Fri Jul  8 06:41:23 2011
@@ -1,4 +1,20 @@
 package org.apache.solr.handler.component;
+/**
+ * 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.
+ */
 
 
 public abstract class ShardHandlerFactory {

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java Fri Jul  8 06:41:23 2011
@@ -454,8 +454,6 @@ public class DefaultSolrHighlighter exte
       
       Highlighter highlighter;
       if (Boolean.valueOf(req.getParams().get(HighlightParams.USE_PHRASE_HIGHLIGHTER, "true"))) {
-        // TODO: this is not always necessary - eventually we would like to avoid this wrap
-        //       when it is not needed.
         if (maxCharsToAnalyze < 0) {
           tstream = new CachingTokenFilter(tstream);
         } else {

Modified: lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/request/SimpleFacets.java?rev=1144174&r1=1143703&r2=1144174&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/request/SimpleFacets.java (original)
+++ lucene/dev/branches/solr2452/solr/core/src/java/org/apache/solr/request/SimpleFacets.java Fri Jul  8 06:41:23 2011
@@ -1317,7 +1317,7 @@ public class SimpleFacets {
     }
     @Override
     public Double parseAndAddGap(Double value, String gap) {
-      return new Double(value.floatValue() + Double.valueOf(gap).floatValue());
+      return new Double(value.doubleValue() + Double.valueOf(gap).doubleValue());
     }
   }
   private static class IntegerRangeEndpointCalculator 
@@ -1343,7 +1343,7 @@ public class SimpleFacets {
     }
     @Override
     public Long parseAndAddGap(Long value, String gap) {
-      return new Long(value.intValue() + Long.valueOf(gap).intValue());
+      return new Long(value.longValue() + Long.valueOf(gap).longValue());
     }
   }
   private static class DateRangeEndpointCalculator 



Mime
View raw message