jakarta.xml.ws-api is adding wrong dependency version
I ran the migrate jdk11 receipe on a project that already uses jakarta.xml.ws-api:2.3.3.
The receipe upgraded the version to 2.3.6. This version exists for the runtime only.
There is no version 2.3.6 of the api.
This would be correct: (and how it was before running the receipe)
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.3.6</version>
<scope>runtime</scope>
</dependency>
This was the change the receipe introduced:
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>2.3.6</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.3.6</version>
<scope>runtime</scope>
</dependency>
Ran the receipe with:
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:LATEST \
-DactiveRecipes=org.openrewrite.java.migrate.Java8toJava11
Thanks for reporting this issue here @thigg ! Would you happen to have a snippet of the log output that highlights which recipes made changes to your pom.xml file? Those lines typically start with [WARNING] Changes have been made to pom.xml by:
At first glance I would only expect changes to be made by JavaxXmlWsMigrationToJakartaXmlWs, which ought to pick up the latest.release version as seen on Maven Central.
There have been a lot of changes since this issue was opened; especially today with these going through
- https://github.com/openrewrite/rewrite/pull/4273
- https://github.com/openrewrite/rewrite-migrate-java/pull/499
I'd lean towards closing this one and reopening a new one if necessary.