/
build.xml
101 lines (85 loc) · 3.41 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
99
100
<?xml version="1.0"?>
<project name="master" default="distToDist">
<import file="01_conf/properties.xml"/>
<description>Master build file</description>
<!--+=========================================================================================+-->
<!--+ Targets for children +-->
<!--+ Not nice but easy to use and we keep all the targets from the master build +-->
<!--+=========================================================================================+-->
<target name="-delegate" description="Delegates target to children">
<fail unless="target">Wrong usage: $ant -Dtarget=<target_name></fail>
<ant dir="${projects.dir}/mystery/" target="${target}" inheritAll="false"/>
<ant dir="${projects.dir}/bytecode/" target="${target}" inheritAll="false"/>
</target>
<target name="nop" description="Checks projects build">
<antcall target="-delegate">
<param name="target" value="nop"/>
</antcall>
</target>
<target name="clean" description="Removes directory: 02_build">
<antcall target="-delegate">
<param name="target" value="clean"/>
</antcall>
</target>
<target name="clean-dist" description="Removes directory: 03_dist">
<antcall target="-delegate">
<param name="clean-dist" value="clean-dist"/>
</antcall>
</target>
<target name="clean-test"
description="Removes directories: 02_build/[test-classes & junit-data & junit-reports]">
<antcall target="-delegate">
<param name="target" value="clean-test"/>
</antcall>
</target>
<target name="clean-all"
description="Removes directories: 02_build & 03_dist">
<antcall target="-delegate">
<param name="target" value="clean-all"/>
</antcall>
</target>
<target name="assemble" description="Assembles pjb files">
<antcall target="-delegate">
<param name="target" value="assemble"/>
</antcall>
</target>
<target name="compile" description="Compiles Main">
<antcall target="-delegate">
<param name="target" value="compile"/>
</antcall>
</target>
<target name="test-compile" description="Compiles Test">
<antcall target="-delegate">
<param name="target" value="test-compile"/>
</antcall>
</target>
<target name="test" description="Executes Unit Tests">
<antcall target="-delegate">
<param name="target" value="test"/>
</antcall>
</target>
<target name="archive" description="Creates a JAR file">
<antcall target="-delegate">
<param name="target" value="archive"/>
</antcall>
</target>
<!--+=========================================================================================+-->
<!--+ Targets for master +-->
<!--+=========================================================================================+-->
<target name="clean-archives" description="Removes directory: 04_archives">
<delete dir="${archives.dir}" />
</target>
<target name="-init-archives">
<mkdir dir="${archives.dir}" />
</target>
<target name="distToDist" depends="-init-archives" description="Copy all generated JARs to 04_archives">
<antcall target="-delegate">
<param name="target" value="archive"/>
</antcall>
<copy todir="${archives.dir}" flatten="true">
<fileset dir="${projects.dir}">
<include name="**/${dist.dir_str}/*.jar" />
</fileset>
</copy>
</target>
</project>