You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2012/02/08 01:09:45 UTC

svn commit: r1241710 - in /lucene/dev/trunk/lucene: build.xml common-build.xml contrib/contrib-build.xml

Author: sarowe
Date: Wed Feb  8 00:09:44 2012
New Revision: 1241710

URL: http://svn.apache.org/viewvc?rev=1241710&view=rev
Log:
LUCENE-3753: 'ant package' in solr/ triggered a build failure as a result of a build dependency on target 'javadocs-all' in lucene/, because the basedir wasn't being reset by the <subant> calls to the modules to be built to satisfy javadoc links (queryparser, queries, and analyzers-common) - as a result, the first module's compile invocation thought it should put its output in lucene/build/classes/java/, which no longer exists.  The fix: switch javadocs-all to depend on the jar-* targets for the modules in question; these use <ant> instead of <subant>, which doesn't seem to have the same issue.

Modified:
    lucene/dev/trunk/lucene/build.xml
    lucene/dev/trunk/lucene/common-build.xml
    lucene/dev/trunk/lucene/contrib/contrib-build.xml

Modified: lucene/dev/trunk/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/build.xml?rev=1241710&r1=1241709&r2=1241710&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/build.xml (original)
+++ lucene/dev/trunk/lucene/build.xml Wed Feb  8 00:09:44 2012
@@ -192,17 +192,11 @@
                    failonerror="false"/>
   </target>
   	
-  <target name="javadocs-all" description="Generate javadoc for core and contrib classes">
+  <target name="javadocs-all" depends="jar-analyzers-common,jar-queryparser,jar-queries" 
+          description="Generate javadoc for core and contrib classes">
   	<sequential>
       <mkdir dir="${javadoc.dir}/all"/>
       
-      <!-- TODO: remove these dependencies: -->
-      <subant target="default">
-        <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>
-        <fileset dir="${common.dir}/../modules/analysis/common" includes="build.xml"/>
-        <fileset dir="${common.dir}/../modules/queries" includes="build.xml"/>
-      </subant>
-
       <path id="javadoc.classpath">
         <path refid="classpath"/>
         <pathelement location="${ant.home}/lib/ant.jar"/>
@@ -210,9 +204,9 @@
           <exclude name="build/**/*.jar"/>
           <include name="**/lib/*.jar"/>
         </fileset>
-        <pathelement location="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"/>
-        <pathelement location="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/>
-        <pathelement location="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"/>
+        <pathelement location="${analyzers-common.jar}"/>
+        <pathelement location="${queryparser.jar}"/>
+        <pathelement location="${queries.jar}"/>
       </path>
 
       <invoke-javadoc overview="${common.dir}/core/src/java/overview.html"

Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1241710&r1=1241709&r2=1241710&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Wed Feb  8 00:09:44 2012
@@ -456,6 +456,18 @@
     </sequential>
   </macrodef>
 
+  <macrodef name="module-uptodate">
+    <attribute name="name"/>
+    <attribute name="property"/>
+    <attribute name="jarfile"/>
+    <attribute name="module-src-name" default="@{name}"/>
+    <sequential>
+      <uptodate property="@{property}" targetfile="@{jarfile}">
+      	<srcfiles dir="${common.dir}/../modules/@{module-src-name}/src/java" includes="**/*.java"/>
+      </uptodate>
+    </sequential>
+  </macrodef>
+
   <property name="lucene-core.jar" value="${common.dir}/build/core/lucene-core-${version}.jar"/>
   <target name="check-lucene-core-uptodate" unless="lucene-core.uptodate">
     <uptodate property="lucene-core.uptodate" targetfile="${lucene-core.jar}">
@@ -468,13 +480,48 @@
     </ant>
     <property name="lucene-core.uptodate" value="true"/>
   </target>
