You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2012/03/30 15:21:29 UTC

svn commit: r1307402 - in /lucene/dev/branches/lucene3930: build.xml lucene/build.xml modules/analysis/build.xml modules/build.xml solr/build.xml

Author: rmuir
Date: Fri Mar 30 13:21:28 2012
New Revision: 1307402

URL: http://svn.apache.org/viewvc?rev=1307402&view=rev
Log:
LUCENE-3930: add recursive resolve tasks (depended on by IDE configs, javadocs-all)

Modified:
    lucene/dev/branches/lucene3930/build.xml
    lucene/dev/branches/lucene3930/lucene/build.xml
    lucene/dev/branches/lucene3930/modules/analysis/build.xml
    lucene/dev/branches/lucene3930/modules/build.xml
    lucene/dev/branches/lucene3930/solr/build.xml

Modified: lucene/dev/branches/lucene3930/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/build.xml?rev=1307402&r1=1307401&r2=1307402&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/build.xml (original)
+++ lucene/dev/branches/lucene3930/build.xml Fri Mar 30 13:21:28 2012
@@ -46,6 +46,14 @@
       </subant></sequential>
   </target>
 
+  <target name="resolve" description="Resolves all dependencies">
+    <sequential><subant target="resolve" inheritall="false" failonerror="true">
+        <fileset dir="lucene" includes="build.xml" />
+        <fileset dir="modules" includes="build.xml" />
+        <fileset dir="solr" includes="build.xml" />
+      </subant></sequential>
+  </target>
+
   <target name="compile" description="Compile Lucene and Solr">
     <sequential>
 
@@ -83,7 +91,7 @@
     </sequential>
   </target>
 
-  <target name="eclipse" description="Setup Eclipse configuration">
+  <target name="eclipse" description="Setup Eclipse configuration" depends="resolve">
     <copy file="dev-tools/eclipse/dot.project" tofile=".project" overwrite="false"/>
     <copy file="dev-tools/eclipse/dot.classpath" tofile=".classpath" overwrite="true"/>
     <mkdir dir=".settings"/>
@@ -96,7 +104,7 @@
     </echo>
   </target>
 
-  <target name="idea" description="Setup IntelliJ IDEA configuration">
+  <target name="idea" description="Setup IntelliJ IDEA configuration" depends="resolve">
     <copy todir=".">
       <fileset dir="dev-tools/idea"/>
     </copy>

Modified: lucene/dev/branches/lucene3930/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/lucene/build.xml?rev=1307402&r1=1307401&r2=1307402&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/lucene/build.xml (original)
+++ lucene/dev/branches/lucene3930/lucene/build.xml Fri Mar 30 13:21:28 2012
@@ -190,6 +190,15 @@
     </copy>
   </target>
 
+  <target name="resolve">
+    <sequential>
+      <ant dir="test-framework" target="resolve" inheritall="false">
+         <propertyset refid="uptodate.and.compiled.properties"/>
+      </ant>
+      <contrib-crawl target="resolve" failonerror="true"/>
+    </sequential>
+  </target>
+
   <target name="javadoc" depends="javadocs"/>
   <target name="javadocs" description="Generate javadoc" 
           depends="javadocs-all, javadocs-core, javadocs-contrib, javadocs-test-framework">
@@ -227,12 +236,8 @@
                    failonerror="false"/>
   </target>
 
-  <!-- called by javadocs-all, just forcing dependencies to be in lib/ for javadocs -->
-  <target name="contrib-init">
-    <contrib-crawl target="init" failonerror="true"/>
-  </target>
-  	
-  <target name="javadocs-all" depends="contrib-init,jar-analyzers-common,jar-queryparser,jar-queries" 
+  <!-- call resolve to force dependencies to be in lib/ for javadocs -->
+  <target name="javadocs-all" depends="resolve,jar-analyzers-common,jar-queryparser,jar-queries" 
           description="Generate javadoc for core and contrib classes">
   	<sequential>
       <mkdir dir="${javadoc.dir}/all"/>

