forked from pentaho/pentaho-hadoop-shims
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
172 lines (149 loc) · 6.02 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!--===========================================================================
This is the build file for the collection of Shims modules to provide support
for multiple versions of Hadoop on the same set of compiled bits.
See ../build-res/subfloor.xml for more details
============================================================================-->
<project name="pentaho-hadoop-shims" basedir="." default="build-all">
<description>
This builds all modules within this directory (specifically as declared by ${modules}).
</description>
<!-- Import the common_build.xml file which contains all the default tasks -->
<import file="build-res/subfloor-pkg.xml"/>
<!-- Every non-api shim module. These will be compiled/resolved after api. -->
<property name="shim-non-api-modules" value="${build.modules.list}" />
<!-- These are the modules this script should build -->
<property name="modules" value="api,${shim-non-api-modules}" />
<!-- Publish shims locally or publicly? -->
<property name="shims.publish-local"
value="true"
description="Whether to publish plugins locally during the build process. CI should override this"/>
<target name="init" depends="install-antcontrib" />
<!-- Build all modules in the correct order and publish them locally -->
<target name="build-all" depends="install-antcontrib,init">
<condition property="publish.target" value="publish-local" else="publish">
<equals arg1="${shims.publish-local}" arg2="true" />
</condition>
<ant antfile="build.xml" dir="api" inheritall="false">
<target name="clean-all" />
<target name="resolve" />
<target name="${publish.target}" />
</ant>
<for list="${shim-non-api-modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false">
<target name="clean-all" />
<target name="resolve" />
<target name="dist" />
<target name="${publish.target}" />
</ant>
</sequential>
</for>
</target>
<!-- Runs "clean-all" on the modules defined in the property "modules" -->
<target name="clean-all" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="clean-all" />
</sequential>
</for>
</target>
<!-- Clean all the modules defined in the property "modules" -->
<target name="clean" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="clean" />
</sequential>
</for>
</target>
<!-- Clean all the modules defined in the property "modules" -->
<target name="jar" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false">
<target name="jar" />
</ant>
</sequential>
</for>
</target>
<!-- All following targets are wrappers for all modules -->
<target name="resolve" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="resolve" />
</sequential>
</for>
</target>
<target name="test" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="test" />
</sequential>
</for>
</target>
<target name="cobertura" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="cobertura" />
</sequential>
</for>
</target>
<target name="publish-local" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="publish-local" />
</sequential>
</for>
</target>
<target name="publish" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="publish" />
</sequential>
</for>
</target>
<target name="package-eula" depends="install-antcontrib,init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="package-eula" />
</sequential>
</for>
</target>
<target name="dist-source" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="source.jar" />
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="source.zip" />
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="source.targz" />
</sequential>
</for>
</target>
<target name="dist" depends="init, build-all"/>
<target name="continuous" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="subfloor.continuous" />
</sequential>
</for>
</target>
<target name="continuous-sonar" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="subfloor.continuous-sonar" />
</sequential>
</for>
</target>
<target name="jacoco" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="jacoco" />
</sequential>
</for>
</target>
<target name="ivy-report" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" inheritall="false" target="ivy-report" />
</sequential>
</for>
</target>
</project>