-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
99 lines (84 loc) · 3.78 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8"?>
<!-- *******************************************************************
**
** NAME
** build.xml
**
** PURPOSE
** This ANT script calls the dpdirect buildscript 'dp-build'.
**
** PARAMETERS
** release.build.dir == Contains the built deployment artifacts, this will be a temporary working directory
** == Default behaviour is to create a release dir in the deploy dir
**
** OPTIONAL PARMS
** component.list == Comma delimeted list of components to build. Default is all
**
** EXAMPLES
** ant (builds to deploy/release)
** ant -Drelease.build.dir=C:/TEMP/release
**
** MODIFICATIONS DATE DETAILS
** Tim Goodwill 2012.11.26 Initial script
**
******************************************************************** -->
<project name="build" default="distribution">
<!-- === PROPERTIES ===================================================================================== -->
<!-- Default locations -->
<property name="project.dir" location="${basedir}"/>
<property name="build.dir" location="${basedir}/ant-build"/>
<property name="release.dir" location="${basedir}/distribution/target"/>
<property name="release.build.dir" location="${release.dir}/release"/>
<property name="deploy.dir" location="${basedir}/ant-deploy"/>
<property name="release.zip.name" value="distribution-deploy.zip"/>
<!-- Default parameters -->
<condition property="type" value="file">
<isset property="file"/>
</condition>
<condition property="type" value="dir">
<isset property="dir"/>
</condition>
<property name="type" value="all"/>
<!-- === DEPLOY TARGETS ================================================================================= -->
<!-- **********************************************************
** target: distribution
**
** PURPOSE
** This target is called to initiate the build.
** The target will parametize and package, then validate the package.
****************************************************************** -->
<target name="distribution"
description="Builds dpdirect deployable artifacts from source.
** OPTIONAL PARAMETERS: release.build.dir == Contains the built deployment artifacts, this will be a temporary working directory.
Default behaviour is to create a release dir in the deploy dir.
** EXAMPLES: 'ant' or 'ant -Drelease.build.dir=C:/TEMP/release'"
depends="package">
<!-- create deployable archive -->
<zip destfile="${release.dir}/${release.zip.name}"
basedir="${release.build.dir}"
excludes="${release.zip.name},**/*_ServiceConfig.xml.xcfg,**/*Template.xcfg"/>
</target>
<target name="package"
description="Builds dpdirect deployable artifacts from source.
** OPTIONAL PARAMETERS: release.build.dir == Contains the built deployment artifacts, this will be a temporary working directory.
Default behaviour is to create a release dir in the deploy dir.
** EXAMPLES: 'ant' or 'ant -Drelease.build.dir=C:/TEMP/release'">
<mkdir dir="${release.build.dir}"/>
<delete includeemptydirs="true">
<fileset dir="${release.build.dir}" includes="**/*"/>
</delete>
<!-- Call the dp-build.xml buildfile to package dpdirect artifacts for deployment -->
<subant target="package.components" inheritall="true" inheritrefs="true">
<fileset dir="${build.dir}" includes="dp-build.xml"/>
<property name="basedir" value="${deploy.dir}"/>
<property name="project.dir" value="${project.dir}"/>
</subant>
</target>
<target name="deploy" depends="package">
<subant target="deploy" inheritall="true" inheritrefs="false" buildpath="${deploy.dir}/dp-deploy.xml">
<fileset dir="${deploy.dir}" includes="dp-deploy.xml"/>
<property name="basedir" value="${deploy.dir}"/>
<property name="project.dir" value="${project.dir}"/>
</subant>
</target>
</project>