-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
pom.xml
493 lines (459 loc) · 18.5 KB
/
pom.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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fasterxml</groupId>
<artifactId>oss-parent</artifactId>
<version>60</version>
</parent>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>7.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Woodstox</name>
<description>Woodstox is a high-performance XML processor that implements Stax (JSR-173),
SAX2 and Stax2 APIs
</description>
<developers>
<developer>
<id>cowtowncoder</id>
<name>Tatu Saloranta</name>
<email>tatu@fasterxml.com</email>
</developer>
</developers>
<organization>
<name>FasterXML</name>
<url>http://fasterxml.com</url>
</organization>
<url>https://github.com/FasterXML/woodstox</url>
<issueManagement>
<url>https://github.com/FasterXML/woodstox/issues</url>
</issueManagement>
<scm>
<connection>scm:git:git@github.com:FasterXML/woodstox.git</connection>
<developerConnection>scm:git:git@github.com:FasterXML/woodstox.git</developerConnection>
<url>https://github.com/FasterXML/woodstox</url>
<tag>HEAD</tag>
</scm>
<properties>
<version.msv>2022.7</version.msv>
<!-- Woodstox 7.0 is Java 8+ -->
<javac.src.version>1.8</javac.src.version>
<javac.target.version>1.8</javac.target.version>
<!-- Since our groupId is NOT the same as Java package id, need to explicitly define.
And due to number of packages, let's just include all.
-->
<osgi.export>com.ctc.wstx.*;version=${project.version}</osgi.export>
<!-- Bnd annotations for generating extra OSGi metadata. -->
<version.bnd.annotation>6.4.0</version.bnd.annotation>
<!-- 5.1 added "Automatic-Module-Name" for JDK 9 but 6.0 adds full module-info -->
<!--
<jdk.module.name>com.ctc.wstx</jdk.module.name>
-->
</properties>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<dependencies>
<!-- First mandatory (and transitive) dependencies -->
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<!-- 13-Mar-2019, tatu: Upgraded to 4.2 (for Woodstox 5.3) get JDK 9 module-info -->
<version>4.2.2</version>
<exclusions>
<exclusion>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Then optional ones (need for build, possibly
for runtime but not always)
-->
<!-- First, MSV, needed for RNG/W3C Schema validation -->
<!-- 05-Mar-2009, TSa: This gets messy, as there are
multiple alternatives, even at http://repo1.maven1.maven.org/maven2;
+ main level ones (group ids "xsdlib", "relaxngDatatype")
+ "msv" ones (3 subgroups)
+ "com.sun.msv", but only for xsdlib
and all with varying sets of dependencies;
For now, we'll just use "msv", which does not properly define
dependencies...
Also: keep `optional` (`provided` will not work for some reason
with shade plugin?) to prevent dependency
-->
<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>msv-core</artifactId>
<version>${version.msv}</version>
<!--
<scope>provided</scope>
-->
<optional>true</optional>
<exclusions>
<!-- don't use isorelax version that lacks source code on Maven Central -->
<exclusion>
<groupId>isorelax</groupId>
<artifactId>isorelax</artifactId>
</exclusion>
<!-- xml-apis is unneeded since it repackages XML APIs that are built into the JDK -->
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>xsdlib</artifactId>
<version>${version.msv}</version>
<!--
<scope>provided</scope>
-->
<optional>true</optional>
<!-- xercesImpl is unneeded since all modern JDKs already include it -->
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- use an isorelax version that has source code on Maven Central -->
<dependency>
<groupId>com.sun.xml.bind.jaxb</groupId>
<artifactId>isorelax</artifactId>
<version>20090621</version>
<!--
<scope>provided</scope>
-->
<optional>true</optional>
</dependency>
<dependency>
<groupId>relaxngDatatype</groupId>
<artifactId>relaxngDatatype</artifactId>
<version>20020414</version>
<!--
<scope>provided</scope>
-->
<optional>true</optional>
</dependency>
<!-- 03-Jun-2019, tatu: Not sure why this was added as a dep as it's only one class,
`com.sun.msv.writer.relaxng.Driver`, and some metadata. I assumed it was needed by MSV
but at least unit tests do not cache issues. So, will remove from 5.3.0
-->
<!--
<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>msv-rngconverter</artifactId>
<version>${version.msv}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
-->
<!-- Then OSGi, needed if using OSGi discovery -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<version>5.0.0</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.annotation</artifactId>
<version>${version.bnd.annotation}</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<!-- Then test deps -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 10-Jul-2021, tatu: Add code coverage again -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- attached to Maven test phase -->
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 12-Oct-2019, tatu: Copied from
https://github.com/stephenc/git-timestamp-maven-plugin/blob/master/pom.xml#L327-L337
to simplify releases. I hope.
-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- 12-Oct-2019, tatu: Found this from output of mvn:relase -->
<stagingProfileId>b34f19b9cc6224</stagingProfileId>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!--
<excludes>
<exclude>test/**</exclude>
</excludes>
-->
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>failing/*.java</exclude>
<exclude>**/Abstract*.java</exclude>
<exclude>**/Base*.java</exclude>
<exclude>**/*$*.java</exclude>
</excludes>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- Bnd currently generates a mandatory requirement for osgi.serviceloader.registrar,
and we cannot make it optional until Resolution.OPTIONAL is a String and not an
Enum. So we must remove these capabilities and configure maven-shade-plugin to
add corrected ones back.
-->
<_removeheaders>Require-Capability</_removeheaders>
</instructions>
</configuration>
</plugin>
<plugin>
<!-- We will shade MSV, partly to simplify deployment, but also to work
around Java 9+ module-info issues (MSV not retrofitted)
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- Too many dynamically resolved dependencies (via class names)
so can not do this, alas:
-->
<minimizeJar>false</minimizeJar>
<artifactSet>
<includes>
<!-- the bundle plugin already did the pulling-in, all we need is the renaming! -->
<include>net.java.dev.msv:msv-core</include>
<include>net.java.dev.msv:xsdlib</include>
<include>relaxngDatatype:relaxngDatatype</include>
<include>com.sun.xml.bind.jaxb:isorelax</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>net.java.dev.msv:msv-core</artifact>
<includes>
<include>com/sun/msv/**</include>
</includes>
<!-- 27-Feb-2020, tatu: Need to be careful; initial
[woodstox-core#96] fix excluded `com.sun.msv.driver.textui.Debug`
which is (alas) referenced by other part(s) of codebase.
What we do want to get rid of is `Driver`, but couple of other
classes here refer to it so try to only include `Debug` and nothing else
-->
<excludes>
<exclude>com/sun/msv/driver/textui/DebugController*</exclude>
<exclude>com/sun/msv/driver/textui/Driver*</exclude>
<exclude>com/sun/msv/driver/textui/Messages*</exclude>
</excludes>
</filter>
</filters>
<relocations>
<!-- First, xsdlib (must order first) -->
<relocation>
<pattern>com.sun.msv.xsd</pattern>
<shadedPattern>com.ctc.wstx.shaded.msv.xsd</shadedPattern>
</relocation>
<relocation> <!-- and one stupid little class xsdlib has for reasons -->
<pattern>com.sun.xml.util</pattern>
<shadedPattern>com.ctc.wstx.shaded.msv.xsd_util</shadedPattern>
</relocation>
<relocation>
<pattern>org.relaxng.datatype</pattern>
<shadedPattern>com.ctc.wstx.shaded.msv.relaxng_datatype</shadedPattern>
</relocation>
<relocation>
<pattern>org.iso_relax</pattern>
<shadedPattern>com.ctc.wstx.shaded.msv.org_isorelax</shadedPattern>
</relocation>
<relocation>
<pattern>jp.gr.xml.relax</pattern>
<shadedPattern>com.ctc.wstx.shaded.msv.org_jp_gr_xml</shadedPattern>
</relocation>
<!-- then msv-core -->
<!-- GedMarc 20190717 - package names can't have dashes -->
<relocation>
<pattern>com.sun.msv</pattern>
<shadedPattern>com.ctc.wstx.shaded.msv_core</shadedPattern>
</relocation>
</relocations>
<transformers>
<!-- Need to ensure class names for services get translated as well... -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<!-- Also need to add corrected OSGi Require-Capability header. -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Require-Capability>
osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))";resolution:=optional,osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
</Require-Capability>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- 03-Jun-2019, tatu: Trying to rudimentary JDK9+ module info. To build with JDK 8
will have to use `moduleInfoFile` which is crappy but anything else requires
JDK 9+.
-->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<overwriteExistingFiles>true</overwriteExistingFiles>
<module>
<moduleInfoFile>src/moditect/module-info.java</moduleInfoFile>
</module>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<!--
<plugin>
<artifactId>maven-changelog-plugin</artifactId>
</plugin>
-->
<configuration>
<show>private</show>
<serialwarn>true</serialwarn>
<author>true</author>
<doctitle>${project.name} ${project.version} API</doctitle>
<windowtitle>${project.name} ${project.version} API</windowtitle>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<profiles>
<!-- @GedMarc 20190717 - Because of shading cannot use a legitimate module file - must be dynamically built up like above-->
<!-- <profile>
<id>moditect</id>
<properties>
<!– Not only do we need JDK 9+, must target later JDK too –>
<java.version>1.9</java.version>
</properties>
<dependencies>
<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>msv-rngconverter</artifactId>
<version>${version.msv}</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<!– 12-Mar-2019, tatu: xercesImpl causes heartburn to Moditect/jdeps so... –>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-module-info</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-module-info</goal>
</goals>
<configuration>
<modules>
<module>
<artifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifact>
</module>
</modules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>-->
</profiles>
</project>