forked from pettermahlen/voltdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-importers.xml
148 lines (135 loc) · 8.55 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
<!-- 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"/>
<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.apache.log4j</string>
<string>org.slf4j</string>
<string>org.voltcore.utils</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/ImportBaseException.class"/>
<zipgroupfileset dir="${base.dir}/lib/" includes="metrics-core-2.2.0.jar" />
<zipgroupfileset dir="${base.dir}/lib/" includes="scala-library-2.10.4.jar" />
<zipgroupfileset dir="${base.dir}/lib" includes="kafka_2.10-0.8.2.1.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="org.osgi.framework;version="[1.6,2)",org.voltdb.importer,org.voltdb.client,org.slf4j" />
</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"/>
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="amazon-kinesis-client-1.6.2.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="aws-java-sdk-1.10.72.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="jackson-dataformat-cbor-2.5.3.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="jackson-databind-2.5.3.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="jackson-core-2.5.3.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="jackson-annotations-2.5.0.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="joda-time-2.9.3.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="commons-lang-2.6.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="guava-18.0.jar" />
<zipgroupfileset dir="${base.dir}/third_party/java/jars" includes="protobuf-java-2.6.1.jar" />
<zipgroupfileset dir="${base.dir}/lib" includes="commons-logging-1.1.3.jar" />
<zipgroupfileset dir="${base.dir}/lib" includes="httpclient-4.3.2.jar" />
<zipgroupfileset dir="${base.dir}/lib" includes="httpcore-4.3.2.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>
<!-- 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"/>
<zipgroupfileset dir="${base.dir}/lib" includes="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>