Rev 1985 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<project name="load-using-macrodef"><!-- C O P Y R I G H T N O T I C EThis material is confidential to ERG and may not be disclosed in wholeor in part to any third party nor used in any manner whatsoever otherthan for the purposes expressly consented to by ERG in writing.This material is also copyright and may not be reproduced, stored in aretrieval system or transmitted in any form or by any means in whole orin part without the express written consent of ERG.--><!-- ============================================================================================== --><!-- Install ant-using --><!-- REPLACE_ANT_USING will get replaced with the release version of ant-using on release. --><property name="ant-using-version" value="REPLACE_ANT_USING"/><fail message="An existing ANT using macro has been declared with a different version" status="2"><condition><and><isset property="using.ant-using.version"/><not><equals arg1="${using.ant-using.version}" arg2="${ant-using-version}"/></not></and></condition></fail><property name="using.ant-using.version" value="${ant-using-version}"/><!-- For backward compatibilty, EITHER the GBE_DPKG variable OR the JATS_HOME variable should be set --><fail message="The mandatory environment variable GBE_DPKG (or the alternative JATS_HOME) is missing" status="1"><condition><and><not><isset property="env.GBE_DPKG"/></not><not><isset property="env.JATS_HOME"/></not></and></condition></fail><!-- If one (or the other) is not set, we will set it up here --><condition property="env.GBE_DPKG" value="${env.JATS_HOME}"><not><isset property="env.GBE_DPKG"/></not></condition><condition property="env.JATS_HOME" value="${env.GBE_DPKG}"><not><isset property="env.JATS_HOME"/></not></condition><!-- ============================================================================================== --><!-- Install antcontrib.When this script is used to release ant-using itself, the version property below gets set tothe version defined in ant-usingdepends.xml. Then the released ant-using.xml will have thestring "${DEFAULT_ANTCONTRIB_VERSION}" (including $ and braces) replaced by the dependentversions of this package.--><property name="DEFAULT_ANTCONTRIB_VERSION" value="${antcontrib}"/><property name="using.antcontrib.version" value="${DEFAULT_ANTCONTRIB_VERSION}"/><!-- Reference antcontrib from GBE_DPKG directly. Don't attempt to copy it tothe build repository - code was previously here intending to do that but actually had GBE_DPKG asthe destination! Instead let the "using" macro do it once we've sorted out where the buildrepository actually is.--><property name="using.antcontrib.sourcedir" value="${env.GBE_DPKG}/antcontrib/${using.antcontrib.version}"/><taskdef resource="net/sf/antcontrib/antlib.xml"><classpath><pathelement location="${using.antcontrib.sourcedir}/jar/ant-contrib.jar"/></classpath></taskdef><!-- ============================================================================================== --><!-- Do we have an environment variable for GBE_DPKG_CACHE?If so, use it as the build location.If not, look for a properties file : ant-build-properties (if one exists)If the properties are not found, default to ${user.home}/build-repository --><if><isset property="env.GBE_DPKG_CACHE"/><then><property name="platform_build.repository" value="${env.GBE_DPKG_CACHE}"/><echo taskname="ant-using">Using environment variable 'GBE_DPKG_CACHE' as build.repository from : ${platform_build.repository}</echo></then><else><available property="ant-build-properties_available" filepath="${user.home}" file="ant-build-properties"/><if><isset property="ant-build-properties_available"/><then><property file="${user.home}/ant-build-properties"/><echo taskname="ant-using">Using 'ant-build-properties' file for build.repository as : ${build.repository}</echo></then><else><property name="platform_build.repository" value="${user.home}/build-repository"/></else></if></else></if><!-- ============================================================================================== --><!-- Convert any non platform speicific repository location into a locally support format --><path id="platform_build_repository"><pathelement location="${platform_build.repository}"/></path><pathconvert targetos="windows" property="build.repository" refid="platform_build_repository"/><echo taskname="ant-using">Using Build Repository from : ${build.repository}</echo><!-- ============================================================================================== --><!-- Pick up ant-using-macro.xml from same directory as this file was imported. --><dirname property="dirname.load-using-macrodef" file="${ant.file.load-using-macrodef}"/><import file="${dirname.load-using-macrodef}/ant-using-macro.xml" optional="false"/><!-- Now we've got the "using" macro loaded, use it to get antcontrib intoour cache for use if someone later wants to run "local only", e.g. off a CD.--><using name="antcontrib" version="${using.antcontrib.version}"/><!-- ============================================================================================== --><!-- Import the auto.xml file (if it exists), and if it does not then import the depends.xml.The name of the depends.xml it will look for (in this order) is ${ant.project.name}-depends.xml or${ant.project.name}depends.xml.--><available property="auto.xml.exists" filepath="${basedir}" file="auto.xml"/><if><isset property="auto.xml.exists"/><then><import file="${basedir}/auto.xml" optional="true"/></then><else><available property="depends.xml.exists" filepath="${basedir}" file="${ant.project.name}-depends.xml"/><if><isset property="depends.xml.exists"/><then><import file="${basedir}/${ant.project.name}-depends.xml" optional="true"/></then><else><import file="${basedir}/${ant.project.name}depends.xml" optional="true"/></else></if></else></if></project>