lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1419368 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/CHANGES.txt lucene/common-build.xml
Date Mon, 10 Dec 2012 12:22:27 GMT
Author: rmuir
Date: Mon Dec 10 12:22:26 2012
New Revision: 1419368

URL: http://svn.apache.org/viewvc?rev=1419368&view=rev
Log:
LUCENE-4601: fix ivy availability check to use typefound

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/common-build.xml   (contents, props changed)

Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1419368&r1=1419367&r2=1419368&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Mon Dec 10 12:22:26 2012
@@ -305,6 +305,9 @@ Build
 * LUCENE-4589: Upgraded benchmark module's Nekohtml dependency to version
   1.9.17, removing the workaround in Lucene's HTML parser for the
   Turkish locale.  (Uwe Schindler)
+
+* LUCENE-4601: Fix ivy availability check to use typefound, so it works
+  if called from another build file.  (Ryan Ernst via Robert Muir)
   
   
 ======================= Lucene 4.0.0 =======================

Modified: lucene/dev/branches/branch_4x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/common-build.xml?rev=1419368&r1=1419367&r2=1419368&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/common-build.xml Mon Dec 10 12:22:26 2012
@@ -59,8 +59,6 @@
   <property name="common.classpath.excludes" value="**/*.txt,**/*.template,**/*.sha1"
/>
 
   <property name="ivy.bootstrap.version" value="2.2.0" />
-  <property name="ivy.resource" value="org/apache/ivy/ant/antlib.xml" />
-  <available resource="${ivy.resource}" property="ivy.available" />
   <property name="ivy.default.configuration" value="*"/>
   <property name="ivy.sync" value="true"/>
 
@@ -313,7 +311,7 @@
     <!-- <property name="ivy.settings.uptodate" value="true"/> -->
   </target>
 
-  <target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
+  <target name="resolve" depends="ivy-availability-check,ivy-configure">
     <!-- todo, make this a property or something. 
          only special cases need bundles -->
     <ivy:retrieve type="jar,bundle" log="download-only" 
@@ -327,6 +325,13 @@
   <property name="ivy_checksum_sha1" value="f9d1e83e82fc085093510f7d2e77d81d52bc2081"/>
 
   <target name="ivy-availability-check" unless="ivy.available">
+    <condition property="ivy.available">
+      <typefound uri="antlib:org.apache.ivy.ant" name="configure" />
+    </condition>
+    <antcall target="ivy-fail" />
+  </target>
+
+  <target name="ivy-fail" unless="ivy.available">
    <echo>
      This build requires Ivy and Ivy could not be found in your ant classpath.
 
@@ -360,10 +365,9 @@
      ant config to allow the user lib to be loaded.  See the wiki for more details:
        http://wiki.apache.org/lucene-java/HowToContribute#antivy
     </echo>
-  </target>
-  <target name="ivy-fail" unless="ivy.available">
     <fail>Ivy is not available</fail>
   </target>
+
   <target name="ivy-bootstrap" description="Download and install Ivy in the users ant
lib dir" depends="ivy-bootstrap1,ivy-bootstrap2,ivy-checksum"/>
 
   <!-- try to download from repo1.maven.org -->
@@ -1280,7 +1284,7 @@ ${tests-output}/junit4-*.suites     - pe
   	<fail message="You must redefine the javadocs task to do something!!!!!"/>
   </target>
 
-  <target name="install-maven-tasks" unless="maven-tasks.uptodate" depends="ivy-availability-check,ivy-fail,ivy-configure">
+  <target name="install-maven-tasks" unless="maven-tasks.uptodate" depends="ivy-availability-check,ivy-configure">
     <property name="maven-tasks.uptodate" value="true"/>
     <ivy:cachepath organisation="org.apache.maven" module="maven-ant-tasks" revision="2.1.3"
              inline="true" conf="master" type="jar" pathid="maven-ant-tasks.classpath"/>
@@ -1538,7 +1542,7 @@ ${tests-output}/junit4-*.suites     - pe
     </ecj-macro>
   </target>
   
-  <target name="-ecj-resolve" unless="ecj.loaded" depends="ivy-availability-check,ivy-fail,ivy-configure">
+  <target name="-ecj-resolve" unless="ecj.loaded" depends="ivy-availability-check,ivy-configure">
     <ivy:cachepath organisation="org.eclipse.jdt.core.compiler" module="ecj" revision="3.7.2"
      inline="true" conf="master" type="jar" pathid="ecj.classpath" />
     <componentdef classname="org.eclipse.jdt.core.JDTCompilerAdapter"
@@ -1871,7 +1875,7 @@ ${tests-output}/junit4-*.suites     - pe
   </macrodef>
   
   <!-- GROOVY scripting engine for ANT tasks -->
-  <target name="resolve-groovy" unless="groovy.loaded" depends="ivy-availability-check,ivy-fail,ivy-configure">
+  <target name="resolve-groovy" unless="groovy.loaded" depends="ivy-availability-check,ivy-configure">
     <ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.0.4"
       inline="true" conf="default" type="jar" transitive="true" pathid="groovy.classpath"/>
     <property name="groovy.loaded" value="true"/>
@@ -1879,7 +1883,7 @@ ${tests-output}/junit4-*.suites     - pe
   
   <!-- PEGDOWN macro: Before using depend on the target "resolve-pegdown" -->
   
-  <target name="resolve-pegdown" unless="pegdown.loaded" depends="ivy-availability-check,ivy-fail,ivy-configure">
+  <target name="resolve-pegdown" unless="pegdown.loaded" depends="ivy-availability-check,ivy-configure">
     <ivy:cachepath organisation="org.pegdown" module="pegdown" revision="1.2.1"
       inline="true" conf="default" type="jar" transitive="true" pathid="pegdown.classpath"/>
     <property name="pegdown.loaded" value="true"/>



Mime
View raw message