forked from espertechinc/esper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
186 lines (175 loc) · 12.9 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
<project name="esper" default="info" basedir=".">
<!-- Name of project and version, used to create filenames -->
<property name="Name" value="Esper"/>
<property name="name" value="esper"/>
<property name="nameio" value="esperio"/>
<property name="version" value="7.0.0"/>
<property name="patchlevel" value=""/>
<property name="fullversion" value="${version}${patchlevel}"/>
<property name="fullname" value="${name}-${fullversion}"/>
<property name="fullnameio" value="${nameio}-${fullversion}"/>
<property name="fullnameavro" value="${name}-avro-${fullversion}"/>
<property name="dist.dir" value=".."/>
<property name="lib.dir" value="lib"/>
<property name="src.dir" value="src/main/java"/>
<property name="generated.src" value="target/generated-sources/antlr"/>
<property name="doc.dir" value="doc"/>
<property name="doc.api.dir" value="${doc.dir}/api"/>
<property name="dist.api.dir" value="doc/javadoc/api"/>
<property name="dist_includes" value="
esper-license.txt, esperio-license.txt, esper-avro-license.txt, changelog.txt, index.html,
esper-${version}.jar, esperio-${version}.jar,
esper/doc/site/**,
esper/lib/**, esper/etc/*.*, esper/doc/grammar/**,
esperio/lib/**, esperio/etc/*.*,
examples/**"/>
<property name="dist_includes_exceptions" value="examples/**/target/*.jar,examples/**/target/*.war,examples/**/target/*.ear"/>
<!-- examples has specific excludes -->
<!-- doc is handled separately for folder remapping (remove of build/en) -->
<property name="dist_excludes" value="
**/target/**, **/intellij/**, **/_classes/**,
examples/benchmark/lib/*.jar,
examples/terminalsvc-jse/lib/*.jar,
examples/cycledetect/lib/*.jar,
**/antlr-4.7-complete.jar,
**/junit-*.jar, **/junit.license,
**/mysql-connector-java-*.jar,**/OTFeed*.jar"/>
<target name="zipjar">
<zip zipfile="esper_jars.zip">
<zipfileset dir="." includes="**/*.jar" excludes="**/esper-*.jar"/>
</zip>
</target>
<target name="info" description="The master build is done my Maven">
<echo message="Please use Maven 2 to build Esper and related components. Maven build instructions are available on the website." />
</target>
<target name="touch_all" description="Update timestamp all artifacts">
<touch>
<fileset dir=".">
<include name="**/*.java"/>
</fileset>
</touch>
</target>
<target name="source_zip" description="Zip up source distribution">
<echo message="Building a zip for distribution" />
<property name="zip-file" value=""/>
<zip zipfile="${dist.dir}/${fullname}-src.zip">
<zipfileset prefix="src" dir="esper/src/main/java" includes="**"/>
<zipfileset prefix="test" dir="esper/src/test/java" includes="**"/>
<zipfileset prefix="grammar" dir="esper/grammar" includes="**"/>
<zipfileset prefix="pom" dir="esper" includes="pom.xml"/>
<zipfileset prefix="regression-test" dir="esper-regression/src/test/java" includes="**"/>
</zip>
<zip zipfile="${dist.dir}/${fullnameavro}-src.zip">
<zipfileset prefix="src" dir="esper-avro/src/main/java" includes="**"/>
<zipfileset prefix="test" dir="esper-avro/src/test/java" includes="**"/>
</zip>
<zip zipfile="${dist.dir}/${fullnameio}-src.zip">
<zipfileset prefix="amqp" dir="esperio-amqp/src/main/java" includes="**"/>
<zipfileset prefix="csv" dir="esperio-csv/src/main/java" includes="**"/>
<zipfileset prefix="http" dir="esperio-http/src/main/java" includes="**"/>
<zipfileset prefix="db" dir="esperio-db/src/main/java" includes="**"/>
<zipfileset prefix="tcp" dir="esperio-socket/src/main/java" includes="**"/>
<zipfileset prefix="jms" dir="esperio-springjms/src/main/java" includes="**"/>
<zipfileset prefix="stax" dir="esperio-stax/src/main/java" includes="**"/>
<zipfileset prefix="kafka" dir="esperio-kafka/src/main/java" includes="**"/>
</zip>
</target>
<target name="backup_zip" description="Zip up dev artifacts">
<echo message="Building a zip of the development artifacts" />
<zip zipfile="${dist.dir}/${fullname}-dev-artifacts.zip" basedir="." excludes="**/target/**, **/lib/**, **/doc/javadoc/**, **/doc/build/**, **/doc/reference/support/**,**/doc/reference/build/**, **/*.jar, **/*.ear, **/*.war" />
</target>
<target name="dist_zip" description="Zip up distribution" depends="touch_all">
<echo message="Building a zip for distribution" />
<property name="zip-file" value="${dist.dir}/${fullname}.zip"/>
<zip zipfile="${zip-file}">
<zipfileset prefix="${name}-${version}" dir="." includes="${dist_includes}" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}" dir="." includes="${dist_includes_exceptions}"/>
<zipfileset prefix="${name}-${version}/esper/doc/reference" dir="esper/doc/reference/target/docbook/publish/en-US" includes="**"/>
<zipfileset prefix="${name}-${version}/esper/doc/api" dir="esper/doc/javadoc/api" includes="**"/>
<zipfileset prefix="${name}-${version}/esperio/doc/reference" dir="esperio/doc/reference/target/docbook/publish/en-US" includes="**"/>
<zipfileset prefix="${name}-${version}/esperio/doc/api" dir="esperio/doc/javadoc/api" includes="**"/>
<zipfileset prefix="${name}-${version}/esper-avro/doc/api" dir="esper-avro/doc/javadoc/api" includes="**"/>
<zipfileset prefix="${name}-${version}" dir="esper/target" includes="esper-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esper-avro/target" includes="esper-avro-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-amqp/target" includes="esperio-amqp*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-csv/target" includes="esperio-csv*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-http/target" includes="esperio-http*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-db/target" includes="esperio-db*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-socket/target" includes="esperio-socket*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-springjms/target" includes="esperio-springjms*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-stax/target" includes="esperio-stax*-${version}.jar"/>
<zipfileset prefix="${name}-${version}" dir="esperio-kafka/target" includes="esperio-kafka*-${version}.jar"/>
<zipfileset prefix="${name}-${version}/esperio-amqp" dir="esperio-amqp" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-csv" dir="esperio-csv" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-http" dir="esperio-http" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-db" dir="esperio-db" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-socket" dir="esperio-socket" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-springjms" dir="esperio-springjms" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-stax" dir="esperio-stax" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<zipfileset prefix="${name}-${version}/esperio-kafka" dir="esperio-kafka" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
</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" depends="touch_all">
<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}">
<tarfileset prefix="${name}-${version}" dir="." includes="${dist_includes}" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}" dir="." includes="${dist_includes_exceptions}"/>
<tarfileset prefix="${name}-${version}" dir="." mode="555" includes="examples/**/*.sh" excludes="examples/**/target/**/*.sh"/>
<tarfileset prefix="${name}-${version}/esper/doc/reference" dir="esper/doc/reference/target/docbook/publish/en-US" includes="**"/>
<tarfileset prefix="${name}-${version}/esper/doc/api" dir="esper/doc/javadoc/api" includes="**"/>
<tarfileset prefix="${name}-${version}/esperio/doc/reference" dir="esperio/doc/reference/target/docbook/publish/en-US" includes="**"/>
<tarfileset prefix="${name}-${version}/esperio/doc/api" dir="esperio/doc/javadoc/api" includes="**"/>
<tarfileset prefix="${name}-${version}/esper-avro/doc/api" dir="esper-avro/doc/javadoc/api" includes="**"/>
<tarfileset prefix="${name}-${version}" dir="esper/target" includes="esper-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esper-avro/target" includes="esper-avro-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-amqp/target" includes="esperio-amqp*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-csv/target" includes="esperio-csv*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-http/target" includes="esperio-http*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-db/target" includes="esperio-db*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-socket/target" includes="esperio-socket*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-springjms/target" includes="esperio-springjms*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-stax/target" includes="esperio-stax*-${version}.jar"/>
<tarfileset prefix="${name}-${version}" dir="esperio-kafka/target" includes="esperio-kafka*-${version}.jar"/>
<tarfileset prefix="${name}-${version}/esperio-amqp" dir="esperio-amqp" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-csv" dir="esperio-csv" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-http" dir="esperio-http" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-db" dir="esperio-db" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-socket" dir="esperio-socket" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-springjms" dir="esperio-springjms" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-stax" dir="esperio-stax" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
<tarfileset prefix="${name}-${version}/esperio-kafka" dir="esperio-kafka" includes="etc/*.*, lib/*.*" excludes="${dist_excludes}"/>
</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="dist_maven" description="Maven distribution artifacts" >
<echo message="Building Maven distribution files" />
<checksum file="esper/maven-metadata.xml" algorithm="MD5" fileext=".md5"/>
<checksum file="esper/maven-metadata.xml" algorithm="SHA" fileext=".sha1"/>
<checksum file="esper/maven-metadata.xml" algorithm="SHA1" fileext=".asc"/>
<checksum file="esperio/maven-metadata.xml" algorithm="MD5" fileext=".md5"/>
<checksum file="esperio/maven-metadata.xml" algorithm="SHA1" fileext=".sha1"/>
<checksum file="esperio/maven-metadata.xml" algorithm="SHA" fileext=".asc"/>
<copy file="esper/pom.xml" tofile="${dist.dir}/esper-${version}.pom"/>
<checksum file="${dist.dir}/esper-${version}.pom" algorithm="MD5" fileext=".md5"/>
<checksum file="${dist.dir}/esper-${version}.pom" algorithm="SHA" fileext=".sha1"/>
<copy file="esperio/pom.xml" tofile="${dist.dir}/esperio-${version}.pom"/>
<checksum file="${dist.dir}/esperio-${version}.pom" algorithm="MD5" fileext=".md5"/>
<checksum file="${dist.dir}/esperio-${version}.pom" algorithm="SHA" fileext=".sha1"/>
<copy file="esper-${version}.jar" tofile="${dist.dir}/esper-${version}.jar"/>
<checksum file="${dist.dir}/esper-${version}.jar" algorithm="MD5" fileext=".md5"/>
<checksum file="${dist.dir}/esper-${version}.jar" algorithm="SHA" fileext=".sha1"/>
<copy file="esperio-${version}.jar" tofile="${dist.dir}/esperio-${version}.jar"/>
<checksum file="${dist.dir}/esperio-${version}.jar" algorithm="MD5" fileext=".md5"/>
<checksum file="${dist.dir}/esperio-${version}.jar" algorithm="SHA" fileext=".sha1"/>
</target>
</project>