+  
+  <property name="queryparser.jar" value="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/>
+  <target name="check-queryparser-uptodate" unless="queryparser.uptodate">
+    <module-uptodate name="queryparser" jarfile="${queryparser.jar}" property="queryparser.uptodate"/>
+  </target>
+  <target name="jar-queryparser" unless="queryparser.uptodate" depends="check-queryparser-uptodate">
+    <ant dir="${common.dir}/../modules/queryparser" target="jar-core" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="queryparser.uptodate" value="true"/>
+  </target>
+  
+  <property name="analyzers-common.jar" value="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"/>
+  <target name="check-analyzers-common-uptodate" unless="analyzers-common.uptodate">
+    <module-uptodate name="analysis/common" jarfile="${analyzers-common.jar}" property="analyzers-common.uptodate"/>
+  </target>
+  <target name="jar-analyzers-common" unless="analyzers-common.uptodate" depends="check-analyzers-common-uptodate">
+    <ant dir="${common.dir}/../modules/analysis/common" target="jar-core" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="analyzers-common.uptodate" value="true"/>
+  </target>
+
+  <property name="queries.jar" value="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"/>
+  <target name="check-queries-uptodate" unless="queries.uptodate">
+    <module-uptodate name="queries" jarfile="${queries.jar}" property="queries.uptodate"/>
+  </target>
+  <target name="jar-queries" unless="queries.uptodate" depends="check-queries-uptodate">
+  	<ant dir="${common.dir}/../modules/queries" target="jar-core" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="queries.uptodate" value="true"/>
+  </target>
+
+
   <target name="compile-lucene-core" unless="core.compiled">
     <ant dir="${common.dir}/core" target="compile-core" inheritAll="false">
       <propertyset refid="uptodate.and.compiled.properties"/>
     </ant>
     <property name="core.compiled" value="true"/>
   </target>
-  
+
   <target name="compile-test-framework" unless="lucene.test.framework.compiled">
     <ant dir="${common.dir}/test-framework" target="compile-core" inheritAll="false">
       <propertyset refid="uptodate.and.compiled.properties"/>

Modified: lucene/dev/trunk/lucene/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/contrib-build.xml?rev=1241710&r1=1241709&r2=1241710&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/contrib-build.xml (original)
+++ lucene/dev/trunk/lucene/contrib/contrib-build.xml Wed Feb  8 00:09:44 2012
@@ -96,29 +96,6 @@
     </sequential>
   </macrodef>
 
-  <macrodef name="module-uptodate">
-    <attribute name="name"/>
-    <attribute name="property"/>
-    <attribute name="jarfile"/>
-    <attribute name="module-src-name" default="@{name}"/>
-    <sequential>
-      <uptodate property="@{property}" targetfile="@{jarfile}">
-      	<srcfiles dir="${common.dir}/../modules/@{module-src-name}/src/java" includes="**/*.java"/>
-      </uptodate>
-    </sequential>
-  </macrodef>
-
-  <property name="analyzers-common.jar" value="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"/>
-  <target name="check-analyzers-common-uptodate" unless="analyzers-common.uptodate">
-    <module-uptodate name="analysis/common" jarfile="${analyzers-common.jar}" property="analyzers-common.uptodate"/>
-  </target>
-  <target name="jar-analyzers-common" unless="analyzers-common.uptodate" depends="check-analyzers-common-uptodate">
-    <ant dir="${common.dir}/../modules/analysis/common" target="jar-core" inheritall="false">
-      <propertyset refid="uptodate.and.compiled.properties"/>
-    </ant>
-    <property name="analyzers-common.uptodate" value="true"/>
-  </target>
-
   <property name="facet.jar" value="${common.dir}/../modules/facet/build/lucene-facet-${version}.jar"/>
   <target name="check-facet-uptodate" unless="facet.uptodate">
     <module-uptodate name="facet" jarfile="${facet.jar}" property="facet.uptodate"/>
@@ -229,28 +206,6 @@
     <property name="misc.uptodate" value="true"/>
   </target>
 
-  <property name="queries.jar" value="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"/>
-  <target name="check-queries-uptodate" unless="queries.uptodate">
-    <module-uptodate name="queries" jarfile="${queries.jar}" property="queries.uptodate"/>
-  </target>
-  <target name="jar-queries" unless="queries.uptodate" depends="check-queries-uptodate">
-  	<ant dir="${common.dir}/../modules/queries" target="jar-core" inheritAll="false">
-      <propertyset refid="uptodate.and.compiled.properties"/>
-    </ant>
-    <property name="queries.uptodate" value="true"/>
-  </target>
-
-  <property name="queryparser.jar" value="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/>
-  <target name="check-queryparser-uptodate" unless="queryparser.uptodate">
-    <module-uptodate name="queryparser" jarfile="${queryparser.jar}" property="queryparser.uptodate"/>
-  </target>
-  <target name="jar-queryparser" unless="queryparser.uptodate" depends="check-queryparser-uptodate">
-    <ant dir="${common.dir}/../modules/queryparser" target="jar-core" inheritall="false">
-      <propertyset refid="uptodate.and.compiled.properties"/>
-    </ant>
-    <property name="queryparser.uptodate" value="true"/>
-  </target>
-
   <property name="sandbox.jar" value="${common.dir}/build/contrib/sandbox/lucene-sandbox-${version}.jar"/>
   <target name="check-sandbox-uptodate" unless="sandbox.uptodate">
     <contrib-uptodate name="sandbox" jarfile="${sandbox.jar}" property="sandbox.uptodate"/>