-
Notifications
You must be signed in to change notification settings - Fork 4
/
build-osgi.xml
138 lines (130 loc) · 5.28 KB
/
build-osgi.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
<?xml version="1.0" standalone='yes'?>
<!-- This Ant build file fragment contains targets needed to build
distributable OSGi-aware artifacts
-->
<project name="OSGi export tasks for Woodstox" basedir=".">
<!-- Need BND task for OSGi bundle/metadata creation -->
<taskdef name="osgify" classname="net.luminis.build.plugin.bnd.BuildTask">
<classpath>
<fileset dir="${dir.lib}/ant" includes="bndtask*.jar" />
</classpath>
</taskdef>
<!-- 18-Nov-2008, TSa: although recommended naming would
use reversed domain name (essentially, Maven groupId + artifactId),
let's for now only use artifactId to keep shorter and more
Maven-like
-->
<!--
<property name="OSGI_STAX2_BASENAME" value="org.codehaus.woodstox.stax2-api" />
<property name="OSGI_WSTX_BASENAME" value="org.codehaus.woodstox.woodstox-core" />
-->
<property name="OSGI_STAX2_BASENAME" value="stax2-api" />
<property name="OSGI_WSTX_BASENAME" value="woodstox-core" />
<!-- As of Woodstox 4.x, Stax2-api 3.x, we need JDK 1.4
(and for next major version at least 1.5, possibly 1.6)
-->
<property name="REQ_JDK_VERSION" value="J2SE-1.4" />
<target name="jars.osgi" depends="osgi-woodstox-lgpl, osgi-woodstox-asl" />
<target name="osgi-woodstox-asl" depends="compile.woodstox,copy-resources">
<osgify outputDir="${dir.build}"
bundleName="${IMPL_TITLE}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="${OSGI_WSTX_BASENAME}-asl"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.apache.org/licenses/LICENSE-2.0.txt"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="${OSGI_WSTX_BASENAME}-asl-${IMPL_VERSION}"
importPackage="
javax.xml*,
org.xml.sax*,
org.w3c.dom,
org.osgi.framework,
org.codehaus.stax2*;version='${REQ_STAX2_VERSION}'"
dynamicImportPackage="
com.sun.msv.*,
org.relaxng.datatype"
exportPackage="
com.ctc.wstx.api;version=${IMPL_VERSION},
com.ctc.wstx.cfg;version=${IMPL_VERSION},
com.ctc.wstx.dom;version=${IMPL_VERSION},
com.ctc.wstx.msv;version=${IMPL_VERSION},
com.ctc.wstx.osgi;version=${IMPL_VERSION},
com.ctc.wstx.sax;version=${IMPL_VERSION},
com.ctc.wstx.sr;version=${IMPL_VERSION},
com.ctc.wstx.sw;version=${IMPL_VERSION},
com.ctc.wstx.stax;version=${IMPL_VERSION}
"
privatePackage="
!com.ctc.wstx.api,
!com.ctc.wstx.cfg,
!com.ctc.wstx.dom,
!com.ctc.wstx.msv,
!com.ctc.wstx.osgi,
!com.ctc.wstx.sax,
!com.ctc.wstx.sr,
!com.ctc.wstx.sw,
!com.ctc.wstx.stax,
!test,*"
includeResource="META-INF/services=src/resources, META-INF=release-notes/asl"
includeIncludeResourceHeader="false"
bundleActivator="com.ctc.wstx.osgi.WstxBundleActivator"
>
<classpath>
<pathelement path="${dir.build.classes.woodstox}" />
</classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
<attribute name="Specification-Title" value="${API_TITLE}"/>
<attribute name="Specification-Version" value="${API_VERSION}"/>
<attribute name="Specification-Vendor" value="${API_VENDOR}"/>
</manifest>
</osgify>
</target>
<target name="osgi-woodstox-lgpl" depends="compile.woodstox,copy-resources">
<osgify outputDir="${dir.build}"
bundleName="${IMPL_TITLE}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="${OSGI_WSTX_BASENAME}-lgpl"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.gnu.org/licenses/lgpl-2.1.html"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="${OSGI_WSTX_BASENAME}-lgpl-${IMPL_VERSION}"
importPackage="
javax.xml*,
org.xml.sax*,
org.w3c.dom,
org.osgi.framework,
org.codehaus.stax2*;version='${REQ_STAX2_VERSION}'"
dynamicImportPackage="
com.sun.msv.*,
org.relaxng.datatype"
exportPackage="
com.ctc.wstx.api;version=${IMPL_VERSION},
com.ctc.wstx.msv;version=${IMPL_VERSION},
com.ctc.wstx.sax;version=${IMPL_VERSION},
com.ctc.wstx.stax;version=${IMPL_VERSION}
"
privatePackage="!com.ctc.wstx.api, !com.ctc.wstx.msv, !com.ctc.wstx.sax
,!com.ctc.wstx.stax, !test,*"
includeResource="META-INF/services=src/resources, META-INF=release-notes/lgpl"
includeIncludeResourceHeader="false"
bundleActivator="com.ctc.wstx.osgi.WstxBundleActivator"
>
<classpath>
<pathelement path="${dir.build.classes.woodstox}" />
</classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
<attribute name="Specification-Title" value="${API_TITLE}"/>
<attribute name="Specification-Version" value="${API_VERSION}"/>
<attribute name="Specification-Vendor" value="${API_VENDOR}"/>
</manifest>
</osgify>
</target>
</project>