74689cbcc0cebbd857a50b155293b82d7403df78al_xipe Licensed to the Apache Software Foundation (ASF) under one or more
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe contributor license agreements. See the NOTICE file distributed with
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe this work for additional information regarding copyright ownership.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe The ASF licenses this file to You under the Apache License, Version 2.0
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe (the "License"); you may not use this file except in compliance with
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe the License. You may obtain a copy of the License at
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe Unless required by applicable law or agreed to in writing, software
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe distributed under the License is distributed on an "AS IS" BASIS,
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe See the License for the specific language governing permissions and
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe limitations under the License.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe =======================================================================
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe Build file to fetch optional libraries for Apache Ant
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe =======================================================================
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe<description>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe This build file downloads JAR files that optional Ant tasks use,
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe and installs them in a location that is accessible the next time Ant runs.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe You can choose three locations, by going -Ddest=LOCATION on the command line
94d29a8848130741ed9e35078f6b814abac06fccmatthew -Ddest=system ant lib dir ${ant.home}/lib
94d29a8848130741ed9e35078f6b814abac06fccmatthew -Ddest=optional optional dir $${basedir}/lib/optional (for Ant developers)
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe You may also need to set proxy settings. On Java1.5, Ant tries to get
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe this from the OS, unless you use the -noproxy option.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe Proxies can be configured manually setting the JVM proxy values in the
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe ANT_OPTS environment variable.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe For example, to set the proxy up in the tcsh shell, the command would be
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe something like:
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe For Windows, set the environment variable in the appropriate dialog box
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe and open a new console. or, by hand
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe</description>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <!-- Give user a chance to override without editing this file
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe (and without typing -D each time it compiles it) -->
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <property name="optional.dir" location="${lib.dir}/optional" />
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <property name="userlib.dir" location="${user.home}/.ant/lib" />
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <!-- load in our properties table -->
94d29a8848130741ed9e35078f6b814abac06fccmatthew <!-- Temporary cache for working files -->
94d29a8848130741ed9e35078f6b814abac06fccmatthew <property name="temp.dir" location="${user.home}/.ant/tempcache" />
94d29a8848130741ed9e35078f6b814abac06fccmatthew <condition>
94d29a8848130741ed9e35078f6b814abac06fccmatthew </condition>ERROR
94d29a8848130741ed9e35078f6b814abac06fccmatthewSet -Ddest=LOCATION on the command line
94d29a8848130741ed9e35078f6b814abac06fccmatthew -Ddest=system ant lib dir ${ant.home}/lib
94d29a8848130741ed9e35078f6b814abac06fccmatthew -Ddest=optional optional dir $${basedir}/lib/optional (for Ant developers)
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe </condition>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe </condition>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe </condition>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <fail unless="dest.dir">Unknown destination : ${dest}</fail>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe xmlns:artifact="antlib:org.apache.maven.artifact.ant">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <sequential>
94d29a8848130741ed9e35078f6b814abac06fccmatthew Unknown archive @{archive} -no property @{archive}.version defined in ${lib.dir}/libraries.properties.
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <condition>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe </condition>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe artifactID="@{archive}"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe version="${@{archive}.version}"/>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <!-- now we are left with the problem of getting the files
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe into our directory -->
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <flattenmapper/>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe </sequential>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe </macrodef>
94d29a8848130741ed9e35078f6b814abac06fccmatthew <sequential>
94d29a8848130741ed9e35078f6b814abac06fccmatthew <ftp server="@{host}" port="@{port}" userid="@{user}" password="@{pw}" passive="true"
94d29a8848130741ed9e35078f6b814abac06fccmatthew remotedir="@{remotedir}" action="get" depends="true" preserveLastModified="true"
94d29a8848130741ed9e35078f6b814abac06fccmatthew skipFailedTransfers="true">
94d29a8848130741ed9e35078f6b814abac06fccmatthew </sequential>
94d29a8848130741ed9e35078f6b814abac06fccmatthew </macrodef>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <!-- any init stuff -->
94d29a8848130741ed9e35078f6b814abac06fccmatthew <available property="temp.cache.already.exists" file="${temp.dir}" type="dir" />
94d29a8848130741ed9e35078f6b814abac06fccmatthew <equals arg1="${keep.temp.dir}" arg2="false" casesensitive="false" />
94d29a8848130741ed9e35078f6b814abac06fccmatthew <equals arg1="${keep.temp.dir}" arg2="no" casesensitive="false" />
94d29a8848130741ed9e35078f6b814abac06fccmatthew <equals arg1="${keep.temp.dir}" arg2="off" casesensitive="false" />
94d29a8848130741ed9e35078f6b814abac06fccmatthew </condition>
94d29a8848130741ed9e35078f6b814abac06fccmatthew </condition>
94d29a8848130741ed9e35078f6b814abac06fccmatthew <target name="-setup-temp-cache" depends="init-cache" unless="temp.cache.already.exists"
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="Setup temporary cache for downloaded files">
94d29a8848130741ed9e35078f6b814abac06fccmatthew <target name="-cleanup-temp-cache" depends="init-cache" if="delete.temp.cache"
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="Gets rid of the temporary cache directory">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <echoproperties />
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load logging libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe <f2 project="commons-logging" archive="commons-logging-api" />
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load junit libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load full XML libraries (xalan, resolver)"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load networking libraries (commons-net; jsch)"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
94d29a8848130741ed9e35078f6b814abac06fccmatthew <available property="have.commons.net" classname="org.apache.commons.net.ftp.FTPClientConfig"/>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load regexp libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load antlr libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load bcel libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load jdepend libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load bsf libraries"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load jruby"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="bsf">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load beanshell support"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="bsf">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load jython"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="bsf">
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="load rhino"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="bsf">
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="load script languages (except jython)"
94d29a8848130741ed9e35078f6b814abac06fccmatthew depends="bsf,jruby,beanshell,rhino"/>
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe description="internal ant debugging"
74689cbcc0cebbd857a50b155293b82d7403df78al_xipe depends="init">
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="load javamail">
94d29a8848130741ed9e35078f6b814abac06fccmatthew <target name="jspc" depends="init" description="loads Jasper">
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="load java advanced imaging">
94d29a8848130741ed9e35078f6b814abac06fccmatthew <f2 project="javax.media" archive="jai-core" repository="http://repository.jboss.org/maven2"/>
94d29a8848130741ed9e35078f6b814abac06fccmatthew <f2 project="com.sun.media" archive="jai-codec" repository="http://repository.jboss.org/maven2"/>
94d29a8848130741ed9e35078f6b814abac06fccmatthew <target name="netrexx" depends="init-no-m2,-setup-temp-cache,networking,-fetch-netrexx,-fetch-netrexx-no-commons-net,-cleanup-temp-cache"
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="load NetRexx compiler" />
94d29a8848130741ed9e35078f6b814abac06fccmatthew <target name="-fetch-netrexx" depends="-setup-temp-cache"
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="FTPs NetRexx compiler from IBM site" if="have.commons.net">
94d29a8848130741ed9e35078f6b814abac06fccmatthew <get-ftp-file host="ftp.software.ibm.com" remotedir="/software/awdtools/netrexx"
94d29a8848130741ed9e35078f6b814abac06fccmatthew </zipfileset>
94d29a8848130741ed9e35078f6b814abac06fccmatthew <target name="-fetch-netrexx-no-commons-net" depends="-setup-temp-cache"
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="FTPs NetRexx compiler from IBM site" unless="have.commons.net">
94d29a8848130741ed9e35078f6b814abac06fccmatthew <get src="ftp://ftp.software.ibm.com/software/awdtools/netrexx/NetRexx.zip" dest="${temp.dir}/NetRexx.zip" skipexisting="true"/>
94d29a8848130741ed9e35078f6b814abac06fccmatthew </zipfileset>
94d29a8848130741ed9e35078f6b814abac06fccmatthew description="load all the libraries (except jython)"
94d29a8848130741ed9e35078f6b814abac06fccmatthew depends="logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script,javamail,jspc,jai,netrexx" />