forked from IBMStreams/streamsx.topology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
143 lines (122 loc) · 5.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
<project name="streamsx.topology" default="all" >
<description>
Build the Streams Java functional api.
</description>
<!-- Python build is currently disabled unless -Dtopology.python is set -->
<import file="common-build.xml"/>
<property name="release.base" location="release-${ant.project.name}" />
<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"/>
</target>
<target name="clean" >
<ant dir="java" target="clean"/>
<ant dir="samples/java/functional" target="clean"/>
<ant dir="toolkit" target="clean"/>
<ant dir="test/java" target="clean"/>
<delete dir="${tk}/doc/javadoc"/>
<delete dir="${tk}/doc/spldoc"/>
<delete dir="${tk}/doc/scaladoc"/>
<delete dir="${tk}/doc/pydoc"/>
<delete dir="${release.base}"/>
</target>
<target name="test" >
<ant dir="test/java" inheritAll="true">
<target name="unittest"/>
<target name="junit.report"/>
<target name="coverage.report"/>
</ant>
</target>
<target name="test.quick" >
<ant dir="test/java" inheritAll="true">
<target name="unittest.quick"/>
<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>
<target name="release" depends="clean,all,doc,create_release_bundle"/>
<target name="doc" depends="checkJava8">
<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"
failonwarning="yes"
additionalparam="${disableJavadocLint}"
>
<fileset dir="java/src">
<include name="com/ibm/streamsx/topology/**"/>
<exclude name="com/ibm/streamsx/topology/internal/**"/>
<exclude name="com/ibm/streamsx/topology/builder/**"/>
<exclude name="com/ibm/streamsx/topology/generator/spl/**"/>
</fileset>
</javadoc>
<ant dir="toolkit" target="spldoc"/>
<ant dir="scala" target="scaladoc"/>
<antcall target="pydoc"/>
</target>
<target name="pydoc" if="topology.python">
<mkdir dir="${tk}/doc/pydoc"/>
<!-- Copy streamsx directory !-->
<copy todir="${tk}/doc/pydoc">
<fileset dir="${tk}/opt/python/packages">
<exclude name="**/spl/**"/>
<exclude name="**/runtime.py"/>
<exclude name="**/splpy_setup.py"/>
</fileset>
</copy>
<!-- Use "pydoc3 -w ./" to generate html for entire directory !-->
<exec executable="pydoc3" dir="${tk}/doc/pydoc">
<arg value="-w"/>
<arg value="./"/>
</exec>
<!-- Delete temporary directory !-->
<delete dir="${tk}/doc/pydoc/streamsx"/>
<!-- pydoc generated html files have absolute path file links; remove them !-->
<replaceregexp match="\<a href=\"file:(.*?)\</a\>" replace="" flags="g">
<fileset dir="${tk}/doc/pydoc" includes="**/*.html"/>
</replaceregexp>
<!-- pydoc generated html files have broken links to standard libraries; change links to text !-->
<replaceregexp match="\<a href=\"(?!(streamsx(.*?)\.html|#(.*?)|\.)).*?\"\>(.*?)\</a\>" replace="\4" flags="g">
<fileset dir="${tk}/doc/pydoc" includes="**/*.html"/>
</replaceregexp>
</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-v1.4-${DSTAMP}-${TSTAMP}.tgz"/>
<tar compression="gzip" longfile="gnu" destfile="${releasefilename}">
<tarfileset dir="${basedir}" filemode="755" >
<include name="**/pyversion.sh"/>
</tarfileset>
<tarfileset dir="${basedir}" >
<include name="com.ibm.streamsx.topology/**"/>
<include name="samples/**"/>
<exclude name="**/.gitignore"/>
<exclude name="**/pyversion.sh"/>
</tarfileset>
</tar>
<checksum file="${releasefilename}"/>
<checksum algorithm="sha1" file="${releasefilename}"/>
</target>
</project>