aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2009-10-09 20:59:11 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2009-10-09 20:59:11 +0000
commitf6a828b695ec13f0d9f04d560903629aba65f194 (patch)
tree6def9abded5da476b7934647032ee883edc0ce1e /build.xml
parent100d17a594efcbe9594acb6df6144e87284ab303 (diff)
downloadxmlgraphics-fop-f6a828b695ec13f0d9f04d560903629aba65f194.tar.gz
xmlgraphics-fop-f6a828b695ec13f0d9f04d560903629aba65f194.zip
If a JAI library is not available when creating a FOP distribution build we attempt to download one and make it available to the Ant build process.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@823685 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml16
1 files changed, 15 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 467e29192..0386f960e 100644
--- a/build.xml
+++ b/build.xml
@@ -1234,10 +1234,24 @@ NOTE:
<!-- Creates the distribution -->
<!-- =================================================================== -->
<target name="dist" depends="dist-prereq,dist-src,dist-bin" description="Generates the distribution package"/>
- <target name="dist-prereq" depends="init">
+ <target name="dist-prereq" depends="init,dist-get-jai">
<fail message="A complete binary build requires JAI" unless="jai.present"/>
<fail message="A complete binary build requires JCE" unless="jce.present"/>
</target>
+ <target name="dist-get-jai" description="Attempts to download the JAI library dependency" unless="jai.present">
+ <echo message="JAI Support NOT present - attempting to download... "/>
+ <get src="http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib.zip" dest="${java.io.tmpdir}/jai-1_1_3-lib.zip" verbose="true" />
+ <unzip src="${java.io.tmpdir}/jai-1_1_3-lib.zip" dest="${java.io.tmpdir}">
+ <patternset>
+ <include name="jai-1_1_3/lib/*"/>
+ </patternset>
+ </unzip>
+ <copy todir="${basedir}/lib" file="${java.io.tmpdir}/jai-1_1_3/lib/jai_core.jar" />
+ <copy todir="${basedir}/lib" file="${java.io.tmpdir}/jai-1_1_3/lib/jai_codec.jar" />
+ <delete dir="${java.io.tmpdir}/jai-1_1_3" />
+ <delete file="${java.io.tmpdir}/jai-1_1_3-lib.zip" />
+ <property name="jai.present" value="true"/>
+ </target>
<target name="dist-bin" depends="all,javadocs,docs">
<echo message="Building the binary distribution files (zip,tar)"/>
<mkdir dir="${dist.bin.result.dir}"/>