As for your other question: not sure; I'd expect folks to run Java8toJava11, and through that AddCommonAnnotationsDependencies before they run JavaxMigrationToJakarta, but it's hard to say at times.
Originally posted by @timtebeek in #729 (comment)
When running Java8toJava11 followed by JavaxMigrationToJakarta, the pom.xml ends up with 2 copies of com.sun.xml.ws:jaxws-rt.
It seems from the 8to11 migration, AddJaxwsRuntime adds jaxws-rt:2.3.x, then in the EE9 migration, JavaxXmlWsMigrationToJakartaXmlWs adds jaxws-rt:3.0.x
The pom then ends up having:
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>3.0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.3.7</version>
<scope>provided</scope>
</dependency>
I'm thinking the EE9 recipe should do some more cleanup of the previous versions (also seems something in here is also not quite playing well with the jaxws-rt:2.3.7 when trying to Add/Upgrade to 3.x, maybe similar to issue #728)
|
- org.openrewrite.java.dependencies.AddDependency: |
|
groupId: com.sun.xml.ws |
|
artifactId: jaxws-rt |
|
version: 3.x |
|
scope: runtime |
|
onlyIfUsing: javax.xml.ws..* |
|
acceptTransitive: true |
|
- org.openrewrite.java.dependencies.UpgradeDependencyVersion: |
|
groupId: com.sun.xml.ws |
|
artifactId: jaxws-rt |
|
newVersion: 3.x |
Using rewrite-migrate-java: 3.10.0-SNAPSHOT
Originally posted by @timtebeek in #729 (comment)
When running Java8toJava11 followed by JavaxMigrationToJakarta, the
pom.xmlends up with 2 copies ofcom.sun.xml.ws:jaxws-rt.It seems from the 8to11 migration,
AddJaxwsRuntimeaddsjaxws-rt:2.3.x, then in the EE9 migration,JavaxXmlWsMigrationToJakartaXmlWsaddsjaxws-rt:3.0.xThe pom then ends up having:
I'm thinking the EE9 recipe should do some more cleanup of the previous versions (also seems something in here is also not quite playing well with the
jaxws-rt:2.3.7when trying to Add/Upgrade to3.x, maybe similar to issue #728)rewrite-migrate-java/src/main/resources/META-INF/rewrite/jakarta-ee-9.yml
Lines 783 to 793 in 2879689
Using rewrite-migrate-java: 3.10.0-SNAPSHOT