-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
83 lines (66 loc) · 3.4 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
<?xml version="1.0" encoding="utf-8" ?>
<!--
(c) Copyright IBM Corporation 2014, 2017.
This is licensed under the following license.
The Eclipse Public 1.0 License (http://www.eclipse.org/legal/epl-v10.html)
U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
-->
<project name="smtp-email" default="all" basedir="."
xmlns:codestation="antlib:com.urbancode.codestation2.client">
<property environment="env"/>
<property file=".build.properties"/>
<defaultexcludes add="**/.ahs.*"/>
<defaultexcludes add="**/*.bom"/>
<!-- AHP settings -->
<property name="ahp.branch" value="air" />
<property name="ahp.project.name" value="${ant.project.name}" />
<!-- =================================================== -->
<!-- PROJECT STRUCTURE -->
<!-- =================================================== -->
<property name="lib.dir" location="lib" />
<!-- =================================================== -->
<!-- MACROS -->
<!-- =================================================== -->
<macrodef name="emptyDir" description="Ensure that the target directory exists and is empty">
<attribute name="dir"/>
<attribute name="excludes" default=""/>
<sequential>
<mkdir dir="@{dir}"/>
<delete dir="@{dir}" includes="*/**" excludes="@{excludes}" includeemptydirs="true" defaultexcludes="false"/>
</sequential>
</macrodef>
<!-- =================================================== -->
<!-- TARGETS -->
<!-- =================================================== -->
<target name="dist" depends="resolve" description="Create distribution">
<ant antfile="plugin-build.xml" target="dist" inheritall="true"/>
</target>
<target name="all" depends="resolve">
<ant antfile="plugin-build.xml" target="all" inheritall="true"/>
</target>
<target name="clean" description="Cleans build output">
<emptyDir dir="${lib.dir}" excludes="ext/**"/>
<ant antfile="plugin-build.xml" target="clean" inheritall="true"/>
</target>
<target name="resolve" unless="resolve.no" description="Resolve all dependencies">
<mkdir dir="${lib.dir}"/>
<codestation:resolve
buildLife="${env.AH_BUILD_LIFE_ID}"
xmlFile="dependencies.xml"/>
</target>
<target name="publish" unless="publish.no"
description="Build artifacts and publish them to codestation">
<codestation:publish project="${ahp.project.name}"
workflow="${ahp.workflow.name}"
publishall="true"/>
</target>
<!-- =================================================== -->
<!-- TEST TARGETS -->
<!-- =================================================== -->
<target name="run-tests" depends="resolve" unless="tests.no">
<ant antfile="plugin-build.xml" target="run-tests" inheritall="true"/>
</target>
<target name="run-single-test" depends="resolve" unless="tests.no">
<ant antfile="plugin-build.xml" target="run-single-test" inheritall="true"/>
</target>
</project>