-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
135 lines (120 loc) · 5.38 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
<project name="streamsx.eventstore" default="all" basedir=".">
<!--
// *******************************************************************************
// * Copyright (C)2019, International Business Machines Corporation and *
// * others. All Rights Reserved. *
// *******************************************************************************
-->
<description>
Build file for streamsx.eventstore project to build the toolkit and samples.
</description>
<!-- set global properties for this build -->
<property environment="env" />
<fail unless="env.STREAMS_INSTALL" message="STREAMS_INSTALL not set."/>
<property name="streams.install" value="${env.STREAMS_INSTALL}" />
<property name="toolkit" location="com.ibm.streamsx.eventstore"/>
<property name="test.dir" location="tests/spl-test"/>
<property name="tmp" location="tmp" />
<property name="toolkit.test" location="tests/spl-test" />
<target name="all" depends="toolkit,spldoc"/>
<target name="clean" depends="cleansamples" description="clean up" >
<delete includeemptydirs="true">
<fileset dir="${basedir}" includes="tmp/"/>
</delete>
<delete includeemptydirs="true">
<fileset dir="${toolkit}" includes="doc/en_US"/>
</delete>
<ant dir="${toolkit}" target="clean"/>
<ant dir="${test.dir}" target="clean"/>
</target>
<target name="distclean" depends="clean" description="Clean all, inclusive maven downloads" >
<ant dir="${toolkit}" target="distclean"/>
</target>
<target name="toolkit"
description="Build any code and index the toolkit." >
<ant dir="${toolkit}" target="all"/>
</target>
<target name="toolkitIndexOnly" description="Index the toolkit.">
<ant dir="${toolkit}" target="indexToolkit" />
</target>
<target name="spldoc" depends="toolkit"
description="Create SPLDOC">
<antcall target="spldoctoolkit">
<param name="tkdir" value="${toolkit}"/>
<param name="tktitle" value="IBMStreams streamsx.eventstore Toolkit"/>
</antcall>
</target>
<target name="samples" depends="toolkit">
<subant target="indextoolkit" genericantfile="${basedir}/build.xml">
<dirset dir="samples" includes="*"/>
</subant>
</target>
<target name="cleansamples">
<exec executable="make" failonerror="true" dir="${basedir}/samples">
<arg value="-f" />
<arg value="Makefile" />
<arg value="clean" />
</exec>
</target>
<target name="test" depends="build-all-samples">
<ant dir="${toolkit.test}" target="test"/>
</target>
<target name="build-all-samples" depends="toolkit">
<exec executable="make" failonerror="true" dir="${basedir}/samples">
<arg value="-f" />
<arg value="Makefile" />
<arg value="all" />
</exec>
</target>
<target name="indextoolkit">
<echo message="Tookit to index: ${basedir}"/>
<exec executable="${streams.install}/bin/spl-make-toolkit" failonerror="true">
<arg value="--directory"/>
<arg value="${basedir}"/>
<arg value="-m"/>
</exec>
</target>
<target name="cleantoolkit">
<echo message="Tookit to clean: ${basedir}"/>
<exec executable="${streams.install}/bin/spl-make-toolkit">
<arg value="--clean"/>
<arg value="--directory"/>
<arg value="${basedir}"/>
</exec>
<delete dir="${basedir}/output" quiet="true"/>
</target>
<target name="spldoctoolkit">
<property name="tkdir" value="${basedir}"/>
<echo message="Toolkit to SPLDOC: ${tkdir}"/>
<exec executable="${streams.install}/bin/spl-make-doc">
<arg value="--include-composite-operator-diagram"/>
<arg value="--copy-image-files"/>
<arg value="--author"/>
<arg value="IBMStreams Open Source Community at GitHub - https://github.com/IBMStreams/${ant.project.name}"/>
<arg value="--doc-title"/>
<arg value="${tktitle}"/>
<arg value="--directory"/>
<arg value="${tkdir}"/>
<arg value="--output-directory"/>
<arg value="${tkdir}/doc/en_US/spldoc/"/>
</exec>
</target>
<!-- Targets to build releases -->
<target name="release" depends="clean,all">
<mkdir dir="${tmp}" />
<!-- Create the time stamp -->
<tstamp />
<!-- Extract info from the toolkit's info.xml -->
<xmlproperty file="${toolkit}/info.xml" prefix="tkinfo" keepRoot="no" />
<echo message="Toolkit Version: ${tkinfo.info:identity.info:version}" />
<property name="releasefilename" value="${tmp}/streamsx.eventstore.toolkits-${tkinfo.info:identity.info:version}-${DSTAMP}-${TSTAMP}.tgz" />
<tar compression="gzip" longfile="gnu"
destfile="${releasefilename}"
basedir="${basedir}"
includes="com.ibm.streamsx.eventstore/** samples/**"
excludes="**/.gitignore com.ibm.streamsx.eventstore/.settings/** com.ibm.streamsx.eventstore/impl/java/** com.ibm.streamsx.eventstore/src/** com.ibm.streamsx.eventstore/lib com.ibm.streamsx.eventstore/com.ibm.streamsx.eventstore/EventStoreSink/.gitkeep com.ibm.streamsx.eventstore/.project com.ibm.streamsx.eventstore/.gitignore com.ibm.streamsx.eventstore/.toolkitList com.ibm.streamsx.eventstore/recompile.sh com.ibm.streamsx.eventstore/pom.xml com.ibm.streamsx.eventstore/build.xml com.ibm.streamsx.eventstore/.classpat*"
/>
<checksum file="${releasefilename}"/>
<checksum algorithm="sha1" file="${releasefilename}"/>
</target>
</project>