| Line 1... |
Line 1... |
| 1 |
<project name="load-using-macrodef">
|
1 |
<project name="ant-using">
|
| 2 |
|
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.6.1.tool"/>
|
- |
|
| 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 |
<property name="using.ant-using.version" value="${ant-using-version}"/>
|
- |
|
| 29 |
<!-- For backward compatibilty, EITHER the GBE_DPKG variable OR the JATS_HOME variable should be set -->
|
- |
|
| 30 |
<fail message="The mandatory environment variable GBE_DPKG (or the alternative JATS_HOME) is missing" status="1">
|
- |
|
| 31 |
<condition>
|
- |
|
| 32 |
<and>
|
- |
|
| 33 |
<not><isset property="env.GBE_DPKG"/></not>
|
- |
|
| 34 |
<not><isset property="env.JATS_HOME"/></not>
|
- |
|
| 35 |
</and>
|
- |
|
| 36 |
</condition>
|
- |
|
| 37 |
</fail>
|
- |
|
| 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 |
|
- |
|
| 48 |
<!-- ============================================================================================== -->
|
- |
|
| 49 |
<!-- Install ant-antcontrib -->
|
- |
|
| 50 |
<property name="using.antcontrib.version" value="1.0b2"/>
|
- |
|
| 51 |
<property name="using.ant-antcontrib.basedir" value="${env.GBE_DPKG}/ant-antcontrib/${using.antcontrib.version}"/>
|
- |
|
| 52 |
<property name="using.antcontrib.basedir" value="${env.GBE_DPKG}/antcontrib/${using.antcontrib.version}"/>
|
- |
|
| 53 |
<mkdir dir="${using.ant-antcontrib.basedir}"/>
|
- |
|
| 54 |
<mkdir dir="${using.antcontrib.basedir}"/>
|
- |
|
| 55 |
<copy todir="${using.ant-antcontrib.basedir}" verbose="yes">
|
- |
|
| 56 |
<fileset dir="${env.GBE_DPKG}/ant-antcontrib/${using.antcontrib.version}">
|
- |
|
| 57 |
<include name="*.xml"/>
|
- |
|
| 58 |
</fileset>
|
- |
|
| 59 |
</copy>
|
- |
|
| 60 |
<copy todir="${using.antcontrib.basedir}" verbose="yes">
|
- |
|
| 61 |
<fileset dir="${env.GBE_DPKG}/antcontrib/${using.antcontrib.version}">
|
- |
|
| 62 |
<include name="**/*.jar"/>
|
- |
|
| 63 |
</fileset>
|
- |
|
| 64 |
</copy>
|
- |
|
| 65 |
<import file="${using.ant-antcontrib.basedir}/ant-antcontrib.xml" optional="false"/>
|
- |
|
| 66 |
<!-- ============================================================================================== -->
|
- |
|
| 67 |
|
- |
|
| 68 |
|
- |
|
| 69 |
<!-- Do we have an environment variable for GBE_DPKG_CACHE?
|
- |
|
| 70 |
If so, use it as the build location.
|
- |
|
| 71 |
If not, look for a properties file : ant-build-properties (if one exists)
|
- |
|
| 72 |
If the properties are not found, default to ${user.home}/build-repository -->
|
- |
|
| 73 |
<if>
|
- |
|
| 74 |
<isset property="${env.GBE_DPKG_CACHE}"/>
|
- |
|
| 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>
|
- |
|
| 80 |
<available property="ant-build-properties_available" filepath="${user.home}" file="ant-build-properties"/>
|
- |
|
| 81 |
<if>
|
- |
|
| 82 |
<isset property="ant-build-properties_available"/>
|
- |
|
| 83 |
<then>
|
- |
|
| 84 |
<property file="${user.home}/ant-build-properties"/>
|
- |
|
| 85 |
<echo taskname="ant-using">Using 'ant-build-properties' file for build.repository as : ${build.repository}</echo>
|
- |
|
| 86 |
</then>
|
- |
|
| 87 |
<else>
|
- |
|
| 88 |
<property name="build.repository" value="${user.home}/build-repository"/>
|
- |
|
| 89 |
</else>
|
- |
|
| 90 |
</if>
|
- |
|
| 91 |
</else>
|
- |
|
| 92 |
</if>
|
- |
|
| 93 |
|
- |
|
| 94 |
|
- |
|
| 95 |
<property name="using.ant-using.basedir" value="${build.repository}/ant-using/${ant-using-version}"/>
|
- |
|
| 96 |
<mkdir dir="${using.ant-using.basedir}"/>
|
- |
|
| 97 |
<copy todir="${using.ant-using.basedir}" verbose="yes">
|
- |
|
| 98 |
<fileset dir="${env.GBE_DPKG}/ant-using/${ant-using-version}">
|
- |
|
| 99 |
<include name="*.xml"/>
|
- |
|
| 100 |
</fileset>
|
- |
|
| 101 |
</copy>
|
- |
|
| 102 |
<import file="${using.ant-using.basedir}/ant-using-macro.xml" optional="false"/>
|
3 |
<description>Build and release the ant-using package.</description>
|
| 103 |
<!-- ============================================================================================== -->
|
- |
|
| 104 |
|
- |
|
| 105 |
<!-- Import the auto.xml file (if it exists), and if it does not then import the depends.xml.
|
- |
|
| 106 |
The name of the depends.xml it will look for (in this order) is ${ant.project.name}-depends.xml or
|
- |
|
| 107 |
${ant.project.name}depends.xml.
|
- |
|
| 108 |
-->
|
- |
|
| 109 |
<available property="auto.xml.exists" filepath="${basedir}" file="auto.xml"/>
|
- |
|
| 110 |
<if>
|
- |
|
| 111 |
<isset property="auto.xml.exists"/>
|
- |
|
| 112 |
<then>
|
- |
|
| 113 |
<import file="${basedir}/auto.xml" optional="true"/>
|
- |
|
| 114 |
</then>
|
- |
|
| 115 |
<else>
|
- |
|
| 116 |
<available property="depends.xml.exists" filepath="${basedir}" file="${ant.project.name}-depends.xml"/>
|
- |
|
| 117 |
<if>
|
- |
|
| 118 |
<isset property="depends.xml.exists"/>
|
- |
|
| 119 |
<then>
|
- |
|
| 120 |
<import file="${basedir}/${ant.project.name}-depends.xml" optional="true"/>
|
- |
|
| 121 |
</then>
|
- |
|
| 122 |
<else>
|
- |
|
| 123 |
<import file="${basedir}/${ant.project.name}depends.xml" optional="true"/>
|
- |
|
| 124 |
</else>
|
- |
|
| 125 |
</if>
|
- |
|
| 126 |
</else>
|
- |
|
| 127 |
</if>
|
- |
|
| 128 |
|
4 |
|
| - |
|
5 |
<property name="env" environment="env" value="not used" />
|
| - |
|
6 |
<property name="release.dir" value="${basedir}/build/release" />
|
| - |
|
7 |
<property name="src.dir" value="${basedir}/src" />
|
| - |
|
8 |
|
| - |
|
9 |
<import file="auto.xml" optional="true" />
|
| - |
|
10 |
<import file="${ant.project.name}depends.xml" />
|
| - |
|
11 |
|
| - |
|
12 |
<taskdef resource="net/sf/antcontrib/antlib.xml">
|
| - |
|
13 |
<classpath>
|
| - |
|
14 |
<pathelement location="${env.GBE_DPKG}/antcontrib/${antcontrib}/jar/ant-contrib.jar" />
|
| - |
|
15 |
</classpath>
|
| - |
|
16 |
</taskdef>
|
| - |
|
17 |
|
| - |
|
18 |
<taskdef resource="jats.properties">
|
| - |
|
19 |
<classpath>
|
| - |
|
20 |
<pathelement path="${env.GBE_DPKG}/jants/${jants}/jar/jants.jar" />
|
| - |
|
21 |
<pathelement path="${env.GBE_DPKG}/clearcase/${clearcase}/jar/clearcase.jar" />
|
| - |
|
22 |
</classpath>
|
| - |
|
23 |
</taskdef>
|
| - |
|
24 |
|
| - |
|
25 |
|
| - |
|
26 |
<!-- Get ant-using from own source dir instead of build repository! -->
|
| - |
|
27 |
<import file="${src.dir}/ant-using.xml" />
|
| - |
|
28 |
|
| - |
|
29 |
<property name="build.dir" value="${basedir}/build" />
|
| - |
|
30 |
<property name="package.dir" value="${build.dir}/pkg" />
|
| - |
|
31 |
|
| - |
|
32 |
<usingall />
|
| - |
|
33 |
|
| - |
|
34 |
<target name="run_tests" />
|
| - |
|
35 |
|
| - |
|
36 |
<target name="compile" />
|
| - |
|
37 |
|
| - |
|
38 |
<!--
|
| - |
|
39 |
P A C K A G E
|
| - |
|
40 |
-->
|
| - |
|
41 |
<target name="build" depends="" description="Creates the jar archives.">
|
| - |
|
42 |
|
| - |
|
43 |
<mkdir dir="${package.dir}" />
|
| - |
|
44 |
<mkdir dir="${package.dir}/jar" />
|
| - |
|
45 |
|
| - |
|
46 |
<copy todir="${package.dir}">
|
| - |
|
47 |
<fileset dir="${src.dir}" includes="*.xml" />
|
| - |
|
48 |
</copy>
|
| - |
|
49 |
|
| - |
|
50 |
<copy todir="${package.dir}/jar">
|
| - |
|
51 |
<fileset dir="${using.antcontrib.basedir}/jar/" />
|
| - |
|
52 |
<fileset dir="${using.antshield.basedir}/jar/" />
|
| - |
|
53 |
<fileset dir="${using.clearcase.basedir}/jar/" />
|
| - |
|
54 |
<fileset dir="${using.clearcase.basedir}/jar/" />
|
| - |
|
55 |
|
| - |
|
56 |
<fileset dir="${using.jants.basedir}/jar/" />
|
| - |
|
57 |
<fileset dir="${using.JavaSVN.basedir}/jar/" />
|
| - |
|
58 |
<fileset dir="${using.JavaSVN.basedir}/jar/" />
|
| - |
|
59 |
<fileset dir="${using.JavaSVN.basedir}/jar/" />
|
| - |
|
60 |
<fileset dir="${using.svnant.basedir}/jar/" />
|
| - |
|
61 |
</copy>
|
| - |
|
62 |
|
| - |
|
63 |
<replace file="${package.dir}/ant-using.xml" token="REPLACE_ANT_USING" value="${packageversion}" />
|
| - |
|
64 |
</target>
|
| - |
|
65 |
|
| - |
|
66 |
<target name="make_package" >
|
| - |
|
67 |
|
| - |
|
68 |
<summarise-manifest package="${packagename}" version="${packageversion}" />
|
| - |
|
69 |
|
| - |
|
70 |
</target>
|
| - |
|
71 |
|
| - |
|
72 |
<target name="clean" depends="ant-clean-task.clean" description="Deletes previously built artifacts." />
|
| - |
|
73 |
|
| - |
|
74 |
<target name="release" depends="ant-release-task.release" description="Release the artifacts to dpkg_archive." />
|
| 129 |
</project>
|
75 |
</project>
|
| - |
|
76 |
|