forked from pentaho/pentaho-reporting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
226 lines (192 loc) · 8.6 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!--===========================================================================
This is the build file for the collection of Shims modules to provide support
============================================================================-->
<project name="multimodule-build">
<description>
This builds all modules within this directory (specifically as declared by ${modules}).
</description>
<property file="${user.home}/.pentaho-reporting-build-settings.properties"
description="Per user override settings-file for all pentaho-reporting projects." />
<property file="build.properties" description="Module declaration." />
<property name="subfloor.resources.dir"
value="${user.home}/.subfloor"
description="Base dir for runtime jars that are required exclusively by the build process" />
<property name="subfloor.tmp.dir"
value="${subfloor.resources.dir}/tmp"
description="Temporary space where files are prepared for installation" />
<property name="antcontrib.build.cache.dir"
value="${subfloor.resources.dir}/ant-contrib"
description="Directory where the Ant-Contrib jar (and dependencies) is placed after it is auto-downloaded by the build" />
<!-- These are the modules this script should build in the proper order-->
<!-- EXAMPLE: "core,extensions,extensions-cda,extensions-charting,extensions-drilldown,extensions-hibernate,extensions-kettle,extensions-mondrian,extensions-olap4j,extensions-openerp,extensions-pentaho-metadata,extensions-sampledata,extensions-scripting,extensions-toc,extensions-xpath,extensions-xquery,legacy-charts,legacy-functions,extensions-reportdesigner-parser,demo,samples" -->
<property name="modules" value="DEFINE_ME" />
<!--=======================================================================
install-antcontrib
(Fetches and) installs ant-contrib tasks.
====================================================================-->
<target name="install-antcontrib" depends="antcontrib.download-check">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<fileset dir="${antcontrib.build.cache.dir}">
<include name="*.jar" />
</fileset>
</classpath>
</taskdef>
</target>
<!--=======================================================================
antcontrib.download-check
Fetches ant-contrib from sourceforge if it is not already present
====================================================================-->
<target name="antcontrib.download-check">
<condition property="antcontrib.available">
<and>
<available file="${antcontrib.build.cache.dir}" />
<available classname="net.sf.antcontrib.logic.IfTask">
<classpath>
<fileset dir="${antcontrib.build.cache.dir}">
<include name="*.jar" />
</fileset>
</classpath>
</available>
</and>
</condition>
<antcall target="antcontrib.download" />
</target>
<!--=======================================================================
antcontrib.download
Fetches ant-contrib from sourceforge
====================================================================-->
<target name="antcontrib.download" unless="antcontrib.available">
<mkdir dir="${subfloor.tmp.dir}" />
<get src="http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b3-bin.zip"
dest="${subfloor.tmp.dir}/antcontrib.zip"
usetimestamp="true" />
<unzip src="${subfloor.tmp.dir}/antcontrib.zip" dest="${subfloor.tmp.dir}">
<patternset>
<include name="**/*.jar" />
</patternset>
</unzip>
<copy todir="${antcontrib.build.cache.dir}">
<fileset dir="${subfloor.tmp.dir}/ant-contrib">
<include name="**/*.jar" />
</fileset>
</copy>
</target>
<target name="init" depends="install-antcontrib" />
<!-- 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" 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}" useNativeBasedir="true" inheritall="false" target="publish" />
</sequential>
</for>
</target>
<target name="dist" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="dist" />
</sequential>
</for>
</target>
<target name="continuous" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="continuous" />
</sequential>
</for>
</target>
<target name="continuous-testless" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="continuous-testless" />
</sequential>
</for>
</target>
<target name="continuous-local" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="continuous-local" />
</sequential>
</for>
</target>
<target name="continuous-local-testless" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="continuous-local-testless" />
</sequential>
</for>
</target>
<target name="longrun-cobertura" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="longrun-cobertura">
<property name="junit.sysprop.org.pentaho.reporting.engine.classic.test.ExeuteLongRunningTest" value="true"/>
<property name="basedir" value="${basedir}/@{module}"/>
</ant>
</sequential>
</for>
</target>
<target name="longrun-test" depends="init">
<for list="${modules}" param="module" trim="true">
<sequential>
<ant antfile="build.xml" dir="@{module}" useNativeBasedir="true" inheritall="false" target="longrun-test">
<property name="junit.sysprop.org.pentaho.reporting.engine.classic.test.ExeuteLongRunningTest" value="true"/>
</ant>
</sequential>
</for>
</target>
</project>