forked from pentaho/pentaho-hadoop-shims
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
121 lines (105 loc) · 4.51 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
<!--===========================================================================
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"/>
<!-- These are the modules this script should build -->
<property name="modules" value="api,hive-jdbc,hadoop-20,cdh3u4,cdh4,cdh412,cdh413,cdh42,cdh50,hdp12,hdp13,hdp20,idh23,mapr,mapr21,mapr212,mapr213,mapr30" />
<!-- Every non-api shim module. These will be compiled/resolved after api. -->
<property name="shim-non-api-modules" value="hive-jdbc,hadoop-20,cdh3u4,cdh4,cdh412,cdh413,cdh42,cdh50,hdp12,hdp13,hdp20,idh23,mapr,mapr21,mapr212,mapr213,mapr30" />
<!-- 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="dist" depends="init, build-all"/>
</project>