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/12/10 13:17:50 UTC
svn commit: r1419366 - in /lucene/dev/trunk/lucene: CHANGES.txt
common-build.xml
Author: rmuir
Date: Mon Dec 10 12:17:49 2012
New Revision: 1419366
URL: http://svn.apache.org/viewvc?rev=1419366&view=rev
Log:
LUCENE-4601: fix ivy availability check to use typefound
Modified:
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/common-build.xml
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1419366&r1=1419365&r2=1419366&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Mon Dec 10 12:17:49 2012
@@ -320,6 +320,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/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1419366&r1=1419365&r2=1419366&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Mon Dec 10 12:17:49 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"
@@ -1872,7 +1876,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"/>
@@ -1880,7 +1884,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"/>