Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
121 lines (95 sloc) 4.4 KB
<?xml version="1.0"?>
<!-- $Id: contrib.xml,v 1.3 2006/02/02 16:08:21 ctl Exp $ -->
<!--
Contrib builder
===============
The purpose of this build file is to fetch all required contrib stuff from
a reliable source. The main mechanism is the <wget> macro which has the
following attributes.
id: Unqiue id of the task. You must assign a unique id to the task
that Ant can use for property names.
target: name of target file that is fetched
href1,href2: Links to the package holding the target file. href1 is first tried,
then href2 if href1 fails. Note use of ${proto} prefix which allows us to
swap all URIs to e.g. point to the local file system (fast testing).
sha: sha1 hash that the target file must have after download. Used to
verify that we got the right file. We also check the hash before downloading
to see if perhaps the target is already up-to-date. Thus, if a hash is given,
we only download a file if necessary.
target.get: Name to store downloaded package in. Set to target is not
explicitly given. Use with unpack
unpack1,unpack2: Ant tasks to call to unpack the downloaded packages.
unpack1 is for href1, unpack2 for href2.
unpackdir: Passed as a propoert to unpacker; set to . if not given.
Used here for unpacking to a named subdir of ${src}
Source packages are handled by downloading the package to ${sarch},
checking its hash, and then unpacking to ${src}
-->
<project name="3dm-contrib" default="get-contrib" basedir=".">
<property name="lib" value="contrib/jar" />
<!-- Default soureforge mirror -->
<property name="sf-mirror" value="switch" />
<property name="sourceforge"
value="${sf-mirror}.dl.sourceforge.net/sourceforge" />
<import file="contrib-helper.xml" />
<target name="get-contrib" >
<mkdir dir="${lib}" />
<!--- XMLPull API -->
<wget id="xmlpull-api"
href1="http://repo1.maven.org/maven2/xmlpull/xmlpull/1.1.3.4a/xmlpull-1.1.3.4a.jar"
target="${lib}/xmlpull-1.1.3.4a.jar" />
<!-- junit -->
<wget id="junit"
href1="http://${sourceforge}/junit/junit3.8.1.zip"
target="${lib}/junit-3.8.1.jar"
target.get="${temp.file}"
unpack1="unpack-zip"
unpackloc1="junit3.8.1/junit.jar"
sha="99129f16442844f6a4a11ae22fbbee40b14d774f" />
<!--3dm.jar-->
<wget id="3dm"
href1="http://download.berlios.de/tdm/3dm-0.1.5Beta1.jar"
href2="http://hoslab.cs.helsinki.fi/downloads/fuego-core/contrib/3dm-0.1.5beta1.jar"
target="${lib}/3dm-0.1.5b1.jar"
sha="db50bfa18a16e8f8d8b8a7e34066d3d5427d234f" />
<!-- ########## Build System Jars ######## -->
<!-- Findbugs -->
<wget id="findbugs"
href1="http://${sourceforge}/findbugs/findbugs-0.9.4.tar.gz"
target="${lib}/findbugs-0.9.4.jar"
target.get="${temp.file}"
unpack1="unpack-findbugs-bin"
sha="574aad6cefe0a5076d86dcd61af4e48e09813cb3" />
<!-- dom4j (probably not used by anything but FindBugs) -->
<wget id="dom4j"
href1="http://${sourceforge}/findbugs/findbugs-0.9.4.tar.gz"
target="${lib}/findbugs-0.9.4-dom4j-full.jar"
target.get="${temp.file}"
unpack1="unpack-findbugs-bin"
sha="69e7812ed2309b4c3713d3961260cb9458ddd5a1" />
<!-- proguard -->
<wget id="proguard"
href1="http://${sourceforge}/proguard/proguard3.5.tar.gz"
target.get="${temp.file}"
target="${lib}/proguard-3.5.jar"
unpack1="unpack-tgz"
unpackloc1="proguard3.5/lib/proguard.jar"
sha="4b5a9ce786d00f53c9687fe0affb65a864cb6f3f" />
</target>
<target name="unpack-findbugs-bin" >
<mkdir dir="${temp.dir}" />
<untar src="${target.get}" dest="${temp.dir}" compression="gzip" />
<copy file="${temp.dir}/findbugs-0.9.4/lib/findbugs.jar"
tofile="${lib}/findbugs-0.9.4.jar" overwrite="true" />
<copy file="${temp.dir}/findbugs-0.9.4/lib/findbugs-ant.jar"
tofile="${lib}/findbugs-0.9.4-ant.jar" overwrite="true" />
<copy file="${temp.dir}/findbugs-0.9.4/lib/bcel.jar"
tofile="${lib}/findbugs-0.9.4-bcel.jar" overwrite="true" />
<copy file="${temp.dir}/findbugs-0.9.4/lib/dom4j-full.jar"
tofile="${lib}/findbugs-0.9.4-dom4j-full.jar" overwrite="true" />
<copy file="${temp.dir}/findbugs-0.9.4/plugin/coreplugin.jar"
tofile="${lib}/findbugs-0.9.4-coreplugin.jar" overwrite="true" />
<delete dir="${temp.dir}" />
<delete file="${target.get}" />
</target>
</project>