Modified: lucene/dev/branches/lucene3930/modules/analysis/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/modules/analysis/build.xml?rev=1307402&r1=1307401&r2=1307402&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/modules/analysis/build.xml (original)
+++ lucene/dev/branches/lucene3930/modules/analysis/build.xml Fri Mar 30 13:21:28 2012
@@ -30,6 +30,23 @@
       - uima: UIMA Analysis module
   </description>
 
+  <dirname file="${ant.file.analyzers}" property="analyzers.dir"/>
+
+  <macrodef name="forall-analyzers">
+    <attribute name="target" />
+    <sequential>
+      <subant target="@{target}" inheritall="false" failonerror="true">
+         <propertyset refid="uptodate.and.compiled.properties"/>
+        <fileset dir="${analyzers.dir}" includes="*/build.xml" />
+      </subant>
+    </sequential>
+  </macrodef>
+
+  <propertyset id="uptodate.and.compiled.properties" dynamic="true">
+    <propertyref regex=".*\.uptodate$$"/>
+    <propertyref regex=".*\.compiled$$"/>
+  </propertyset>
+
   <target name="common">
     <ant dir="common" />
   </target>
@@ -68,89 +85,36 @@
    <!-- FIXME: these should crawl like contrib-crawl/modules-crawl, passing the 
         propset so we dont install maven-ant-tasks over and over -->
   <target name="clean">
-    <ant dir="common" target="clean" />
-    <ant dir="icu" target="clean" />
-    <ant dir="kuromoji" target="clean"/>
-    <ant dir="morfologik" target="clean" />
-    <ant dir="phonetic" target="clean" />
-    <ant dir="smartcn" target="clean" />
-    <ant dir="stempel" target="clean" />
-    <ant dir="uima" target="clean" />
+    <forall-analyzers target="clean"/>
+  </target>
+  <target name="resolve">
+    <forall-analyzers target="resolve"/>
   </target>
   <target name="validate">
-    <ant dir="common" target="validate" />
-    <ant dir="icu" target="validate" />
-    <ant dir="kuromoji" target="validate" />
-    <ant dir="morfologik" target="validate" />
-    <ant dir="phonetic" target="validate" />
-    <ant dir="smartcn" target="validate" />
-    <ant dir="stempel" target="validate" />
-    <ant dir="uima" target="validate" />
+    <forall-analyzers target="validate"/>
   </target>
   <target name="compile-core">
-    <ant dir="common" target="compile-core" />
-    <ant dir="icu" target="compile-core" />
-    <ant dir="kuromoji" target="compile-core" />
-    <ant dir="morfologik" target="compile-core" />
-    <ant dir="phonetic" target="compile-core" />
-    <ant dir="smartcn" target="compile-core" />
-    <ant dir="stempel" target="compile-core" />
-    <ant dir="uima" target="compile-core" />
+    <forall-analyzers target="compile-core"/>
   </target>
   <target name="compile-test">
-    <ant dir="common" target="compile-test" />
-    <ant dir="icu" target="compile-test" />
-    <ant dir="kuromoji" target="compile-test" />
-    <ant dir="morfologik" target="compile-test" />
-    <ant dir="phonetic" target="compile-test" />
-    <ant dir="smartcn" target="compile-test" />
-    <ant dir="stempel" target="compile-test" />
-    <ant dir="uima" target="compile-test" />
+    <forall-analyzers target="compile-test"/>
   </target>
   <target name="test">
-    <ant dir="common" target="test" />
-    <ant dir="icu" target="test" />
-    <ant dir="kuromoji" target="test" />
-    <ant dir="morfologik" target="test" />
-    <ant dir="phonetic" target="test" />
-    <ant dir="smartcn" target="test" />
-    <ant dir="stempel" target="test" />
-    <ant dir="uima" target="test" />
+    <forall-analyzers target="test"/>
   </target>
 
   <target name="build-artifacts-and-tests" depends="default,compile-test" />
 
   <target name="dist-maven" depends="default,javadocs">
