| Line 1... |
Line 1... |
| 1 |
<project name="load-using-macrodef">
|
1 |
<project name="load-using-macrodef">
|
| 2 |
|
2 |
|
| 3 |
<!-- C O P Y R I G H T N O T I C E
|
3 |
<!-- C O P Y R I G H T N O T I C E
|
| 4 |
This material is confidential to ERG and may not be disclosed in whole
|
4 |
This material is confidential to ERG and may not be disclosed in whole
|
| 5 |
or in part to any third party nor used in any manner whatsoever other
|
5 |
or in part to any third party nor used in any manner whatsoever other
|
| 6 |
than for the purposes expressly consented to by ERG in writing.
|
6 |
than for the purposes expressly consented to by ERG in writing.
|
| 7 |
|
7 |
|
| 8 |
This material is also copyright and may not be reproduced, stored in a
|
8 |
This material is also copyright and may not be reproduced, stored in a
|
| 9 |
retrieval system or transmitted in any form or by any means in whole or
|
9 |
retrieval system or transmitted in any form or by any means in whole or
|
| Line 11... |
Line 11... |
| 11 |
-->
|
11 |
-->
|
| 12 |
|
12 |
|
| 13 |
<!-- ============================================================================================== -->
|
13 |
<!-- ============================================================================================== -->
|
| 14 |
<!-- Install ant-using -->
|
14 |
<!-- Install ant-using -->
|
| 15 |
|
15 |
|
| 16 |
<property name="ant-using-version" value="1.3.0"/>
|
16 |
<property name="ant-using-version" value="1.3.1.ant"/>
|
| 17 |
|
17 |
|
| 18 |
|
18 |
|
| 19 |
<fail message="An existing ANT using macro has been declared with a different version" status="2">
|
19 |
<fail message="An existing ANT using macro has been declared with a different version" status="2">
|
| 20 |
<condition>
|
20 |
<condition>
|
| 21 |
<and>
|
21 |
<and>
|
| 22 |
<isset property="using.ant-using.version"/>
|
22 |
<isset property="using.ant-using.version"/>
|
| 23 |
<not><equals arg1="${using.ant-using.version}" arg2="${ant-using-version}"/></not>
|
23 |
<not><equals arg1="${using.ant-using.version}" arg2="${ant-using-version}"/></not>
|
| 24 |
</and>
|
24 |
</and>
|
| 25 |
</condition>
|
25 |
</condition>
|
| 26 |
</fail>
|
26 |
</fail>
|
| 27 |
|
27 |
|
| 28 |
|
28 |
|
| - |
|
29 |
<!-- For backward compatibilty, EITHER the GBE_DPKG variable OR the JATS_HOME variable should be set -->
|
| 29 |
<fail message="The mandatory environment variable GBE_DPKG is missing" status="1">
|
30 |
<fail message="The mandatory environment variable GBE_DPKG (or the alternative JATS_HOME) is missing" status="1">
|
| 30 |
<condition>
|
31 |
<condition>
|
| - |
|
32 |
<and>
|
| 31 |
<length string="${env.GBE_DPKG}" trim="true" length="0"/>
|
33 |
<not><isset property="env.GBE_DPKG"/></not>
|
| - |
|
34 |
<not><isset property="env.JATS_HOME"/></not>
|
| - |
|
35 |
</and>
|
| 32 |
</condition>
|
36 |
</condition>
|
| 33 |
</fail>
|
37 |
</fail>
|
| 34 |
|
38 |
|
| - |
|
39 |
<!-- If one (or the other) is not set, we will set it up here -->
|
| - |
|
40 |
<condition property="env.GBE_DPKG" value="${env.JATS_HOME}">
|
| - |
|
41 |
<not><isset property="env.GBE_DPKG"/></not>
|
| - |
|
42 |
</condition>
|
| - |
|
43 |
<condition property="env.JATS_HOME" value="${env.GBE_DPKG}">
|
| - |
|
44 |
<not><isset property="env.JATS_HOME"/></not>
|
| - |
|
45 |
</condition>
|
| - |
|
46 |
|
| - |
|
47 |
|
| 35 |
<!-- ============================================================================================== -->
|
48 |
<!-- ============================================================================================== -->
|
| 36 |
<!-- Install ant-antcontrib -->
|
49 |
<!-- Install ant-antcontrib -->
|
| 37 |
|
- |
|
| 38 |
<property name="antcontrib-version" value="1.0b2"/>
|
50 |
<property name="antcontrib-version" value="1.0b2"/>
|
| 39 |
<property name="using.ant-antcontrib.basedir" value="${env.GBE_DPKG}/ant-antcontrib/${antcontrib-version}"/>
|
51 |
<property name="using.ant-antcontrib.basedir" value="${env.GBE_DPKG}/ant-antcontrib/${antcontrib-version}"/>
|
| 40 |
<property name="using.antcontrib.basedir" value="${env.GBE_DPKG}/antcontrib/${antcontrib-version}"/>
|
52 |
<property name="using.antcontrib.basedir" value="${env.GBE_DPKG}/antcontrib/${antcontrib-version}"/>
|
| 41 |
<mkdir dir="${using.ant-antcontrib.basedir}"/>
|
53 |
<mkdir dir="${using.ant-antcontrib.basedir}"/>
|
| 42 |
<mkdir dir="${using.antcontrib.basedir}"/>
|
54 |
<mkdir dir="${using.antcontrib.basedir}"/>
|
| Line 52... |
Line 64... |
| 52 |
</copy>
|
64 |
</copy>
|
| 53 |
<import file="${using.ant-antcontrib.basedir}/ant-antcontrib.xml" optional="false"/>
|
65 |
<import file="${using.ant-antcontrib.basedir}/ant-antcontrib.xml" optional="false"/>
|
| 54 |
<!-- ============================================================================================== -->
|
66 |
<!-- ============================================================================================== -->
|
| 55 |
|
67 |
|
| 56 |
|
68 |
|
| 57 |
<!-- Do we have an environment variable for GBE_DPKG_CACHE ?
|
69 |
<!-- Do we have an environment variable for GBE_DPKG_CACHE?
|
| 58 |
If not, then
|
70 |
If so, use it as the build location.
|
| 59 |
Use the properties file : ant-build-properties (if one exists)
|
71 |
If not, look for a properties file : ant-build-properties (if one exists)
|
| 60 |
Otherwise
|
- |
|
| 61 |
Use the local variable
|
72 |
If the properties are not found, default to ${user.home}/build-repository -->
|
| 62 |
-->
|
- |
|
| 63 |
|
- |
|
| 64 |
<if>
|
73 |
<if>
|
| 65 |
<contains string="${env.GBE_DPKG_CACHE}" substring="$"/>
|
74 |
<isset property="${env.GBE_DPKG_CACHE}"/>
|
| 66 |
<then>
|
75 |
<then>
|
| - |
|
76 |
<property name="build.repository" value="${env.GBE_DPKG_CACHE}"/>
|
| - |
|
77 |
<echo taskname="ant-using">Using environment variable 'GBE_DPKG_CACHE' as build.repository from : ${build.repository}</echo>
|
| - |
|
78 |
</then>
|
| - |
|
79 |
<else>
|
| 67 |
<available property="ant-build-properties_available" filepath="${user.home}" file="ant-build-properties"/>
|
80 |
<available property="ant-build-properties_available" filepath="${user.home}" file="ant-build-properties"/>
|
| 68 |
|
- |
|
| 69 |
<if>
|
81 |
<if>
|
| 70 |
<isset property="ant-build-properties_available"/>
|
82 |
<isset property="ant-build-properties_available"/>
|
| 71 |
<then>
|
83 |
<then>
|
| 72 |
<property file="${user.home}/ant-build-properties"/>
|
84 |
<property file="${user.home}/ant-build-properties"/>
|
| 73 |
<echo taskname="ant-using">Using 'ant-build-properties' file for build.repository as : ${build.repository}</echo>
|
85 |
<echo taskname="ant-using">Using 'ant-build-properties' file for build.repository as : ${build.repository}</echo>
|
| 74 |
</then>
|
86 |
</then>
|
| 75 |
<else>
|
87 |
<else>
|
| 76 |
<fail message="Failed to determine build.repository location" status="1"/>
|
88 |
<property name="build.repository" value="${user.home}/build-repository"/>
|
| 77 |
</else>
|
89 |
</else>
|
| 78 |
</if>
|
90 |
</if>
|
| 79 |
</then>
|
- |
|
| 80 |
<else>
|
- |
|
| 81 |
<property name="build.repository" value="${env.GBE_DPKG_CACHE}"/>
|
- |
|
| 82 |
<echo taskname="ant-using">Using environment variable 'GBE_DPKG_CACHE' as build.repository from : ${build.repository}</echo>
|
- |
|
| 83 |
</else>
|
91 |
</else>
|
| 84 |
</if>
|
92 |
</if>
|
| 85 |
|
93 |
|
| 86 |
|
94 |
|
| 87 |
<property name="using.ant-using.basedir" value="${build.repository}/ant-using/${ant-using-version}"/>
|
95 |
<property name="using.ant-using.basedir" value="${build.repository}/ant-using/${ant-using-version}"/>
|