Skip to content

Commit

Permalink
[DROOLS-6853] jdk17 compatibility (#2736)
Browse files Browse the repository at this point in the history
* wip

* - Exclude com.sun.xml.bind:jaxb-impl in test scope to avoid BanDuplicateClasses
- Add glassfish jaxb-runtime and jaxb-xjc in kie-server war

* - Exclude com.sun.xml.bind:jaxb-impl and jaxb-core to avoid BanDuplicateClasses

Co-authored-by: Toshiya Kobayashi <[email protected]>
  • Loading branch information
mariofusco and tkobayas committed Apr 5, 2022
1 parent 1a8b5e6 commit f25e859
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 61 deletions.
10 changes: 10 additions & 0 deletions camel-container-tests/camel-container-tests-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
36 changes: 24 additions & 12 deletions kie-camel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -95,6 +94,16 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
Expand Down Expand Up @@ -137,13 +146,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-flow</artifactId>
Expand Down Expand Up @@ -197,6 +199,16 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
12 changes: 4 additions & 8 deletions kie-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,12 @@
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
Expand Down
10 changes: 5 additions & 5 deletions kie-plugins-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</dependency>

<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions kie-server-parent/kie-server-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
<scope>test</scope>
</dependency>
<!-- TRUSTY -->
Expand Down
8 changes: 4 additions & 4 deletions kie-server-parent/kie-server-remote/kie-server-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@

<!-- jaxb -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</dependency>

<!-- Test dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Logging -->
Expand Down
2 changes: 1 addition & 1 deletion kie-server-parent/kie-server-wars/kie-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@

<include>xerces:xercesImpl</include>

<include>com.sun.xml.bind:jaxb-xjc</include>
<include>org.glassfish.jaxb:jaxb-runtime</include>
<include>org.glassfish.jaxb:jaxb-xjc</include>

<include>org.yaml:snakeyaml</include>
</includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@

<include>xerces:xercesImpl</include>

<include>com.sun.xml.bind:jaxb-xjc</include>
<include>org.glassfish.jaxb:jaxb-runtime</include>
<include>org.glassfish.jaxb:jaxb-xjc</include>
</includes>
<excludes>
<exclude>org.jboss.resteasy:*</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<include>org.dom4j:dom4j</include>
<include>xerces:xercesImpl</include>

<include>org.glassfish.jaxb:jaxb-runtime</include>
<include>org.glassfish.jaxb:jaxb-xjc</include>

<include>jakarta.jms:jakarta.jms-api</include>

<include>org.quartz-scheduler:quartz</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@

<!--Java 11 test dependencies-->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
12 changes: 3 additions & 9 deletions kie-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,12 @@
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -315,11 +314,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
12 changes: 4 additions & 8 deletions kie-takari-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,12 @@
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
Expand Down

0 comments on commit f25e859

Please sign in to comment.