Skip to content

Commit dec9991

Browse files
authored
Make jaxb modules build on java 11 (OpenFeign#807)
* Make jaxb modules build on java 11
1 parent 99bbcba commit dec9991

4 files changed

Lines changed: 64 additions & 32 deletions

File tree

‎.travis.yml‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ cache:
2424
directories:
2525
- $HOME/.m2
2626

27-
#matrix:
28-
# include:
29-
# - os: linux
30-
# jdk: oraclejdk8
31-
# addons:
32-
# apt:
33-
# packages:
34-
# - oracle-java8-installer
35-
# - os: linux
36-
# jdk: openjdk11
27+
matrix:
28+
include:
29+
- os: linux
30+
jdk: oraclejdk8
31+
addons:
32+
apt:
33+
packages:
34+
- oracle-java8-installer
35+
- os: linux
36+
jdk: openjdk8
37+
- os: linux
38+
jdk: openjdk11
3739

3840
# Don't build release tags. This avoids publish conflicts because the version commit exists both on master and the release tag.
3941
# See https://github.com/travis-ci/travis-ci/issues/1532

‎jackson-jaxb/pom.xml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,30 @@
7070
</dependency>
7171
</dependencies>
7272

73+
<profiles>
74+
<profile>
75+
<activation>
76+
<jdk>11</jdk>
77+
</activation>
78+
79+
<!--
80+
JAXB was removed from java SDK on JEP 320
81+
http://openjdk.java.net/jeps/320
82+
-->
83+
<dependencies>
84+
<dependency>
85+
<groupId>javax.xml.bind</groupId>
86+
<artifactId>jaxb-api</artifactId>
87+
<version>2.3.1</version>
88+
</dependency>
89+
<dependency>
90+
<groupId>org.glassfish.jaxb</groupId>
91+
<artifactId>jaxb-runtime</artifactId>
92+
<version>2.4.0-b180830.0438</version>
93+
<scope>test</scope>
94+
</dependency>
95+
</dependencies>
96+
</profile>
97+
</profiles>
98+
7399
</project>

‎jaxb/pom.xml‎

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,23 @@
5050
<jdk>11</jdk>
5151
</activation>
5252

53-
<build>
54-
<plugins>
55-
<plugin>
56-
<groupId>org.apache.maven.plugins</groupId>
57-
<artifactId>maven-surefire-plugin</artifactId>
58-
<configuration>
59-
<argLine>--add-modules java.xml.bind</argLine>
60-
</configuration>
61-
</plugin>
62-
</plugins>
63-
</build>
53+
<!--
54+
JAXB was removed from java SDK on JEP 320
55+
http://openjdk.java.net/jeps/320
56+
-->
57+
<dependencies>
58+
<dependency>
59+
<groupId>javax.xml.bind</groupId>
60+
<artifactId>jaxb-api</artifactId>
61+
<version>2.3.1</version>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.glassfish.jaxb</groupId>
65+
<artifactId>jaxb-runtime</artifactId>
66+
<version>2.4.0-b180830.0438</version>
67+
<scope>test</scope>
68+
</dependency>
69+
</dependencies>
6470
</profile>
6571
</profiles>
6672

‎pom.xml‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<jackson.version>2.9.6</jackson.version>
6666
<assertj.version>3.10.0</assertj.version>
6767

68-
<animal-sniffer-maven-plugin.version>1.15</animal-sniffer-maven-plugin.version>
68+
<animal-sniffer-maven-plugin.version>1.17</animal-sniffer-maven-plugin.version>
6969
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
7070
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
7171
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
@@ -315,6 +315,7 @@
315315
<version>${maven-surefire-plugin.version}</version>
316316
<configuration>
317317
<redirectTestOutputToFile>true</redirectTestOutputToFile>
318+
<trimStackTrace>false</trimStackTrace>
318319
</configuration>
319320
</plugin>
320321
</plugins>
@@ -358,6 +359,13 @@
358359
</goals>
359360
</execution>
360361
</executions>
362+
<dependencies>
363+
<dependency>
364+
<groupId>org.ow2.asm</groupId>
365+
<artifactId>asm</artifactId>
366+
<version>7.0-beta</version>
367+
</dependency>
368+
</dependencies>
361369
</plugin>
362370

363371
<!-- Ensures checksums are added to published jars -->
@@ -466,16 +474,6 @@
466474
</build>
467475

468476
<profiles>
469-
<profile>
470-
<activation>
471-
<jdk>1.8</jdk>
472-
</activation>
473-
474-
<modules>
475-
<module>jackson-jaxb</module>
476-
<module>jaxb</module>
477-
</modules>
478-
</profile>
479477

480478
<profile>
481479
<id>validateCodeFormat</id>

0 commit comments

Comments
 (0)