diff --git a/rewrite-maven/src/test/java/org/openrewrite/maven/ChangeDependencyGroupIdAndArtifactIdTest.java b/rewrite-maven/src/test/java/org/openrewrite/maven/ChangeDependencyGroupIdAndArtifactIdTest.java index 70bfef61989..a0fb4005f9c 100644 --- a/rewrite-maven/src/test/java/org/openrewrite/maven/ChangeDependencyGroupIdAndArtifactIdTest.java +++ b/rewrite-maven/src/test/java/org/openrewrite/maven/ChangeDependencyGroupIdAndArtifactIdTest.java @@ -1557,4 +1557,71 @@ void changeProfileDependencyGroupIdAndArtifactId() { ) ); } + + @Test + @Issue("https://github.com/openrewrite/rewrite/issues/4779") + void changePluginDependencyGroupIdAndArtifactId() { + rewriteRun( + spec -> spec.recipe(new ChangeDependencyGroupIdAndArtifactId( + "javax.activation", + "javax.activation-api", + "jakarta.activation", + "jakarta.activation-api", + null, + null + )), + pomXml( + """ + + 4.0.0 + com.mycompany.app + my-app + 1 + + + + + com.mycompany.myplugin + my-plugin + 1.0.0 + + + javax.activation + javax.activation-api + 1.2.0 + + + + + + + """, + """ + + 4.0.0 + com.mycompany.app + my-app + 1 + + + + + com.mycompany.myplugin + my-plugin + 1.0.0 + + + jakarta.activation + jakarta.activation-api + 1.2.0 + + + + + + + """ + ) + ); + } }