Index: lucene/common-build.xml
===================================================================
--- lucene/common-build.xml	(revision 1307065)
+++ lucene/common-build.xml	(working copy)
@@ -53,6 +53,10 @@
   <property name="year" value="2000-${current.year}"/>
   <property name="final.name" value="lucene-${name}-${version}"/>
 
+  <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="junit.jar" value="junit-4.10.jar"/>
   <property name="junit-location.jar" value="${common.dir}/test-framework/lib/${junit.jar}"/>
   <path id="junit-path">
@@ -248,10 +252,50 @@
     <!-- currently empty -->
   </target>
 
-  <target name="resolve">
+  <target name="resolve" depends="ivy-availablity-check,ivy-fail">
     <ivy:retrieve type="jar,bundle" log="download-only"/>
   </target>
+  <target name="ivy-availablity-check" unless="ivy.available">
+   <echo>
+     This build requires Ivy and Ivy could not be found in your ant classpath
 
+     (Due to classpath issues and the recursive nature of the Lucene/Solr 
+     build system, a local copy of Ivy can not be used an loaded dynamicaly 
+     by the build.xml)
+
+     You can either manually install a copy of Ivy ${ivy.bootstrap.version} in your ant classpath:
+       http://ant.apache.org/manual/install.html#optionalTasks
+
+     Or this build file can do it for you by running the Ivy Bootstrap target:
+       ant ivy-bootstrap     
+     
+     Either way you will only have to install Ivy one time.
+
+     'ant ivy-bootstrap' will install a copy of Ivy into your Ant User Library:
+       ${user.home}/.ant/lib
+     
+     If you would prefer, you can have it installed into an alternative 
+     directory using the "-Divy_install_path=/some/path/you/choose" option, 
+     but you will have to specify this path every time you build Lucene/Solr 
+     in the future...
+       ant ivy-bootstrap -Divy_install_path=/some/path/you/choose
+       ...
+       ant -lib /some/path/you/choose clean compile
+       ...
+       ant -lib /some/path/you/choose clean compile
+    </echo>
+  </target>
+  <target name="ivy-fail" unless="ivy.available">
+    <fail>Ivy is not available</fail>
+  </target>
+  <target name="ivy-bootstrap">
+    <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>
+
   <target name="jflex-uptodate-check">
     <uptodate property="jflex.files.uptodate">
       <srcfiles dir="${src.dir}" includes="**/*.jflex" />