-    <ant dir="common" target="dist-maven" />
-    <ant dir="icu" target="dist-maven" />
-    <ant dir="kuromoji" target="dist-maven" />
-    <ant dir="morfologik" target="dist-maven" />
-    <ant dir="phonetic" target="dist-maven" />
-    <ant dir="smartcn" target="dist-maven" />
-    <ant dir="stempel" target="dist-maven" />
-    <ant dir="uima" target="dist-maven" />
+    <forall-analyzers target="dist-maven"/>
   </target>  	
 
   <target name="javadocs">
-    <ant dir="common" target="javadocs" />
-    <ant dir="icu" target="javadocs" />
-    <ant dir="kuromoji" target="javadocs" />
-    <ant dir="morfologik" target="javadocs" />
-    <ant dir="phonetic" target="javadocs" />
-    <ant dir="smartcn" target="javadocs" />
-    <ant dir="stempel" target="javadocs" />
-    <ant dir="uima" target="javadocs" />
+    <forall-analyzers target="javadocs"/>
   </target>  	
 
   <target name="javadocs-index.html">
-    <ant dir="common" target="javadocs-index.html" />
-    <ant dir="icu" target="javadocs-index.html" />
-    <ant dir="kuromoji" target="javadocs-index.html" />
-    <ant dir="morfologik" target="javadocs-index.html" />
-    <ant dir="phonetic" target="javadocs-index.html" />
-    <ant dir="smartcn" target="javadocs-index.html" />
-    <ant dir="stempel" target="javadocs-index.html" />
-    <ant dir="uima" target="javadocs-index.html" />
+    <forall-analyzers target="javadocs-index.html"/>
   </target>
 	
 </project>

Modified: lucene/dev/branches/lucene3930/modules/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/modules/build.xml?rev=1307402&r1=1307401&r2=1307402&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/modules/build.xml (original)
+++ lucene/dev/branches/lucene3930/modules/build.xml Fri Mar 30 13:21:28 2012
@@ -45,6 +45,10 @@
     <forall-modules target="compile" />
   </target>
 
+  <target name="resolve">
+    <forall-modules target="resolve"/>
+  </target>
+
   <target name="compile-test" description="Compile all tests">
     <forall-modules target="compile-test" />
   </target>

Modified: lucene/dev/branches/lucene3930/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/build.xml?rev=1307402&r1=1307401&r2=1307402&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/build.xml (original)
+++ lucene/dev/branches/lucene3930/solr/build.xml Fri Mar 30 13:21:28 2012
@@ -462,13 +462,27 @@
     <!-- NOOP -->
   </target>
 
+  <target name="resolve" depends="resolve-example,resolve-jetty">
+     <sequential>
+     <ant dir="core" target="resolve" inheritall="false">
+         <propertyset refid="uptodate.and.compiled.properties"/>
+      </ant>
+     <ant dir="solrj" target="resolve" inheritall="false">
+         <propertyset refid="uptodate.and.compiled.properties"/>
+      </ant>
+     <ant dir="test-framework" target="resolve" inheritall="false">
+         <propertyset refid="uptodate.and.compiled.properties"/>
+      </ant>
+     <contrib-crawl target="resolve"/>
+    </sequential>
+  </target>
+
+  <!-- since we build across all contribs, we must ensure all deps
+       are resolved -->
   <target name="javadocs-all"
-          depends="prep-lucene-jars,javadocs-dep,define-lucene-javadoc-url"
+          depends="resolve,prep-lucene-jars,javadocs-dep,define-lucene-javadoc-url"
           description="Generate javadoc for core, java client and contrib">
     <sequential>
-      <!-- since we build across all contribs, we must ensure all deps
-           are resolved -->
-      <contrib-crawl target="resolve" failonerror="true"/>
       <mkdir dir="${dest}/docs/api"/>
  
       <!-- TODO: optimize this, thats stupid here: -->