diff --git a/src/main/resources/META-INF/rewrite/add-common-annotations-dependencies.yml b/src/main/resources/META-INF/rewrite/add-common-annotations-dependencies.yml
index 389e5f8f30..3b163287ae 100644
--- a/src/main/resources/META-INF/rewrite/add-common-annotations-dependencies.yml
+++ b/src/main/resources/META-INF/rewrite/add-common-annotations-dependencies.yml
@@ -33,7 +33,7 @@ recipeList:
newGroupId: jakarta.annotation
newArtifactId: jakarta.annotation-api
newVersion: 1.3.x
- # set explicitly even if managed, as higher versions do not have the javax namespace
+ # Set explicitly even if managed, as higher versions do not have the javax namespace
overrideManagedVersion: true
changeManagedDependency: false
# Jakarta EE recommends `provided` scope
diff --git a/src/main/resources/META-INF/rewrite/java-version-17.yml b/src/main/resources/META-INF/rewrite/java-version-17.yml
index 1da448fd01..ff5e73db31 100644
--- a/src/main/resources/META-INF/rewrite/java-version-17.yml
+++ b/src/main/resources/META-INF/rewrite/java-version-17.yml
@@ -72,8 +72,6 @@ recipeList:
artifactId: mapstruct*
newVersion: 1.6.x
- org.openrewrite.java.migrate.AddLombokMapstructBinding
- - org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfForJavax
- - org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfExistsForJakarta
---
type: specs.openrewrite.org/v1beta/recipe
@@ -338,28 +336,4 @@ recipeList:
groupId: org.projectlombok
artifactId: lombok-mapstruct-binding
version: 0.2.0
----
-# The scanning phase comes before the editing phase, therefor we check if a javax.annotation dependency is on the classpath (with whatever version)
-type: specs.openrewrite.org/v1beta/recipe
-name: org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfForJavax
-displayName: Update `jakarta.annotation-api` dependency if it exists
-description: Counteract the `jakarta.annotation-api` by updating to `jakarta` namespace
-preconditions:
- - org.openrewrite.java.dependencies.search.ModuleHasDependency:
- groupIdPattern: javax.annotation
- artifactIdPattern: javax.annotation-api
-recipeList:
- - org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
----
-type: specs.openrewrite.org/v1beta/recipe
-name: org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfExistsForJakarta
-displayName: Update `jakarta.annotation-api` dependency if it exists
-description: Counteract the `jakarta.annotation-api` by updating to `jakarta` namespace
-preconditions:
- - org.openrewrite.java.dependencies.search.ModuleHasDependency:
- groupIdPattern: jakarta.annotation
- artifactIdPattern: jakarta.annotation-api
- version: 1.3.x
-recipeList:
- - org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
diff --git a/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java b/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java
index b16d7576f3..756303029e 100644
--- a/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java
+++ b/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java
@@ -504,76 +504,6 @@ void test() throws Exception {
);
}
- @Issue("https://github.com/openrewrite/rewrite-migrate-java/pull/816")
- @Test
- void javaxAnnotationApiToJakarta() {
- rewriteRun(
- spec -> spec.parser(JavaParser.fromJavaVersion().classpathFromResources(new InMemoryExecutionContext(), "javax.annotation-api-1.3.2")),
- version(
- mavenProject("project",
- //language=xml
- pomXml(
- """
-
- 4.0.0
- com.mycompany.app
- my-app
- 1
-
-
- javax.annotation
- javax.annotation-api
- 1.3.2
-
-
-
- """,
- """
-
- 4.0.0
- com.mycompany.app
- my-app
- 1
-
- 17
-
-
-
- jakarta.annotation
- jakarta.annotation-api
- 2.0.0
- provided
-
-
-
- """
- ),
- //language=java
- srcMainJava(
- java(
- """
- import javax.annotation.PostConstruct;
-
- class A {
- @PostConstruct
- void init() {}
- }
- """,
- """
- import jakarta.annotation.PostConstruct;
-
- class A {
- @PostConstruct
- void init() {}
- }
- """
- )
- )
- ),
- 8)
- );
- }
-
@Test
void upgradeSpotbugsPluginVersion() {
rewriteRun(