Skip to content

Commit

Permalink
fix[maven]: update plugin dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jonblack committed Dec 18, 2024
1 parent 65c9cf1 commit b754ed1
Showing 1 changed file with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
"""
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<build>
<plugins>
<plugin>
<groupId>com.mycompany.myplugin</groupId>
<artifactId>my-plugin</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
""",
"""
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<build>
<plugins>
<plugin>
<groupId>com.mycompany.myplugin</groupId>
<artifactId>my-plugin</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
"""
)
);
}
}

0 comments on commit b754ed1

Please sign in to comment.