openrewrite / rewrite-migrate-java

OpenRewrite recipes for migrating to newer versions of Java.
Apache License 2.0
111 stars 75 forks source link

AddJaxbRuntime (And likely AddJaxwsRuntime) are adding the same dependency multiple times. #145

Closed tkvangorder closed 2 years ago

tkvangorder commented 2 years ago

image

There is an example of the recipe working correctly. Notably the time it worked correctly it wasn't in the provided scope. The issue may be related to scope rather than model update.

image

tkvangorder commented 2 years ago

The recipes to add jaxb/jax-ws runtimes to Maven build files were written before the Maven resolution was refactored.

Calling out these changes specifically, as the names of the recipes have changed and may impact downstream projects that rely on these recipes.

For JAXB, the following three recipes were consolidated into a single recipe:

  org.openrewrite.java.migrate.javax.AddJaxbDependencies
  org.openrewrite.java.migrate.javax.ReplaceJavaxJaxbWithJakarta
  org.openrewrite.java.migrate.javax.AddJaxbRuntime                  --> com.openrewrite.java.migrate.jakarta.UpdateJaxbRuntimeToJakartaEE8

For JAX-WS, the following three recipes were consolidated into a single recipe:

org.openrewrite.java.migrate.javax.AddJaxwsDependencies
  org.openrewrite.java.migrate.javax.ReplaceJavaxJaxwsWithJakarta
  org.openrewrite.java.migrate.javax.AddJaxwsRuntime                 --> com.openrewrite.java.migrate.jakarta.UpdateJaxwsRuntimeToJakartaEE8