@@ -14,15 +14,15 @@
<description>
<description>
This build file downloads JAR files that optional Ant tasks use,
This build file downloads JAR files that optional Ant tasks use,
and installs them in a location that is accessible the next time Ant runs.
and installs them in a location that is accessible the next time Ant runs.
You can choose three locations, by going -Ddest=LOCATION on the command line
You can choose three locations, by going -Ddest=LOCATION on the command line
-Ddest=user user lib dir ${user.home}/.ant/lib
-Ddest=user user lib dir ${user.home}/.ant/lib
-Ddest=system ant lib dir ${ant.home}/lib --Default--
-Ddest=system ant lib dir ${ant.home}/lib --Default--
-Ddest=optional optional dir ${ant.home}/lib/optional (for Ant developers)
-Ddest=optional optional dir ${ant.home}/lib/optional (for Ant developers)
You may also need to set proxy settings. On Java1.5, Ant tries to get
You may also need to set proxy settings. On Java1.5, Ant tries to get
this from the OS, unless you use the -noproxy option.
this from the OS, unless you use the -noproxy option.
Proxies can be configured manually setting the JVM proxy values in the
Proxies can be configured manually setting the JVM proxy values in the
ANT_OPTS environment variable.
ANT_OPTS environment variable.
@@ -44,24 +44,24 @@
<property name="lib.dir" location="lib" />
<property name="lib.dir" location="lib" />
<property name="optional.dir" location="${lib.dir}/optional" />
<property name="optional.dir" location="${lib.dir}/optional" />
<property name="userlib.dir" location="${user.home}/.ant/lib" />
<property name="userlib.dir" location="${user.home}/.ant/lib" />
<!-- load in our properties table -->
<!-- load in our properties table -->
<property file="${lib.dir}/libraries.properties"/>
<property file="${lib.dir}/libraries.properties"/>
<target name="pick-dest">
<target name="pick-dest">
<condition property="dest.dir"
<condition property="dest.dir"
value="${lib.dir}">
value="${lib.dir}">
<or>
<or>
<equals arg1="${dest}" arg2="system" />
<equals arg1="${dest}" arg2="system" />
<not><isset property="dest"/></not>
<not><isset property="dest"/></not>
</or>
</or>
</condition>
</condition>
<condition property="dest.dir"
<condition property="dest.dir"
value="${optional.dir}">
value="${optional.dir}">
<equals arg1="${dest}" arg2="optional" />
<equals arg1="${dest}" arg2="optional" />
</condition>
</condition>
<condition property="dest.dir"
<condition property="dest.dir"
value="${userlib.dir}">
value="${userlib.dir}">
<equals arg1="${dest}" arg2="user" />
<equals arg1="${dest}" arg2="user" />
</condition>
</condition>
@@ -74,7 +74,7 @@
<echo>Downloading to ${dest.dir}</echo>
<echo>Downloading to ${dest.dir}</echo>
</target>
</target>
<target name="probe-m2" depends="pick-dest">
<target name="probe-m2" depends="pick-dest">
<!-- Look for M2 ant tasks in our classpath-->
<!-- Look for M2 ant tasks in our classpath-->
<property name="m2.artifact" location="${dest.dir}/${m2.jar.name}"/>
<property name="m2.artifact" location="${dest.dir}/${m2.jar.name}"/>
@@ -84,12 +84,12 @@
<typefound name="antlib:org.apache.maven.artifact.ant:artifact" />
<typefound name="antlib:org.apache.maven.artifact.ant:artifact" />
</condition>
</condition>
</target>
</target>
<target name="download-m2" depends="probe-m2,pick-dest" unless="m2.antlib.found">
<target name="download-m2" depends="probe-m2,pick-dest" unless="m2.antlib.found">
<!-- fetch M2 ant tasks into our repository, if it is not there-->
<!-- fetch M2 ant tasks into our repository, if it is not there-->
<get src="${m2.antlib.url}"
dest="${m2.artifact}"
<get src="${m2.antlib.url}"
dest="${m2.artifact}"
verbose="true"
verbose="true"
usetimestamp="false"/>
usetimestamp="false"/>
</target>
</target>
@@ -99,21 +99,21 @@
<property name="checksum.equal" value="true" />
<property name="checksum.equal" value="true" />
</target>
</target>
<target name="validate-m2-checksum"
<target name="validate-m2-checksum"
depends="download-m2,dont-validate-m2-checksum"
depends="download-m2,dont-validate-m2-checksum"
if="m2.sha1.checksum" unless="m2.antlib.found">
if="m2.sha1.checksum" unless="m2.antlib.found">
<checksum file="${m2.artifact}"
<checksum file="${m2.artifact}"
algorithm="SHA"
algorithm="SHA"
property="${m2.sha1.checksum}"
property="${m2.sha1.checksum}"
verifyProperty="checksum.equal"/>
verifyProperty="checksum.equal"/>
</target>
</target>
<target name="checksum-mismatch" depends="validate-m2-checksum"
<target name="checksum-mismatch" depends="validate-m2-checksum"
unless="checksum.equal" if="m2.sha1.checksum">
unless="checksum.equal" if="m2.sha1.checksum">
<delete file="${m2.artifact}"/>
<delete file="${m2.artifact}"/>
<fail >
<fail >
Failed to verify the downloaded file ${m2.antlib.url}" against the checksum
Failed to verify the downloaded file ${m2.antlib.url}" against the checksum
coded into libraries.properties.
coded into libraries.properties.
The local copy has been deleted, for security reasons
The local copy has been deleted, for security reasons
</fail>
</fail>
</target>
</target>
@@ -125,8 +125,8 @@
</fail>
</fail>
</target>
</target>
<target name="get-m2" depends="checksum-match"
description="Download the Maven2 Ant tasks"/>
<target name="get-m2" depends="checksum-match"
description="Download the Maven2 Ant tasks"/>
<target name="macros" depends="get-m2"
<target name="macros" depends="get-m2"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
@@ -146,83 +146,83 @@
<artifact:dependencies pathID="@{archive}.path">
<artifact:dependencies pathID="@{archive}.path">
<dependency groupID="@{project}"
<dependency groupID="@{project}"
artifactID="@{archive}"
artifactID="@{archive}"
version="${@{archive}.version}"/>
version="${@{archive}.version}"/>
</artifact:dependencies>
</artifact:dependencies>
<!-- now we are left with the problem of getting the files
<!-- now we are left with the problem of getting the files
into our directory -->
into our directory -->
<copypath destdir="${dest.dir}" pathref="@{archive}.path">
<copypath destdir="${dest.dir}" pathref="@{archive}.path">
<flattenmapper/>
<flattenmapper/>
</copypath>
</copypath>
</sequential>
</sequential>
</macrodef>
</macrodef>
</target>
</target>
<!-- any init stuff -->
<!-- any init stuff -->
<target name="init" depends="pick-dest,macros" >
<target name="init" depends="pick-dest,macros" >
</target>
</target>
<target name="diag" depends="init">
<target name="diag" depends="init">
<echoproperties />
<echoproperties />
</target>
</target>
<target name="logging"
<target name="logging"
description="load logging libraries"
description="load logging libraries"
depends="init">
depends="init">
<f2 project="log4j" />
<f2 project="log4j" />
<f2 project="commons-logging" archive="commons-logging-api" />
<f2 project="commons-logging" archive="commons-logging-api" />
</target>
</target>
<target name="junit"
<target name="junit"
description="load junit libraries"
description="load junit libraries"
depends="init">
depends="init">
<f2 project="junit" />
<f2 project="junit" />
</target>
</target>
<target name="xml"
<target name="xml"
description="load full XML libraries (xalan, resolver)"
description="load full XML libraries (xalan, resolver)"
depends="init">
depends="init">
<f2 project="xalan" />
<f2 project="xalan" />
<f2 project="xml-resolver" />
<f2 project="xml-resolver" />
</target>
</target>
<target name="networking"
<target name="networking"
description="load networking libraries (commons-net; jsch)"
description="load networking libraries (commons-net; jsch)"
depends="init">
depends="init">
<f2 project="commons-net" />
<f2 project="commons-net" />
<f2 project="jsch" />
<f2 project="jsch" />
</target>
</target>
<target name="regexp"
<target name="regexp"
description="load regexp libraries"
description="load regexp libraries"
depends="init">
depends="init">
<f2 project="regexp" />
<f2 project="regexp" />
<f2 project="oro" />
<f2 project="oro" />
</target>
<target name="antlr"
</target>
<target name="antlr"
description="load antlr libraries"
description="load antlr libraries"
depends="init">
depends="init">
<f2 project="antlr" />
<f2 project="antlr" />
</target>
</target>
<target name="bcel"
<target name="bcel"
description="load bcel libraries"
description="load bcel libraries"
depends="init">
depends="init">
<f2 project="bcel" />
<f2 project="bcel" />
</target>
</target>
<target name="jdepend"
<target name="jdepend"
description="load jdepend libraries"
description="load jdepend libraries"
depends="init">
depends="init">
<f2 project="jdepend" />
<f2 project="jdepend" />
</target>
</target>
<target name="bsf"
<target name="bsf"
description="load bsf libraries"
description="load bsf libraries"
depends="init">
depends="init">
<f2 project="bsf" />
<f2 project="bsf" />
@@ -232,8 +232,8 @@
description="load jruby"
description="load jruby"
depends="bsf">
depends="bsf">
<f2 project="org.jruby" archive="jruby"/>
<f2 project="org.jruby" archive="jruby"/>
</target>
</target>
<target name="beanshell"
<target name="beanshell"
description="load beanshell support"
description="load beanshell support"
depends="bsf">
depends="bsf">
@@ -251,14 +251,14 @@
description="load script languages"
description="load script languages"
depends="bsf,jruby,jython,beanshell"/>
depends="bsf,jruby,jython,beanshell"/>
<target name="debugging"
<target name="debugging"
description="internal ant debugging"
description="internal ant debugging"
depends="init">
depends="init">
<f2 project="which" />
<f2 project="which" />
</target>
</target>
<target name="all"
<target name="all"
description="load all the libraries"
description="load all the libraries"
depends="logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging" />
depends="logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging" />
</project>
</project>