Subversion Repositories DevTools

Rev

Rev 1962 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1960 mtynas 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
	<!-- Install ant-using -->
15
 
16
	<property name="ant-using-version" value="1.3.0"/>
17
 
18
 
19
	<fail message="An existing ANT using macro has been declared with a different version" status="2">
20
		<condition>
21
			<and>
22
				<isset	property="using.ant-using.version"/>
23
				<not><equals	arg1="${using.ant-using.version}" arg2="${ant-using-version}"/></not>
24
			</and>
25
		</condition>
26
	</fail>
27
 
28
 
29
	<fail message="The mandatory environment variable GBE_DPKG is missing" status="1">
30
		<condition>
31
			<length string="${env.GBE_DPKG}" trim="true" length="0"/>
32
		</condition>
33
	</fail>
34
 
35
	<!-- ============================================================================================== -->
36
	<!-- Install ant-antcontrib -->
37
 
38
	<property name="antcontrib-version" value="1.0b2"/>
39
	<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}"/>
41
	<mkdir dir="${using.ant-antcontrib.basedir}"/>
42
	<mkdir dir="${using.antcontrib.basedir}"/>
43
	<copy todir="${using.ant-antcontrib.basedir}" verbose="yes">
44
		<fileset dir="${env.GBE_DPKG}/ant-antcontrib/${antcontrib-version}">
45
			<include name="*.xml"/>
46
		</fileset>
47
	</copy>
48
	<copy todir="${using.antcontrib.basedir}" verbose="yes">
49
		<fileset dir="${env.GBE_DPKG}/antcontrib/${antcontrib-version}">
50
			<include name="**/*.jar"/>
51
		</fileset>
52
	</copy>
53
	<import file="${using.ant-antcontrib.basedir}/ant-antcontrib.xml" optional="false"/>
54
	<!-- ============================================================================================== -->
55
 
56
 
57
	<!-- Do we have an environment variable for GBE_DPKG_CACHE ?
58
		 If not, then 
59
			Use the properties file : ant-build-properties (if one exists)
60
		 Otherwise 
61
			Use the local variable 
62
	-->
63
 
64
	<if>
65
		<contains string="${env.GBE_DPKG_CACHE}" substring="$"/>
66
		<then>
67
			<available property="ant-build-properties_available" filepath="${user.home}" file="ant-build-properties"/>
68
 
69
			<if>
70
				<isset	property="ant-build-properties_available"/>
71
				<then>
72
					<property file="${user.home}/ant-build-properties"/>
73
					<echo taskname="ant-using">Using 'ant-build-properties' file for build.repository as : ${build.repository}</echo>
74
				</then>
75
				<else>
76
					<fail message="Failed to determine build.repository location" status="1"/>
77
				</else>
78
			</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>
84
	</if>
85
 
86
 
87
	<property name="using.ant-using.basedir" value="${build.repository}/ant-using/${ant-using-version}"/>
88
	<mkdir dir="${using.ant-using.basedir}"/>
89
	<copy todir="${using.ant-using.basedir}" verbose="yes">
90
		<fileset dir="${env.GBE_DPKG}/ant-using/${ant-using-version}">
91
			<include name="*.xml"/>
92
		</fileset>
93
	</copy>
94
	<import file="${using.ant-using.basedir}/ant-using-macro.xml" optional="false"/>
95
	<!-- ============================================================================================== -->
96
 
97
</project>