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/04/27 03:01:05 UTC
svn commit: r1331164 - in /lucene/dev/trunk: lucene/common-build.xml
lucene/ivy-settings.xml lucene/misc/build.xml
lucene/test-framework/ivysettings.xml solr/example/build.xml
Author: rmuir
Date: Fri Apr 27 01:01:04 2012
New Revision: 1331164
URL: http://svn.apache.org/viewvc?rev=1331164&view=rev
Log:
LUCENE-3892: revert the revert: configure fallbacks so that ivy downloads work from china
Added:
lucene/dev/trunk/lucene/ivy-settings.xml
- copied unchanged from r1331033, lucene/dev/trunk/lucene/ivy-settings.xml
Removed:
lucene/dev/trunk/lucene/test-framework/ivysettings.xml
Modified:
lucene/dev/trunk/lucene/common-build.xml
lucene/dev/trunk/lucene/misc/build.xml
lucene/dev/trunk/solr/example/build.xml
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1331164&r1=1331163&r2=1331164&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Fri Apr 27 01:01:04 2012
@@ -267,12 +267,24 @@
<!-- currently empty -->
</target>
- <target name="resolve" depends="ivy-availability-check,ivy-fail">
+ <target name="ivy-configure" unless="ivy.settings.uptodate">
+ <!-- override: just for safety, should be unnecessary -->
+ <ivy:configure file="${common.dir}/ivy-settings.xml" override="true"/>
+ <property name="ivy.settings.uptodate" value="true"/>
+ </target>
+
+ <target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
<!-- todo, make this a property or something.
only special cases need bundles -->
<ivy:retrieve type="jar,bundle" log="download-only"/>
</target>
+ <property name="ivy_install_path" location="${user.home}/.ant/lib" />
+ <property name="ivy_bootstrap_url1" value="http://repo1.maven.org/maven2"/>
+ <!-- you might need to tweak this from china so it works -->
+ <property name="ivy_bootstrap_url2" value="http://mirror.netcologne.de/maven2"/>
+ <property name="ivy_checksum_sha1" value="f9d1e83e82fc085093510f7d2e77d81d52bc2081"/>
+
<target name="ivy-availability-check" unless="ivy.available">
<echo>
This build requires Ivy and Ivy could not be found in your ant classpath.
@@ -311,13 +323,40 @@
<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">
- <property name="ivy_install_path" location="${user.home}/.ant/lib" />
- <mkdir dir="${ivy_install_path}"/>
- <echo message="installing ivy ${ivy.bootstrap.version} to ${ivy_install_path}"/>
- <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.bootstrap.version}/ivy-${ivy.bootstrap.version}.jar"
- dest="${ivy_install_path}/ivy-${ivy.bootstrap.version}.jar" usetimestamp="true"/>
+ <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 -->
+ <target name="ivy-bootstrap1">
+ <ivy-download src="${ivy_bootstrap_url1}" dest="${ivy_install_path}"/>
+ <available file="${ivy_install_path}/ivy-${ivy.bootstrap.version}.jar" property="ivy.bootstrap1.success" />
+ </target>
+
+ <target name="ivy-bootstrap2" unless="ivy.bootstrap1.success">
+ <ivy-download src="${ivy_bootstrap_url2}" dest="${ivy_install_path}"/>
+ </target>
+
+ <target name="ivy-checksum">
+ <checksum file="${ivy_install_path}/ivy-${ivy.bootstrap.version}.jar"
+ property="${ivy_checksum_sha1}"
+ algorithm="SHA"
+ verifyproperty="ivy.checksum.success"/>
+ <fail message="Checksum mismatch for ivy-${ivy.bootstrap.version}.jar. Please download this file manually">
+ <condition>
+ <isfalse value="${ivy.checksum.success}"/>
+ </condition>
+ </fail>
</target>
+
+ <macrodef name="ivy-download">
+ <attribute name="src"/>
+ <attribute name="dest"/>
+ <sequential>
+ <mkdir dir="@{dest}"/>
+ <echo message="installing ivy ${ivy.bootstrap.version} to ${ivy_install_path}"/>
+ <get src="@{src}/org/apache/ivy/ivy/${ivy.bootstrap.version}/ivy-${ivy.bootstrap.version}.jar"
+ dest="@{dest}/ivy-${ivy.bootstrap.version}.jar" usetimestamp="true" ignoreerrors="true"/>
+ </sequential>
+ </macrodef>
<target name="jflex-uptodate-check">
<uptodate property="jflex.files.uptodate">
@@ -1057,7 +1096,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">
+ <target name="install-maven-tasks" unless="maven-tasks.uptodate" depends="ivy-availability-check,ivy-fail,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"/>
@@ -1509,7 +1548,7 @@ ${tests-output}/junit4-*.suites - pe
<!-- PEGDOWN macro: Before using depend on the target "resolve-pegdown" -->
- <target name="resolve-pegdown" unless="pegdown.loaded">
+ <target name="resolve-pegdown" unless="pegdown.loaded" depends="ivy-availability-check,ivy-fail,ivy-configure">
<ivy:cachepath organisation="org.pegdown" module="pegdown" revision="1.1.0"
inline="true" conf="default" type="jar" transitive="true" pathid="pegdown.classpath"/>
<property name="pegdown.loaded" value="true"/>
Modified: lucene/dev/trunk/lucene/misc/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/misc/build.xml?rev=1331164&r1=1331163&r2=1331164&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/misc/build.xml (original)
+++ lucene/dev/trunk/lucene/misc/build.xml Fri Apr 27 01:01:04 2012
@@ -27,7 +27,7 @@
<import file="../module-build.xml"/>
- <target name="install-cpptasks" unless="cpptasks.uptodate" depends="ivy-availability-check,ivy-fail">
+ <target name="install-cpptasks" unless="cpptasks.uptodate" depends="ivy-availability-check,ivy-fail,ivy-configure">
<property name="cpptasks.uptodate" value="true"/>
<ivy:cachepath organisation="ant-contrib" module="cpptasks" revision="1.0b5"
inline="true" conf="master" type="jar" pathid="cpptasks.classpath"/>
Modified: lucene/dev/trunk/solr/example/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/build.xml?rev=1331164&r1=1331163&r2=1331164&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/build.xml (original)
+++ lucene/dev/trunk/solr/example/build.xml Fri Apr 27 01:01:04 2012
@@ -33,7 +33,7 @@
<target name="compile-core"/>
<target name="compile-test"/>
- <target name="resolve" depends="ivy-availability-check">
+ <target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
<sequential>
<!-- jetty libs in lib/ -->
<ivy:retrieve conf="default" type="jar" log="download-only"/>