forked from pettermahlen/voltdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-importers.xml
115 lines (105 loc) · 6.17 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
<!-- 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"/>
<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>
<!-- 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/VoltCSVFormatter.class"/>
<include name="org/voltdb/importer/formatter/builtin/VoltCSVFormatterFactory.class"/>
<include name="au/com/bytecode/opencsv_voltpatches/CSVParser.class"/>
<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>