-
Notifications
You must be signed in to change notification settings - Fork 259
/
build.xml
197 lines (186 loc) · 15.4 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
<project name="esper" default="info" basedir=".">
<!-- Name of project and version, used to create filenames -->
<property environment="env"/>
<property name="documentation.home" value="${env.ESPER_DOCHOME}"/>
<property name="name" value="esper"/>
<property name="version" value="9.0.0"/>
<property name="patchlevel" value=""/>
<property name="dist.dir" value="target"/>
<property name="fullversion" value="${version}${patchlevel}"/>
<property name="fullname" value="${name}-${fullversion}"/>
<property name="root.common" value="common"/>
<property name="root.common.avro" value="common-avro"/>
<property name="root.common.xmlxsd" value="common-xmlxsd"/>
<property name="root.compiler" value="compiler"/>
<property name="root.runtime" value="runtime"/>
<property name="root.examples" value="examples"/>
<property name="dist_excludes" value="
**/target/**,
**/intellij/**,
**/_classes/**,
**/benchmark/lib/*.jar,
**/terminalsvc-jse/lib/*.jar,
**/cycledetect/lib/*.jar,
**/antlr-*-complete.jar,
**/junit-*.jar,
**/mockito-*.jar,
**/junit.license,
**/hamcrest-*.jar,
**/mysql-connector-*.jar"/>
<target name="dist_zip" description="Zip up distribution">
<echo message="Building a zip for distribution ${documentation.home}" />
<property name="zip-file" value="${dist.dir}/${fullname}.zip"/>
<zip zipfile="${zip-file}">
<!-- Home Files -->
<zipfileset prefix="${name}-${version}" dir="." includes="esper-license.txt, changelog.txt, index.html, esper-3rdparty-licenses.txt"/>
<!-- Jar -->
<zipfileset prefix="${name}-${version}" dir="${root.common}/target" includes="esper-common-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="${root.compiler}/target" includes="esper-compiler-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="${root.runtime}/target" includes="esper-runtime-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="${root.common.avro}/target" includes="esper-common-avro-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="${root.common.xmlxsd}/target" includes="esper-common-xmlxsd-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-amqp/target" includes="esperio-amqp-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-csv/target" includes="esperio-csv-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-db/target" includes="esperio-db-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-http/target" includes="esperio-http-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-kafka/target" includes="esperio-kafka-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-socket/target" includes="esperio-socket-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio/esperio-springjms/target" includes="esperio-springjms-${version}.jar"/>
<!-- Esper Etc -->
<zipfileset prefix="${name}-${version}/etc" dir="${root.common}/etc" includes="*.xsd,*.xml"/>
<!-- Esper Dependencies -->
<zipfileset prefix="${name}-${version}/dependencies/compiler" dir="${root.common}/lib" includes="*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/compiler" dir="${root.compiler}/lib" includes="*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/runtime" dir="${root.common}/lib" includes="*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/runtime" dir="${root.runtime}/lib" includes="*.*" excludes="${dist_excludes}"/>
<!-- XML Optional Dependencies -->
<zipfileset prefix="${name}-${version}/dependencies/common-xmlxsd" dir="${root.common.xmlxsd}/lib" includes="*.*" excludes="${dist_excludes}"/>
<!-- EsperIO Dependencies -->
<zipfileset prefix="${name}-${version}/dependencies/esperio-amqp" dir="esperio/esperio-amqp" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/esperio-csv" dir="esperio/esperio-csv" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/esperio-http" dir="esperio/esperio-http" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/esperio-db" dir="esperio/esperio-db" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/esperio-socket" dir="esperio/esperio-socket" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/esperio-springjms" dir="esperio/esperio-springjms" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/dependencies/esperio-kafka" dir="esperio/esperio-kafka" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<!-- User Docs -->
<zipfileset prefix="${name}-${version}/doc/reference-esper" dir="${documentation.home}/esper-reference/target/docbook/publish/en-US" includes="**"/>
<zipfileset prefix="${name}-${version}/doc/reference-esperio" dir="${documentation.home}/esperio-reference/target/docbook/publish/en-US" includes="**"/>
<!-- Java Docs -->
<zipfileset prefix="${name}-${version}/doc/javadoc-esper" dir="doc/javadoc" includes="**"/>
<zipfileset prefix="${name}-${version}/doc/javadoc-common" dir="${root.common}/target/site/apidocs" includes="**"/>
<zipfileset prefix="${name}-${version}/doc/javadoc-compiler" dir="${root.compiler}/target/site/apidocs" includes="**"/>
<zipfileset prefix="${name}-${version}/doc/javadoc-runtime" dir="${root.runtime}/target/site/apidocs" includes="**"/>
<zipfileset prefix="${name}-${version}/doc/javadoc-esperio" dir="esperio/doc/javadoc" includes="**"/>
<!-- Site Docs -->
<zipfileset prefix="${name}-${version}/doc/site" dir="doc/site" includes="**"/>
<!-- Examples -->
<zipfileset prefix="${name}-${version}/examples" dir="${root.examples}" includes="**" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/examples" dir="${root.examples}" includes="**/target/*.jar,**/target/*.war,**/target/*.ear"/>
</zip>
<checksum file="${zip-file}" algorithm="MD5" fileext=".md5"/>
<checksum file="${zip-file}" algorithm="SHA" fileext=".asc"/>
</target>
<target name="dist_tar" description="Tar up distribution">
<property name="tar-file" value="${dist.dir}/${fullname}.tar"/>
<echo message="Building a tar for distribution" />
<fixcrlf srcdir="examples"
eol="lf"
eof="remove"
includes="**/*.sh"/>
<tar longfile="gnu" tarfile="${tar-file}">
<!-- Home Files -->
<tarfileset prefix="${name}-${version}" dir="." includes="esper-license.txt, changelog.txt, index.html, esper-3rdparty-licenses.txt"/>
<!-- Jar -->
<tarfileset prefix="${name}-${version}" dir="${root.common}/target" includes="esper-common-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="${root.compiler}/target" includes="esper-compiler-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="${root.runtime}/target" includes="esper-runtime-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="${root.common.avro}/target" includes="esper-common-avro-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="${root.common.xmlxsd}/target" includes="esper-common-xmlxsd-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-amqp/target" includes="esperio-amqp-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-csv/target" includes="esperio-csv-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-db/target" includes="esperio-db-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-http/target" includes="esperio-http-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-kafka/target" includes="esperio-kafka-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-socket/target" includes="esperio-socket-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio/esperio-springjms/target" includes="esperio-springjms-${version}.jar"/>
<!-- Esper Etc -->
<tarfileset prefix="${name}-${version}/etc" dir="${root.common}/etc" includes="*.xsd,*.xml"/>
<!-- Esper Dependencies -->
<tarfileset prefix="${name}-${version}/dependencies/compiler" dir="${root.common}/lib" includes="*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/compiler" dir="${root.compiler}/lib" includes="*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/runtime" dir="${root.common}/lib" includes="*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/runtime" dir="${root.runtime}/lib" includes="*.*" excludes="${dist_excludes}"/>
<!-- XML Optional Dependencies -->
<tarfileset prefix="${name}-${version}/dependencies/common-xmlxsd" dir="${root.common.xmlxsd}/lib" includes="*.*" excludes="${dist_excludes}"/>
<!-- EsperIO Dependencies -->
<tarfileset prefix="${name}-${version}/dependencies/esperio-amqp" dir="esperio/esperio-amqp" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/esperio-csv" dir="esperio/esperio-csv" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/esperio-http" dir="esperio/esperio-http" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/esperio-db" dir="esperio/esperio-db" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/esperio-socket" dir="esperio/esperio-socket" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/esperio-springjms" dir="esperio/esperio-springjms" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/dependencies/esperio-kafka" dir="esperio/esperio-kafka" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<!-- User Docs -->
<tarfileset prefix="${name}-${version}/doc/reference-esper" dir="${documentation.home}/esper-reference/target/docbook/publish/en-US" includes="**"/>
<tarfileset prefix="${name}-${version}/doc/reference-esperio" dir="${documentation.home}/esperio-reference/target/docbook/publish/en-US" includes="**"/>
<!-- Java Docs -->
<tarfileset prefix="${name}-${version}/doc/javadoc-esper" dir="doc/javadoc" includes="**"/>
<tarfileset prefix="${name}-${version}/doc/javadoc-common" dir="${root.common}/target/site/apidocs" includes="**"/>
<tarfileset prefix="${name}-${version}/doc/javadoc-compiler" dir="${root.compiler}/target/site/apidocs" includes="**"/>
<tarfileset prefix="${name}-${version}/doc/javadoc-runtime" dir="${root.runtime}/target/site/apidocs" includes="**"/>
<tarfileset prefix="${name}-${version}/doc/javadoc-esperio" dir="esperio/doc/javadoc" includes="**"/>
<!-- Site Docs -->
<tarfileset prefix="${name}-${version}/doc/site" dir="doc/site" includes="**"/>
<!-- Examples -->
<tarfileset prefix="${name}-${version}/examples" dir="${root.examples}" includes="**" excludes="${dist_excludes},**/*.sh"/>
<tarfileset prefix="${name}-${version}/examples" dir="${root.examples}" includes="**/target/*.jar,**/target/*.war,**/target/*.ear"/>
<tarfileset prefix="${name}-${version}/examples" dir="${root.examples}" mode="555" includes="**/*.sh" excludes="**/target/**/*.sh"/>
</tar>
<gzip zipfile="${tar-file}.gz" src="${tar-file}" />
<checksum file="${tar-file}.gz" algorithm="MD5" fileext=".md5"/>
<checksum file="${tar-file}.gz" algorithm="SHA" fileext=".asc"/>
<delete file="${tar-file}"/>
</target>
<target name="zipjar">
<zip zipfile="esper_jars.zip">
<zipfileset dir="." includes="**/*.jar" excludes="**/esper*.jar"/>
</zip>
</target>
<target name="copydependencies" description="Copy dependencies from Maven repository to lib directory for development environments">
<exec dir="common" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="common-avro" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="common-xmlxsd" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="compiler" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="regression-run" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="esperio/esperio-amqp" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="esperio/esperio-http" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="esperio/esperio-kafka" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="esperio/esperio-springjms" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
<exec dir="examples/cycledetect" executable="cmd"> <arg value="/c"/> <arg value="mvn dependency:copy"/></exec>
</target>
<target name="generatejavadoc" description="Generate all JavaDoc">
<exec dir="doc/api" executable="cmd"> <arg value="/c"/> <arg value="ant javadoc"/></exec>
<exec dir="esperio/doc/api" executable="cmd"> <arg value="/c"/> <arg value="ant javadoc"/></exec>
<exec dir="common" executable="cmd"> <arg value="/c"/> <arg value="mvn javadoc:javadoc"/></exec>
<exec dir="common-avro" executable="cmd"> <arg value="/c"/> <arg value="mvn javadoc:javadoc"/></exec>
<exec dir="common-xmlxsd" executable="cmd"> <arg value="/c"/> <arg value="mvn javadoc:javadoc"/></exec>
<exec dir="compiler" executable="cmd"> <arg value="/c"/> <arg value="mvn javadoc:javadoc"/></exec>
<exec dir="runtime" executable="cmd"> <arg value="/c"/> <arg value="mvn javadoc:javadoc"/></exec>
</target>
<target name="generatemanifest" description="Generate Manifest">
<delete><fileset dir="." includes="**/MANIFEST.MF"/></delete>
<exec dir="common" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="common-avro" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="common-xmlxsd" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="compiler" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="runtime" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-amqp" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-csv" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-db" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-http" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-kafka" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-socket" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
<exec dir="esperio/esperio-springjms" executable="cmd"> <arg value="/c"/> <arg value="mvn bundle:manifest"/></exec>
</target>
</project>