| 1972 |
jgill |
1 |
<project name="load-using-macrodef">
|
|
|
2 |
|
|
|
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
|
|
|
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.
|
|
|
7 |
|
|
|
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
|
|
|
10 |
in part without the express written consent of ERG.
|
|
|
11 |
-->
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
<!--
|
|
|
15 |
- REPLACE_ANT_USING will get replaced with the release version of ant-using on release.
|
|
|
16 |
-->
|
|
|
17 |
<property name="ant-using-version" value="REPLACE_ANT_USING"/>
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
<fail message="An existing ANT using macro has been declared with a different version" status="2">
|
|
|
21 |
<condition>
|
|
|
22 |
<and>
|
|
|
23 |
<isset property="using.ant-using.version"/>
|
|
|
24 |
<not><equals arg1="${using.ant-using.version}" arg2="${ant-using-version}"/></not>
|
|
|
25 |
</and>
|
|
|
26 |
</condition>
|
|
|
27 |
</fail>
|
|
|
28 |
|
|
|
29 |
<property name="using.ant-using.version" value="${ant-using-version}"/>
|
|
|
30 |
|
|
|
31 |
<fail message="The mandatory environment variable GBE_DPKG is missing" status="1">
|
|
|
32 |
<condition>
|
|
|
33 |
<and>
|
|
|
34 |
<not><isset property="env.GBE_DPKG"/></not>
|
|
|
35 |
</and>
|
|
|
36 |
</condition>
|
|
|
37 |
</fail>
|
|
|
38 |
|
|
|
39 |
<dirname property="dirname.load-using-macrodef" file="${ant.file.load-using-macrodef}"/>
|
|
|
40 |
|
|
|
41 |
<taskdef resource="net/sf/antcontrib/antlib.xml">
|
|
|
42 |
<classpath>
|
|
|
43 |
<pathelement location="${dirname.load-using-macrodef}/jar/ant-contrib.jar"/>
|
|
|
44 |
</classpath>
|
|
|
45 |
</taskdef>
|
|
|
46 |
|
|
|
47 |
<!--
|
|
|
48 |
- Do we have an environment variable for GBE_DPKG_CACHE?
|
|
|
49 |
- If so, use it as the build location.
|
|
|
50 |
- If not, look for a properties file : ant-build-properties (if one exists)
|
|
|
51 |
- If the properties are not found, default to ${user.home}/build-repository
|
|
|
52 |
-->
|
|
|
53 |
<if>
|
|
|
54 |
<isset property="env.GBE_DPKG_CACHE"/>
|
|
|
55 |
<then>
|
|
|
56 |
<property name="build.repository" value="${env.GBE_DPKG_CACHE}"/>
|
|
|
57 |
<echo taskname="ant-using">Using environment variable 'GBE_DPKG_CACHE' as build.repository from : ${build.repository}</echo>
|
|
|
58 |
</then>
|
|
|
59 |
<else>
|
|
|
60 |
<available property="ant-build-properties_available" filepath="${user.home}" file="ant-build-properties"/>
|
|
|
61 |
<if>
|
|
|
62 |
<isset property="ant-build-properties_available"/>
|
|
|
63 |
<then>
|
|
|
64 |
<property file="${user.home}/ant-build-properties"/>
|
|
|
65 |
<echo taskname="ant-using">Using 'ant-build-properties' file for build.repository as : ${build.repository}</echo>
|
|
|
66 |
</then>
|
|
|
67 |
<else>
|
|
|
68 |
<property name="build.repository" value="${user.home}/build-repository"/>
|
|
|
69 |
</else>
|
|
|
70 |
</if>
|
|
|
71 |
</else>
|
|
|
72 |
</if>
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
<!--
|
|
|
76 |
- Pick up ant-using-macro.xml from same directory as this file was imported.
|
|
|
77 |
-->
|
|
|
78 |
<import file="${dirname.load-using-macrodef}/ant-using-macro.xml" optional="false"/>
|
|
|
79 |
<import file="${dirname.load-using-macrodef}/ant-clean.xml" optional="false"/>
|
|
|
80 |
<import file="${dirname.load-using-macrodef}/ant-manifest.xml" optional="false"/>
|
|
|
81 |
<import file="${dirname.load-using-macrodef}/ant-release.xml" optional="false"/>
|
|
|
82 |
<import file="${dirname.load-using-macrodef}/ant-javadoc.xml" optional="false"/>
|
|
|
83 |
<import file="${dirname.load-using-macrodef}/ant-jants.xml" optional="false"/>
|
|
|
84 |
|
|
|
85 |
<!--
|
|
|
86 |
- Import the auto.xml file (if it exists), and if it does not then import the depends.xml.
|
|
|
87 |
- The name of the depends.xml it will look for (in this order) is ${ant.project.name}-depends.xml or
|
|
|
88 |
- ${ant.project.name}depends.xml.
|
|
|
89 |
-->
|
|
|
90 |
<available property="auto.xml.exists" filepath="${basedir}" file="auto.xml"/>
|
|
|
91 |
<if>
|
|
|
92 |
<isset property="auto.xml.exists"/>
|
|
|
93 |
<then>
|
|
|
94 |
<import file="${basedir}/auto.xml" optional="true"/>
|
|
|
95 |
</then>
|
|
|
96 |
<else>
|
|
|
97 |
<available property="depends.xml.exists" filepath="${basedir}" file="${ant.project.name}-depends.xml"/>
|
|
|
98 |
<if>
|
|
|
99 |
<isset property="depends.xml.exists"/>
|
|
|
100 |
<then>
|
|
|
101 |
<import file="${basedir}/${ant.project.name}-depends.xml" optional="true"/>
|
|
|
102 |
</then>
|
|
|
103 |
<else>
|
|
|
104 |
<import file="${basedir}/${ant.project.name}depends.xml" optional="true"/>
|
|
|
105 |
</else>
|
|
|
106 |
</if>
|
|
|
107 |
</else>
|
|
|
108 |
</if>
|
|
|
109 |
|
|
|
110 |
</project>
|