-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.xml
343 lines (326 loc) · 15.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<project name="streamsx.topology" default="all" >
<description>
Build the Streams Java functional api.
</description>
<import file="common-build.xml"/>
<property name="release.base" location="release-${ant.project.name}" />
<property name="streamsx.py" location="${tk.opt}/python/packages/streamsx"/>
<property name="gentk" location="test/python/scripts/sc_test_files/toolkits"/>
<target name="all">
<ant dir="java" inheritAll="true"/>
<ant dir="samples/java/functional" inheritAll="true"/>
<ant dir="toolkit" inheritAll="true"/>
<ant dir="samples/python" inheritAll="true"/>
<ant dir="test/java" inheritAll="true"/>
<ant dir="test/python" inheritAll="true"/>
<ant dir="test/python/rest/toolkits" inheritAll="true"/>
</target>
<target name="clean" >
<ant dir="java" target="clean"/>
<ant dir="python" target="clean"/>
<ant dir="samples/java/functional" target="clean"/>
<ant dir="samples/python" target="clean"/>
<ant dir="toolkit" target="clean"/>
<ant dir="test/java" target="clean"/>
<ant dir="test/python/rest/toolkits" target="clean"/>
<ant dir="test/release" target="clean"/>
<delete dir="${tk.doc}/javadoc"/>
<delete dir="${tk.doc}/spldoc"/>
<delete dir="${tk.doc}/scaladoc"/>
<delete dir="${tk.doc}/pythondoc"/>
<delete dir="${tk}/impl/nl/include"/>
<delete>
<fileset dir="${tk}/impl/nl" includes="*.dat"/>
</delete>
<delete dir="${release.base}"/>
<delete>
<fileset dir="${tk.opt}/python/templates/common" includes="py_pyTupleTosplTuple.cgt,py_splTupleCheckForBlobs.cgt,py_disallow_cr_trigger.cgt,py_enable_cr.cgt,py_no_checkpoint_support.cgt,pyversion2.sh,pyversion3.sh,splpy.pm,py_state.cgt"/>
</delete>
<delete dir="test/spl/testtk/impl/java/lib"/>
<delete>
<fileset dir="test/spl/testtk/testspl/ScOptionTester" includes="*.pm"/>
</delete>
<delete>
<fileset dir="test/python/spl/testtkpy" includes="info.xml"/>
</delete>
<delete>
<fileset dir="test/python/spl/testtkpy/opt/python/streams" includes="spl_kwargs.py,spl_samples.py,spl_sources.py"/>
</delete>
<delete includeemptydirs="true">
<fileset dir="." includes="**/__pycache__/**"/>
</delete>
<delete includeemptydirs="true">
<fileset dir="test" includes="**/job*.tar.gz"/>
</delete>
<delete dir="samples/java/functional/javadoc"/>
<delete>
<fileset dir="samples/python/com.ibm.streamsx.topology.pysamples/opt/python/streams" includes=".lockfile"/>
</delete>
<delete dir="${tk}/com.ibm.streamsx.topology.file/DirectoryWatcher"/>
<delete dir="${tk}/com.ibm.streamsx.topology.file/TextFileReader"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/Aggregate"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/FlatMap"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/FunctionPeriodicSource"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/HashRemover"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/Map"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/PassThrough"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/Split"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/Filter"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/ForEach"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/HashAdder"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/ToSPL"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/Source"/>
<delete dir="${tk}/com.ibm.streamsx.topology.functional.java/Join"/>
<delete>
<fileset dir="${tk}/com.ibm.streamsx.topology.functional.python" includes="**/*.pm"/>
</delete>
<delete>
<fileset dir="test/python/spl/tk17/com.ibm.streamsx.topology.pytest.tk17" includes="**/M*.pm"/>
</delete>
<delete dir="${tk}/com.ibm.streamsx.topology.testing/TesterSink"/>
<delete dir="${tk}/com.ibm.streamsx.topology.testing.consistent/Resetter"/>
<delete>
<fileset dir="test/python/spl/testtkpy/opt/python/streams" includes=".lockfile"/>
</delete>
<delete>
<fileset dir="test/java" includes="jacoco.exec"/>
</delete>
<delete>
<fileset dir="." includes="jacoco.exec"/>
</delete>
<delete>
<fileset dir="." includes="*.asc"/>
</delete>
<delete dir="test/java/unittest"/>
<delete>
<fileset dir="test/python/spl/testtkpy" includes="toolkit.xml"/>
</delete>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.mt"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pykwargs"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pymap.opttype"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pysource.opttype"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pysamples.kwargs"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pysamples.positional"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pysamples.sources"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.checkpoint"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pyexceptions"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pymap"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pyprimitives"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pysource"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pytypes"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pyvers"/>
<delete dir="test/python/spl/testtkpy/impl"/>
<delete dir="test/python/spl/testtkpy/opt/.splpy"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pyec/PyTestMetrics"/>
<delete dir="test/python/spl/testtkpy/com.ibm.streamsx.topology.pytest.pyec/PyTestOperatorContext"/>
<delete>
<fileset dir="test/python/topology" includes="*.sab,*.json,*.out,*.txt"/>
</delete>
<delete>
<fileset dir="test/python/spl/tests" includes="*.sab,*.json"/>
</delete>
<delete>
<fileset dir="test/python" includes="*.sab,*JobConfig.json"/>
</delete>
<delete>
<fileset dir="test/python/scripts/spl_app" includes="toolkit.xml"/>
</delete>
<delete>
<fileset dir="test/python/scripts/sc_test_files" includes="test_sc_old_toolkit_name.txt"/>
</delete>
<delete includeemptydirs="true">
<fileset dir="test/python/scripts/sc_test_files/apps/" includes="test_app_*/output"/>
</delete>
<delete includeemptydirs="true">
<fileset dir="test/python/scripts/sc_test_files/apps/" includes="test_app_*/info.xml"/>
</delete>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_1/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_2/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_3/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_4/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_5/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_6/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_7/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_8/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_9/samplemain"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_1/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_2/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_3/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_4/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_5/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_6/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_7/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_8/output"/>
<delete dir="test/python/scripts/sc_test_files/apps/test_app_9/output"/>
<delete includeemptydirs="true">
<fileset dir="test/python/scripts/sc_test_files/toolkits/" includes="test_tk_*/info.xml,test_tk_*/toolkit.xml"/>
</delete>
<exec executable="./delete_test_sc_files.sh" failonerror="false" dir="test/python/scripts/sc_test_files/toolkits">
</exec>
<delete>
<fileset dir="test/python/scripts" includes="jobconfig.json"/>
</delete>
<delete dir="test/python/unittests"/>
<delete>
<fileset dir="test/python/spl/testtkpy_pip_op" includes="info.xml,toolkit.xml"/>
</delete>
<delete dir="test/python/spl/testtkpy_pip_op/impl"/>
<delete dir="test/python/spl/testtkpy_pip_op/com.ibm.streamsx.topology.pytest.pypip"/>
<delete dir="test/python/spl/testtkpy_pip_op/opt/.splpy"/>
<delete>
<fileset dir="test/python/spl/testtkpy_pip_toolkit" includes="info.xml,toolkit.xml"/>
</delete>
<delete dir="test/python/spl/testtkpy_pip_toolkit/impl"/>
<delete dir="test/python/spl/testtkpy_pip_toolkit/com.ibm.streamsx.topology.pytest.pypip"/>
<delete dir="test/python/spl/testtkpy_pip_toolkit/opt/.splpy"/>
<delete>
<fileset dir="test/python/spl" includes="**/.lockfile"/>
</delete>
<delete>
<fileset dir="test/python/spl/translation" includes="toolkit.xml"/>
</delete>
<delete dir="test/python/spl/translation//opt/.splpy"/>
<delete dir="test/python/spl/translation/doc"/>
<delete dir="test/python/spl/translation/impl"/>
<delete dir="test/python/spl/translation/com.ibm.streamsx.topology.pysamples.positional"/>
<delete dir="test/python/spl/translation/output"/>
<delete dir="test/python/spl/translation/logs"/>
<delete>
<fileset dir="test/spl/tests/" includes="*.sab,*.json"/>
</delete>
</target>
<target name="test" depends="test.quick">
</target>
<target name="test.rest">
<ant dir="test/python" target="test.rest" inheritAll="true"/>
</target>
<target name="test.python">
<ant dir="test/python" target="test.distributed" inheritAll="true"/>
</target>
<target name="test.quick">
<ant dir="test/java" inheritAll="true">
<target name="unittest.standalone"/>
<!--target name="junit.report"/-->
</ant>
</target>
<target name="test.report" >
<ant dir="test/java">
<target name="junit.report"/>
</ant>
</target>
<!-- Release targets !-->
<path id="javadoc.classpath">
<path location="${tk.lib}/com.ibm.streamsx.topology.jar"/>
<path refid="streams.classpath"/>
<path refid="tk.classpath"/>
<path location="${junit.jar}"/>
</path>
<target name="release" depends="clean,all,doc,create_release_bundle"/>
<target name="doc">
<mkdir dir="${tk.doc}"/>
<ant dir="samples/java/functional" target="doc"/>
<mkdir dir="${tk.doc}/samples/javadoc"/>
<copy todir="${tk.doc}/samples/javadoc">
<fileset dir="samples/java/functional/javadoc"/>
</copy>
<javadoc destdir="${tk.doc}/javadoc" classpathref="javadoc.classpath"
Overview="java/src/overview.html"
Windowtitle="Java Application API for IBM Streams"
Footer="streamsx.topology ${streamsx.topology.version} @ IBMStreams GitHub"
failonerror="yes"
additionalparam="-Xdoclint:none"
>
<packageset dir="java/src">
<exclude name="com/ibm/streamsx/topology/context/remote/**"/>
<exclude name="com/ibm/streamsx/topology/internal/**"/>
<exclude name="com/ibm/streamsx/topology/builder/**"/>
<exclude name="com/ibm/streamsx/topology/generator/**"/>
</packageset>
<packageset dir="java/runtime/src">
<include name="com/ibm/streamsx/topology/**"/>
<exclude name="com/ibm/streamsx/topology/internal/**"/>
</packageset>
</javadoc>
<ant dir="toolkit" target="spldoc"/>
<ant dir="scala" target="scaladoc"/>
<ant dir="python" target="pythondoc"/>
</target>
<target name="create_release_bundle">
<tstamp/>
<property name="release.dir" location="${release.base}" />
<mkdir dir="${release.dir}" />
<property name="releasefilename" value="${release.dir}/streamsx.topology-v${streamsx.topology.version}-${DSTAMP}-${TSTAMP}.tgz"/>
<tar compression="gzip" longfile="gnu" destfile="${releasefilename}">
<tarfileset dir="${basedir}" filemode="755" >
<include name="**/pyversion*.sh"/>
<exclude name="test/**"/>
</tarfileset>
<tarfileset dir="${basedir}" >
<include name="com.ibm.streamsx.topology/**"/>
<include name="samples/**"/>
<exclude name="**/.gitignore"/>
<exclude name="**/pyversion*.sh"/>
<exclude name="test/**"/>
</tarfileset>
</tar>
<checksum file="${releasefilename}"/>
<checksum algorithm="sha1" file="${releasefilename}"/>
</target>
<target name="prepare_mvn_files">
<property name="release.dir" location="${release.base}" />
<exec executable="/bin/sh"
dir="${release.dir}">
<arg value="-c"/>
<arg value="rm -rf maven; mkdir maven"/>
</exec>
<jar destfile = "${release.dir}/maven/topology-sources.jar">
<fileset dir="java/src" excludes="**/*.class, log4j.properties, overview.html"/>
<fileset dir="java/runtime/src" excludes="**/*.class"/>
<fileset dir="java/execute/src" excludes="**/*.class"/>
</jar>
<jar destfile = "${release.dir}/maven/topology-javadoc.jar">
<fileset dir="com.ibm.streamsx.topology/doc/javadoc"/>
</jar>
<exec executable="/bin/sh"
dir="${release.dir}">
<arg value="-c"/>
<arg value="cp streamsx.topology*.tgz maven/streamsx.topology.tgz"/>
</exec>
<exec executable="/bin/sh"
dir=".">
<arg value="-c"/>
<arg value="cp com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar ${release.dir}/maven/com.ibm.streamsx.topology.jar"/>
</exec>
</target>
<target name="maven-deploy" depends="prepare_mvn_files,nomaven" if="env.M2_HOME">
<exec executable="mvn" failonerror="true">
<arg value="-B"/>
<arg value="gpg:sign-and-deploy-file"/>
<arg value="-Dfile=release-streamsx.topology/maven/com.ibm.streamsx.topology.jar"/>
<arg value="-Dsources=release-streamsx.topology/maven/topology-sources.jar"/>
<arg value="-Djavadoc=release-streamsx.topology/maven/topology-javadoc.jar"/>
<arg value="-DpomFile=release-pom.xml"/>
<arg value="-DrepositoryId=ossrh"/>
<arg value="-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/"/>
</exec>
<exec executable="mvn" failonerror="true">
<arg value="-B"/>
<arg value="gpg:sign-and-deploy-file"/>
<arg value="-Dfile=release-streamsx.topology/maven/streamsx.topology.tgz"/>
<arg value="-DpomFile=release-pom.xml"/>
<arg value="-Dpackaging=tgz"/>
<arg value="-Dclassifier=toolkit"/>
<arg value="-DrepositoryId=ossrh"/>
<arg value="-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/"/>
</exec>
</target>
<!-- Prints a message if no maven is found. -->
<target name="nomaven" unless="env.M2_HOME">
<echo message="M2_HOME not found in environment"/>
</target>
<target name="get_name">
<echo message="Toolkit name: ${tkinfo.identity.name}"/>
<echo message="Toolkit full version: ${tkinfo.identity.version}"/>
<echo message="Toolkit version: ${streamsx.topology.version}"/>
</target>
</project>