-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-importers.xml
202 lines (190 loc) · 11.2 KB
/
build-importers.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
<!-- Simple build file to build socket stream importer -->
<project name="socketstream" basedir="." default="socketstream">
<property name='base.dir' location='.' />
<property name='bundles.dir' location='./bundles' />
<property name='build.dir' location='obj/${build}' />
<property name='build.prod.dir' location='${build.dir}/prod' />
<target name="buildbundles" depends="socketstream, pullsocketimporter, log4jsocketimporter, kafkastream, voltcsvformatter, kinesisstream, kafkastream10"/>
<resources id="default.imports.resource">
<string>org.osgi.framework;version="[1.6,2)"</string>
<string>org.voltcore.network</string>
<string>org.voltdb.importer</string>
<string>org.voltdb.client</string>
<string>org.voltdb.importer.formatter</string>
<string>org.apache.log4j</string>
<string>org.slf4j</string>
<string>jsr166y</string>
<string>org.voltcore.utils</string>
<string>org.voltcore.logging</string>
<string>com.google_voltpatches.common.base</string>
<string>com.google_voltpatches.common.collect</string>
<string>com.google_voltpatches.common.net</string>
<string>com.google_voltpatches.common.io</string>
<string>com.google_voltpatches.common.util.concurrent</string>
</resources>
<pathconvert property="default.imports" refid="default.imports.resource" pathsep=","/>
<target name="socketstream">
<antcall target="osgibundle">
<param name="bundle.name" value="socketstream"/>
<param name="activator" value="org.voltdb.importclient.socket.ServerSocketImporterFactory"/>
<param name="bundle.displayname" value="SocketStreamImporter"/>
<param name="include.classpattern" value="socket/ServerSocket*.class"/>
</antcall>
</target>
<target name="pullsocketimporter">
<mkdir dir="${bundles.dir}" />
<jar destfile="${bundles.dir}/pullsocketimporter.jar" basedir="${build.prod.dir}">
<include name="org/voltdb/importclient/socket/PullSocketImporter*.class"/>
<include name="org/voltdb/importclient/ImportBaseException.class"/>
<manifest>
<attribute name="Bundle-Activator" value="org.voltdb.importclient.socket.PullSocketImporterFactory" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="PullSocketImporter OSGi Bundle" />
<attribute name="Bundle-SymbolicName" value="PullSocketImporter" />
<attribute name="Bundle-Version" value="1.0.0" />
<attribute name="DynamicImport-Package" value="*" />
<attribute name="Import-Package" value="${default.imports}" />
</manifest>
</jar>
</target>
<target name="log4jsocketimporter">
<antcall target="osgibundle">
<param name="bundle.name" value="log4jsocketimporter"/>
<param name="activator" value="org.voltdb.importclient.log4j.Log4jSocketImporterFactory"/>
<param name="bundle.displayname" value="Log4jSocketImporter"/>
<param name="include.classpattern" value="log4j/*.class"/>
</antcall>
</target>
<target name="kafkastream">
<mkdir dir="${bundles.dir}" />
<jar destfile="${bundles.dir}/kafkastream.jar" basedir="${build.prod.dir}">
<include name="org/voltdb/importclient/kafka/*.class"/>
<include name="org/voltdb/importclient/kafka/util/*.class"/>
<include name="org/voltdb/importclient/ImportBaseException.class"/>
<zipfileset src="${base.dir}/lib/scala-library-2.11.5.jar" />
<zipfileset src="${base.dir}/lib/scala-parser-combinators_2.11-1.0.2.jar" />
<zipfileset src="${base.dir}/lib/scala-xml_2.11-1.0.2.jar" />
<zipfileset src="${base.dir}/lib/kafka_2.11-0.8.2.2.jar" />
<zipfileset src="${base.dir}/lib/kafka-clients-0.8.2.2.jar" />
<zipfileset src="${base.dir}/lib/snappy-java-1.1.1.7.jar" />
<zipfileset src="${base.dir}/lib/lz4-1.2.0.jar" />
<manifest>
<attribute name="Bundle-Activator" value="org.voltdb.importclient.kafka.KafkaStreamImporterFactory" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="KafkaStream OSGi Bundle" />
<attribute name="Bundle-SymbolicName" value="KafkaStreamImporter" />
<attribute name="Bundle-Version" value="1.0.0" />
<attribute name="DynamicImport-Package" value="*" />
<attribute name="Import-Package" value="${default.imports}"/>
</manifest>
</jar>
</target>
<target name="kinesisstream">
<mkdir dir="${bundles.dir}" />
<jar destfile="${bundles.dir}/kinesisstream.jar" basedir="${build.prod.dir}">
<include name="org/voltdb/importclient/kinesis/*.class"/>
<include name="org/voltdb/importclient/ImportBaseException.class"/>
<zipfileset src="${base.dir}/third_party/java/jars/amazon-kinesis-client-1.6.2.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/aws-java-sdk-1.10.72.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/jackson-dataformat-cbor-2.5.3.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/jackson-databind-2.5.3.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/jackson-core-2.5.3.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/jackson-annotations-2.5.0.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/joda-time-2.9.3.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/commons-lang-2.6.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/guava-18.0.jar" />
<zipfileset src="${base.dir}/lib/protobuf-java-3.4.0.jar" />
<zipfileset src="${base.dir}/lib/commons-logging-1.1.3.jar" />
<zipfileset src="${base.dir}/lib/httpclient-4.3.6.jar" />
<zipfileset src="${base.dir}/lib/httpcore-4.3.3.jar" />
<manifest>
<attribute name="Bundle-Activator" value="org.voltdb.importclient.kinesis.KinesisStreamImporterFactory" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="KinesisStream OSGi Bundle" />
<attribute name="Bundle-SymbolicName" value="KinesisStreamImporter" />
<attribute name="Bundle-Version" value="1.0.0" />
<attribute name="DynamicImport-Package" value="*" />
<attribute name="Import-Package" value="org.osgi.framework;version="[1.6,2)",org.voltdb.importer,org.voltdb.client,org.slf4j" />
</manifest>
</jar>
</target>
<path id="k10classpath">
<pathelement location='${build.client.dir}' />
<pathelement location='${build.prod.dir}' />
<fileset dir='${vendor.lib.dir}'>
<include name='kafka-clients-0.10.2.1.jar'/>
<exclude name='ant.jar' />
<exclude name='classes-java1.7.jar' />
</fileset>
<fileset dir='${lib.dir}'>
<include name='felix.jar'/>
<include name='commons-lang3-3.0.jar'/>
</fileset>
<fileset refid="voltpro.classpath"/>
</path>
<target name="kafkastream10">
<javac srcdir="src/frontend"
destdir="${build.prod.dir}"
includes="org/voltdb/importclient/kafka10/**/*.java org/voltdb/importclient/kafka/util/*.java"
encoding='UTF-8'
debug='true'
includeAntRuntime='false'>
<classpath refid="k10classpath"/>
</javac>
<mkdir dir="${bundles.dir}" />
<jar destfile="${bundles.dir}/kafkastream10.jar" basedir="${build.prod.dir}">
<include name="org/voltdb/importclient/*.class"/>
<include name="org/voltdb/importclient/kafka10/*.class"/>
<include name="org/voltdb/importclient/kafka/util/*.class"/>
<include name="au/com/bytecode/opencsv_voltpatches/**/*.class"/>
<zipfileset src="${base.dir}/third_party/java/jars/kafka-clients-0.10.2.1.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/snappy-java-1.1.2.6.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/lz4-1.3.0.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/slf4j-api-1.7.21.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/slf4j-log4j12-1.7.21.jar" />
<zipfileset src="${base.dir}/third_party/java/jars/log4j-1.2.17.jar" />
<manifest>
<attribute name="Bundle-Activator" value="org.voltdb.importclient.kafka10.KafkaStreamImporterFactory" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="Kafka10Stream OSGi Bundle" />
<attribute name="Bundle-SymbolicName" value="Kafka10StreamImporter" />
<attribute name="Bundle-Version" value="1.0.0" />
<attribute name="DynamicImport-Package" value="*" />
<attribute name="Import-Package" value="${default.imports}"/>
</manifest>
</jar>
</target>
<!-- regular build compile will compile the classes -->
<target name="osgibundle">
<mkdir dir="${bundles.dir}" />
<jar destfile="${bundles.dir}//${bundle.name}.jar" basedir="${build.prod.dir}">
<include name="org/voltdb/importclient/${include.classpattern}"/>
<manifest>
<attribute name="Bundle-Activator" value="${activator}" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="${bundle.displayname} OSGi Bundle" />
<attribute name="Bundle-SymbolicName" value="${bundle.displayname}" />
<attribute name="Bundle-Version" value="1.0.0" />
<attribute name="DynamicImport-Package" value="*" />
<attribute name="Import-Package" value="${default.imports}" />
</manifest>
</jar>
</target>
<target name="voltcsvformatter">
<mkdir dir="${bundles.dir}" />
<jar destfile="${bundles.dir}/voltcsvformatter.jar" basedir="${build.prod.dir}">
<include name="org/voltdb/importer/formatter/builtin/*.class"/>
<include name="org/supercsv_voltpatches/tokenizer/*.class"/>
<include name="au/com/bytecode/opencsv_voltpatches/CSVParser.class"/>
<zipfileset src="${base.dir}/lib/super-csv-2.1.0.jar" />
<manifest>
<attribute name="Bundle-Activator" value="org.voltdb.importer.formatter.builtin.VoltCSVFormatterFactory" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="Builtin CSV Formatter OSGi Bundle" />
<attribute name="Bundle-SymbolicName" value="VoltCSVFormatter" />
<attribute name="Bundle-Version" value="1.0.0" />
<attribute name="DynamicImport-Package" value="*" />
</manifest>
</jar>
</target>
</project>