THRIFT-971 java module can't be compiled without ivy and network connection
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1028075 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/build.xml b/lib/java/build.xml
index 9dfc6c8..7c66438 100644
--- a/lib/java/build.xml
+++ b/lib/java/build.xml
@@ -122,7 +122,18 @@
<ivy:cachepath pathid="ivy.test.classpath" conf="test" />
</target>
- <target name="compile" depends="init,resolve">
+ <target name="resolve-offline" depends="ivy-init-antlib" description="retrieve dependencies with ivy" if="noivy">
+ <path id="ivy.compile.classpath">
+ <fileset dir="${ivy.lib.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+ <path id="ivy.test.classpath">
+ <!-- same as ivy.compile.classpath, but has to be defined -->
+ </path>
+ </target>
+
+ <target name="compile" depends="init,resolve,resolve-offline">
<javac srcdir="${src}" destdir="${build}" source="1.5" target="1.5" debug="true" classpathref="compile.classpath" />
</target>