diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/DoesNotHaveProvidedApiDependency.java b/src/main/java/org/openrewrite/java/migrate/jakarta/DoesNotHaveProvidedApiDependency.java
new file mode 100644
index 0000000000..1e3640674e
--- /dev/null
+++ b/src/main/java/org/openrewrite/java/migrate/jakarta/DoesNotHaveProvidedApiDependency.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2025 the original author or authors.
+ *
+ * Licensed under the Moderne Source Available License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://docs.moderne.io/licensing/moderne-source-available-license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openrewrite.java.migrate.jakarta;
+
+import lombok.EqualsAndHashCode;
+import lombok.Value;
+import org.openrewrite.ExecutionContext;
+import org.openrewrite.Recipe;
+import org.openrewrite.Option;
+import org.openrewrite.Tree;
+import org.openrewrite.TreeVisitor;
+import org.openrewrite.gradle.marker.GradleDependencyConfiguration;
+import org.openrewrite.gradle.marker.GradleProject;
+import org.openrewrite.marker.SearchResult;
+import org.openrewrite.maven.tree.MavenResolutionResult;
+
+import java.util.Collection;
+import java.util.List;
+
+@Value
+@EqualsAndHashCode(callSuper = false)
+public class DoesNotHaveProvidedApiDependency extends Recipe {
+ String displayName = "Build does not declare a provided API dependency";
+
+ String description = "Find build files without an explicitly provided or compile-only API, " +
+ "so adding a compile dependency does not promote a container-provided API to runtime scope.";
+
+ @Option(displayName = "API coordinates",
+ description = "Legacy and Jakarta groupId:artifactId coordinates whose provided scope must be preserved.",
+ example = "javax.enterprise:cdi-api, jakarta.enterprise:jakarta.enterprise.cdi-api")
+ List coordinates;
+
+ @Override
+ public TreeVisitor, ExecutionContext> getVisitor() {
+ return new TreeVisitor() {
+ @Override
+ public Tree preVisit(Tree tree, ExecutionContext ctx) {
+ stopAfterPreVisit();
+ MavenResolutionResult maven = tree.getMarkers().findFirst(MavenResolutionResult.class).orElse(null);
+ if (maven != null && maven.getDependencies().values().stream().flatMap(Collection::stream)
+ .anyMatch(d -> d.getDepth() == 0 &&
+ "provided".equals(maven.getPom().getValue(d.getRequested().getScope())) &&
+ coordinates.contains(d.getGroupId() + ":" + d.getArtifactId()))) {
+ return tree;
+ }
+ GradleProject gradle = tree.getMarkers().findFirst(GradleProject.class).orElse(null);
+ if (gradle != null) {
+ GradleDependencyConfiguration compileOnly = gradle.getConfiguration("compileOnly");
+ if (compileOnly != null) {
+ for (String coordinate : coordinates) {
+ String[] ga = coordinate.split(":", 2);
+ if (ga.length == 2 && compileOnly.findRequestedDependency(ga[0], ga[1]) != null) {
+ return tree;
+ }
+ }
+ }
+ }
+ return SearchResult.found(tree);
+ }
+ };
+ }
+
+}
diff --git a/src/main/resources/META-INF/rewrite/jakarta-ee-9.yml b/src/main/resources/META-INF/rewrite/jakarta-ee-9.yml
index badcc6b29a..be6253fbc5 100644
--- a/src/main/resources/META-INF/rewrite/jakarta-ee-9.yml
+++ b/src/main/resources/META-INF/rewrite/jakarta-ee-9.yml
@@ -145,12 +145,7 @@ recipeList:
groupId: jakarta.annotation
artifactId: jakarta.annotation-api
newVersion: 2.0.x
- - org.openrewrite.java.dependencies.AddDependency:
- groupId: jakarta.annotation
- artifactId: jakarta.annotation-api
- version: 2.0.x
- onlyIfUsing: javax.annotation..*
- acceptTransitive: true
+ - org.openrewrite.java.migrate.jakarta.AddJakartaAnnotationDependency
- org.openrewrite.java.migrate.javax.AddApiDependencyForImports:
packageName: jakarta.annotation
groupId: jakarta.annotation
@@ -357,12 +352,7 @@ recipeList:
groupId: jakarta.enterprise
artifactId: jakarta.enterprise.cdi-api
newVersion: 3.0.x
- - org.openrewrite.java.dependencies.AddDependency:
- groupId: jakarta.enterprise
- artifactId: jakarta.enterprise.cdi-api
- version: 3.0.x
- onlyIfUsing: javax.decorator..*
- acceptTransitive: true
+ - org.openrewrite.java.migrate.jakarta.AddJakartaCdiDependency
- org.openrewrite.java.ChangePackage:
oldPackageName: javax.decorator
newPackageName: jakarta.decorator
@@ -403,12 +393,7 @@ recipeList:
groupId: jakarta.ejb
artifactId: jakarta.ejb-api
newVersion: 4.0.x
- - org.openrewrite.java.dependencies.AddDependency:
- groupId: jakarta.ejb
- artifactId: jakarta.ejb-api
- version: 4.0.x
- onlyIfUsing: javax.ejb..*
- acceptTransitive: true
+ - org.openrewrite.java.migrate.jakarta.AddJakartaEjbDependency
- org.openrewrite.maven.UpgradePluginVersion:
groupId: org.apache.maven.plugins
artifactId: maven-ejb-plugin
@@ -442,12 +427,7 @@ recipeList:
groupId: jakarta.el
artifactId: jakarta.el-api
newVersion: 4.0.x
- - org.openrewrite.java.dependencies.AddDependency:
- groupId: jakarta.el
- artifactId: jakarta.el-api
- version: 4.0.x
- onlyIfUsing: javax.el..*
- acceptTransitive: true
+ - org.openrewrite.java.migrate.jakarta.AddJakartaElDependency
- org.openrewrite.java.ChangePackage:
oldPackageName: javax.el
newPackageName: jakarta.el
@@ -510,12 +490,7 @@ recipeList:
groupId: jakarta.enterprise
artifactId: jakarta.enterprise.cdi-api
newVersion: 3.0.x
- - org.openrewrite.java.dependencies.AddDependency:
- groupId: jakarta.enterprise
- artifactId: jakarta.enterprise.cdi-api
- version: 3.0.x
- onlyIfUsing: javax.enterprise..*
- acceptTransitive: true
+ - org.openrewrite.java.migrate.jakarta.AddJakartaCdiDependency
- org.openrewrite.java.ChangePackage:
oldPackageName: javax.enterprise
newPackageName: jakarta.enterprise
@@ -752,12 +727,7 @@ recipeList:
groupId: jakarta.mail
artifactId: jakarta.mail-api
newVersion: 2.0.x
- - org.openrewrite.java.dependencies.AddDependency:
- groupId: jakarta.mail
- artifactId: jakarta.mail-api
- version: 2.0.x
- onlyIfUsing: javax.mail.*
- acceptTransitive: true
+ - org.openrewrite.java.migrate.jakarta.AddJakartaMailDependency
- org.openrewrite.java.ChangePackage:
oldPackageName: javax.mail
newPackageName: jakarta.mail
@@ -1782,3 +1752,108 @@ recipeList:
groupId: org.jboss.weld
artifactId: weld-core-impl
newVersion: 4.0.x
+
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.openrewrite.java.migrate.jakarta.AddJakartaCdiDependency
+displayName: Add the Jakarta CDI API when needed
+description: Add the Jakarta CDI API for migrated source without promoting an explicitly provided or compile-only API to a runtime dependency.
+preconditions:
+ - org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency:
+ coordinates:
+ - javax.enterprise:cdi-api
+ - jakarta.enterprise:jakarta.enterprise.cdi-api
+recipeList:
+ - org.openrewrite.java.dependencies.AddDependency:
+ groupId: jakarta.enterprise
+ artifactId: jakarta.enterprise.cdi-api
+ version: 3.0.x
+ onlyIfUsing: javax.enterprise..*
+ acceptTransitive: true
+ - org.openrewrite.java.dependencies.AddDependency:
+ groupId: jakarta.enterprise
+ artifactId: jakarta.enterprise.cdi-api
+ version: 3.0.x
+ onlyIfUsing: javax.decorator..*
+ acceptTransitive: true
+
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.openrewrite.java.migrate.jakarta.AddJakartaAnnotationDependency
+displayName: Add the Jakarta Annotation API when needed
+description: Add the migrated API without promoting an explicitly provided or compile-only dependency.
+preconditions:
+ - org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency:
+ coordinates:
+ - javax.annotation:javax.annotation-api
+ - javax.annotation:jsr250-api
+ - org.glassfish.main:javax.annotation
+ - jakarta.annotation:jakarta.annotation-api
+recipeList:
+ - org.openrewrite.java.dependencies.AddDependency:
+ groupId: jakarta.annotation
+ artifactId: jakarta.annotation-api
+ version: 2.0.x
+ onlyIfUsing: javax.annotation..*
+ acceptTransitive: true
+
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.openrewrite.java.migrate.jakarta.AddJakartaElDependency
+displayName: Add the Jakarta El API when needed
+description: Add the migrated API without promoting an explicitly provided or compile-only dependency.
+preconditions:
+ - org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency:
+ coordinates:
+ - javax.el:javax.el-api
+ - javax.el:el-api
+ - jakarta.el:jakarta.el-api
+recipeList:
+ - org.openrewrite.java.dependencies.AddDependency:
+ groupId: jakarta.el
+ artifactId: jakarta.el-api
+ version: 4.0.x
+ onlyIfUsing: javax.el..*
+ acceptTransitive: true
+
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.openrewrite.java.migrate.jakarta.AddJakartaEjbDependency
+displayName: Add the Jakarta Ejb API when needed
+description: Add the migrated API without promoting an explicitly provided or compile-only dependency.
+preconditions:
+ - org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency:
+ coordinates:
+ - javax.ejb:javax.ejb-api
+ - javax.ejb:ejb-api
+ - org.glassfish.main:javax.ejb
+ - org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec
+ - jakarta.ejb:jakarta.ejb-api
+recipeList:
+ - org.openrewrite.java.dependencies.AddDependency:
+ groupId: jakarta.ejb
+ artifactId: jakarta.ejb-api
+ version: 4.0.x
+ onlyIfUsing: javax.ejb..*
+ acceptTransitive: true
+
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.openrewrite.java.migrate.jakarta.AddJakartaMailDependency
+displayName: Add the Jakarta Mail API when needed
+description: Add the migrated API without promoting an explicitly provided or compile-only dependency.
+preconditions:
+ - org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency:
+ coordinates:
+ - com.sun.mail:javax.mail
+ - com.sun.mail:jakarta.mail
+ - javax.mail:mail
+ - javax.mail:javax.mail-api
+ - jakarta.mail:jakarta.mail-api
+recipeList:
+ - org.openrewrite.java.dependencies.AddDependency:
+ groupId: jakarta.mail
+ artifactId: jakarta.mail-api
+ version: 2.0.x
+ onlyIfUsing: javax.mail.*
+ acceptTransitive: true
diff --git a/src/main/resources/META-INF/rewrite/recipes.csv b/src/main/resources/META-INF/rewrite/recipes.csv
index e27e06e669..8429ac6592 100644
--- a/src/main/resources/META-INF/rewrite/recipes.csv
+++ b/src/main/resources/META-INF/rewrite/recipes.csv
@@ -210,10 +210,16 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.i
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.io.ReplaceFileInOrOutputStreamFinalizeWithClose,Replace invocations of `finalize()` on `FileInputStream` and `FileOutputStream` with `close()`,Replace invocations of the deprecated `finalize()` method on `FileInputStream` and `FileOutputStream` with `close()`.,1,,`java.io` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.io.ReplaceSystemOutWithIOPrint,Migrate `System.out.print` to Java 25 IO utility class,"Replace `System.out.print()`, `System.out.println()` with `IO.print()` and `IO.println()`. Migrates to the new IO utility class introduced in Java 25.",1,,`java.io` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jacoco.UpgradeJaCoCo,Upgrade JaCoCo,"This recipe will upgrade JaCoCo to the latest patch version, which traditionally advertises full backwards compatibility for older Java versions.",3,,JaCoCo,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaAnnotationDependency,Add the Jakarta Annotation API when needed,Add the migrated API without promoting an explicitly provided or compile-only dependency.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaCdiDependency,Add the Jakarta CDI API when needed,Add the Jakarta CDI API for migrated source without promoting an explicitly provided or compile-only API to a runtime dependency.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaEjbDependency,Add the Jakarta Ejb API when needed,Add the migrated API without promoting an explicitly provided or compile-only dependency.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaElDependency,Add the Jakarta El API when needed,Add the migrated API without promoting an explicitly provided or compile-only dependency.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaMailDependency,Add the Jakarta Mail API when needed,Add the migrated API without promoting an explicitly provided or compile-only dependency.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaXmlBindRuntime,Add a Jakarta JAXB runtime for Maven applications,Add a Jakarta JAXB 3 runtime when a Maven module calls JAXBContext.newInstance and has no explicit JAXB provider or provided Jakarta platform. Java 8's built-in javax provider cannot serve Jakarta calls. Annotation-only modules are left alone and test-only calls receive a test dependency.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ApplicationPathWildcardNoLongerAccepted,Remove trailing slash from `jakarta.ws.rs.ApplicationPath` values,Remove trailing `/*` from `jakarta.ws.rs.ApplicationPath` values.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ChangeJaxbApiDependency,Migrate the JAXB API dependency unless Recorder still needs it,Migrate JAXB API coordinates while preserving the legacy API needed alongside Jakarta JAXB by external Arquillian Recorder 1.x binaries. Recorder modules migrated in the same reactor are excluded.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.DeprecatedCDIAPIsRemoved40,Remove deprecated API's not supported in CDI4.0,Deprecated APIs have been removed in CDI 4.0. This recipe removes and updates the corresponding deprecated methods.,4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency,Build does not declare a provided API dependency,"Find build files without an explicitly provided or compile-only API, so adding a compile dependency does not promote a container-provided API to runtime scope.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""coordinates"",""type"":""List"",""displayName"":""API coordinates"",""description"":""Legacy and Jakarta groupId:artifactId coordinates whose provided scope must be preserved."",""example"":""javax.enterprise:cdi-api, jakarta.enterprise:jakarta.enterprise.cdi-api"",""required"":true}]",
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.EhcacheJavaxToJakarta,Migrate Ehcache from javax to jakarta namespace,Java EE has been rebranded to Jakarta EE. This recipe replaces existing Ehcache dependencies with their counterparts that are compatible with Jakarta EE 9.,5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.Faces2xMigrationToJakartaFaces3x,JSF 2.x to Jakarta Faces 3.x,"Jakarta EE 9 uses Faces 3.0, a major upgrade to Jakarta packages and XML namespaces.",79,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.Faces3xMigrationToFaces4x,Upgrade to Jakarta Faces 4.x,Jakarta EE 10 uses Faces 4.0.,137,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
@@ -224,8 +230,8 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.HasJettyDependency,Build uses Jetty before version 12,Mark the source set when a Maven or Gradle module depends on servlet or WebSocket artifacts relocated by the Jetty 12 migration. This permits updating the Java baseline in parent build files as well as the module using Jetty.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.HasNoJakartaAnnotations,Project has no Jakarta annotations,Mark all source as found per `JavaProject` where no Jakarta annotations are found. This is useful mostly as a precondition for recipes that require Jakarta annotations to be present.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta,Migrate Jackson from javax to jakarta namespace,Java EE has been rebranded to Jakarta EE. This recipe replaces existing Jackson dependencies with their counterparts that are compatible with Jakarta EE 9.,26,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaEE10,Migrate to Jakarta EE 10,"These recipes help with the Migration to Jakarta EE 10, flagging and updating deprecated methods.",654,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaEE11,Migrate to Jakarta EE 11,"These recipes help with the Migration to Jakarta EE 11, flagging and updating deprecated methods.",672,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaEE10,Migrate to Jakarta EE 10,"These recipes help with the Migration to Jakarta EE 10, flagging and updating deprecated methods.",662,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaEE11,Migrate to Jakarta EE 11,"These recipes help with the Migration to Jakarta EE 11, flagging and updating deprecated methods.",680,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaFacesConfigXml4,Migrate xmlns entries in `faces-config.xml` files,Jakarta EE 10 uses Faces version 4.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaFacesEcmaScript,Migrate JSF values inside EcmaScript files,"Convert JSF to Faces values inside JavaScript,TypeScript, and Properties files.",4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaFacesTagLibraryXml4,Migrate xmlns entries in `taglib.xml` files,Faces 4 uses facelet-taglib 4.0.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
@@ -234,18 +240,18 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaWebFragmentXml6,Migrate xmlns entries in `web-fragment.xml` files,Faces 4 uses web-fragment 6.0.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaWebXml6,Migrate xmlns entries in `web.xml` files,Faces 4 uses web-app 6.0.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation,Migrate deprecated `javax.activation` packages to `jakarta.activation`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation,Migrate deprecated `javax.annotation` to `jakarta.annotation`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",10,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation,Migrate deprecated `javax.annotation` to `jakarta.annotation`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",11,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication,Migrate deprecated `javax.security.auth.message` packages to `jakarta.security.auth.message`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization,Migrate deprecated `javax.security.jacc` packages to `jakarta.security.jacc`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch,Migrate deprecated `javax.batch` packages to `jakarta.batch`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxBeanValidationXmlToJakartaBeanValidationXml,Migrate xmlns entries and javax. packages in `validation.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxBeansXmlToJakartaBeansXml,Migrate xmlns entries in `beans.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxDecoratorToJakartaDecorator,Migrate deprecated `javax.decorator` packages to `jakarta.decorator`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxDecoratorToJakartaDecorator,Migrate deprecated `javax.decorator` packages to `jakarta.decorator`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",7,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxEEApiToJakarta,Migrate deprecated `javaee-api` dependencies to `jakarta.platform`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxEjbJarXmlToJakartaEjbJarXml,Migrate xmlns entries and javax. packages in `ejb-jar.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxEjbToJakartaEjb,Migrate deprecated `javax.ejb` packages to `jakarta.ejb`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",10,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxElToJakartaEl,Migrate deprecated `javax.el` packages to `jakarta.el`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise,Migrate deprecated `javax.enterprise` packages to `jakarta.enterprise`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",7,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxEjbToJakartaEjb,Migrate deprecated `javax.ejb` packages to `jakarta.ejb`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",11,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxElToJakartaEl,Migrate deprecated `javax.el` packages to `jakarta.el`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",7,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise,Migrate deprecated `javax.enterprise` packages to `jakarta.enterprise`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",9,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxFacesConfigXmlToJakartaFacesConfigXml,Migrate xmlns entries in `faces-config.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxFacesTagLibraryXmlToJakartaFacesTagLibraryXml,Migrate xmlns entries in `taglib.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject,Migrate deprecated `javax.inject` packages to `jakarta.inject`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
@@ -254,8 +260,8 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxJsonToJakartaJson,Migrate deprecated `javax.json` packages to `jakarta.json`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",5,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxJspToJakartaJsp,Migrate deprecated `javax.jsp` packages to `jakarta.jsp`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxJwsToJakartaJws,Migrate deprecated `javax.jws` packages to `jakarta.jws`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail,Migrate deprecated `javax.mail` packages to `jakarta.mail`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",8,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
-maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta,Migrate to Jakarta EE 9,Jakarta EE 9 is the first version of Jakarta EE that uses the new `jakarta` namespace.,428,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail,Migrate deprecated `javax.mail` packages to `jakarta.mail`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",9,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
+maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta,Migrate to Jakarta EE 9,Jakarta EE 9 is the first version of Jakarta EE that uses the new `jakarta` namespace.,436,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxOrmXmlToJakartaOrmXml,Migrate xmlns entries in `orm.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxPersistenceToJakartaPersistence,Migrate deprecated `javax.persistence` packages to `jakarta.persistence`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxPersistenceXmlToJakartaPersistenceXml,Migrate xmlns entries in `persistence.xml` files,"Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.",6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,
diff --git a/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxEnterpriseToJakartaEnterpriseTest.java b/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxEnterpriseToJakartaEnterpriseTest.java
new file mode 100644
index 0000000000..b02a8ed0b1
--- /dev/null
+++ b/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxEnterpriseToJakartaEnterpriseTest.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2024 the original author or authors.
+ *
+ * Licensed under the Moderne Source Available License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://docs.moderne.io/licensing/moderne-source-available-license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openrewrite.java.migrate.jakarta;
+
+import org.junit.jupiter.api.Test;
+import org.openrewrite.java.JavaParser;
+import org.openrewrite.test.RecipeSpec;
+import org.openrewrite.test.RewriteTest;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.openrewrite.java.Assertions.*;
+import static org.openrewrite.maven.Assertions.pomXml;
+
+class JavaxEnterpriseToJakartaEnterpriseTest implements RewriteTest {
+ @Override
+ public void defaults(RecipeSpec spec) {
+ spec.recipeFromResources("org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise");
+ }
+
+ @Test
+ void preservesProvidedCdiApi() {
+ rewriteRun(
+ spec -> spec.parser(JavaParser.fromJavaVersion().dependsOn(
+ "package javax.enterprise.inject.spi; public interface BeanManager {}")),
+ mavenProject("demo",
+ pomXml(
+ """
+
+ 4.0.0
+ com.example
+ demo
+ 1.0
+
+
+ javax.enterprise
+ cdi-api
+ 1.0
+ provided
+
+
+
+ """,
+ spec -> spec.after(pom -> assertThat(pom)
+ .contains("jakarta.enterprise.cdi-api", "provided")
+ .doesNotContain("compile").actual())
+ ),
+ srcMainJava(
+ java(
+ "class A { javax.enterprise.inject.spi.BeanManager manager; }",
+ "class A { jakarta.enterprise.inject.spi.BeanManager manager; }"
+ )
+ )
+ )
+ );
+ }
+ @Test
+ void stillAddsMissingCdiApi() {
+ rewriteRun(
+ spec -> spec.parser(JavaParser.fromJavaVersion().dependsOn(
+ "package javax.enterprise.inject.spi; public interface BeanManager {}")),
+ mavenProject("demo",
+ pomXml(
+ """
+
+ 4.0.0
+ com.example
+ demo
+ 1.0
+
+ """,
+ spec -> spec.after(pom -> assertThat(pom).contains("jakarta.enterprise.cdi-api").actual())
+ ),
+ srcMainJava(
+ java(
+ "class A { javax.enterprise.inject.spi.BeanManager manager; }",
+ "class A { jakarta.enterprise.inject.spi.BeanManager manager; }"
+ )
+ )
+ )
+ );
+ }
+
+ @Test
+ void promotesRuntimeApiForMainSource() {
+ rewriteRun(
+ spec -> spec.parser(JavaParser.fromJavaVersion().dependsOn(
+ "package javax.enterprise.inject.spi; public interface BeanManager {}")),
+ mavenProject("demo",
+ pomXml(
+ """
+
+ 4.0.0
+ com.example
+ demo
+ 1.0
+
+
+ javax.enterprise
+ cdi-api
+ 1.0
+ runtime
+
+
+
+ """,
+ spec -> spec.after(pom -> assertThat(pom)
+ .contains("jakarta.enterprise.cdi-api", "compile")
+ .doesNotContain("runtime").actual())
+ ),
+ srcMainJava(
+ java(
+ "class A { javax.enterprise.inject.spi.BeanManager manager; }",
+ "class A { jakarta.enterprise.inject.spi.BeanManager manager; }"
+ )
+ )
+ )
+ );
+ }
+
+}
diff --git a/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxMailToJakartaMailTest.java b/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxMailToJakartaMailTest.java
index 7a59692c39..d6e5431e85 100644
--- a/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxMailToJakartaMailTest.java
+++ b/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxMailToJakartaMailTest.java
@@ -35,6 +35,102 @@ public void defaults(RecipeSpec spec) {
"org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail");
}
+ @Test
+ void preserveProvidedMailApiForMainSource() {
+ rewriteRun(
+ mavenProject("app",
+ srcMainJava(
+ java(
+ "import javax.mail.Session; class A { Session session; }",
+ "import jakarta.mail.Session; class A { Session session; }"
+ )
+ ),
+ pomXml(
+ """
+
+ 4.0.0
+ com.example
+ app
+ 1
+
+
+ javax.mail
+ mail
+ 1.4.7
+ provided
+
+
+
+ """,
+ """
+
+ 4.0.0
+ com.example
+ app
+ 1
+
+
+ jakarta.mail
+ jakarta.mail-api
+ 2.0.2
+ provided
+
+
+
+ """
+ )
+ )
+ );
+ }
+
+ @Test
+ void promoteRuntimeMailApiForMainSource() {
+ rewriteRun(
+ mavenProject("app",
+ srcMainJava(
+ java(
+ "import javax.mail.Session; class A { Session session; }",
+ "import jakarta.mail.Session; class A { Session session; }"
+ )
+ ),
+ pomXml(
+ """
+
+ 4.0.0
+ com.example
+ app
+ 1
+
+
+ javax.mail
+ mail
+ 1.4.7
+ runtime
+
+
+
+ """,
+ """
+
+ 4.0.0
+ com.example
+ app
+ 1
+
+
+ jakarta.mail
+ jakarta.mail-api
+ 2.0.2
+ compile
+
+
+
+ """
+ )
+ )
+ );
+ }
+
@DocumentExample
@Test
void switchesJavaxMailApiDependencyToJakartaMailApiDependency() {
diff --git a/src/test/java/org/openrewrite/java/migrate/jakarta/ProvidedJakartaApiScopeTest.java b/src/test/java/org/openrewrite/java/migrate/jakarta/ProvidedJakartaApiScopeTest.java
new file mode 100644
index 0000000000..31dda6a020
--- /dev/null
+++ b/src/test/java/org/openrewrite/java/migrate/jakarta/ProvidedJakartaApiScopeTest.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2024 the original author or authors.
+ *
+ * Licensed under the Moderne Source Available License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://docs.moderne.io/licensing/moderne-source-available-license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openrewrite.java.migrate.jakarta;
+
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
+import org.openrewrite.java.JavaParser;
+import org.openrewrite.test.RewriteTest;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.openrewrite.java.Assertions.*;
+import static org.openrewrite.maven.Assertions.pomXml;
+
+class ProvidedJakartaApiScopeTest implements RewriteTest {
+ @ParameterizedTest
+ @CsvSource({
+ "JavaxAnnotationMigrationToJakartaAnnotation,javax.annotation,jsr250-api,1.0,annotation,Resource",
+ "JavaxElToJakartaEl,javax.el,el-api,2.2,el,ExpressionFactory",
+ "JavaxEjbToJakartaEjb,javax.ejb,ejb-api,3.0,ejb,EJB",
+ "JavaxEjbToJakartaEjb,org.jboss.spec.javax.ejb,jboss-ejb-api_3.1_spec,1.0.2.Final,ejb,EJB",
+ "JavaxMailToJakartaMail,javax.mail,mail,1.4.7,mail,Session"
+ })
+ void migratesLegacyApiAndPreservesProvidedScope(String recipe, String group, String artifact,
+ String version, String namespace, String type) {
+ rewriteRun(
+ spec -> spec.recipeFromResources("org.openrewrite.java.migrate.jakarta." + recipe)
+ .parser(JavaParser.fromJavaVersion().dependsOn(
+ "package javax." + namespace + "; public class " + type + " {}")),
+ mavenProject("demo",
+ pomXml(
+ """
+
+ 4.0.0
+ com.example
+ demo
+ 1.0
+
+
+ %s
+ %s
+ %s
+ provided
+
+
+
+ """.formatted(group, artifact, version),
+ spec -> spec.after(pom -> assertThat(pom)
+ .contains("jakarta." + namespace + "",
+ "jakarta." + namespace + "-api", "provided")
+ .doesNotContain("" + artifact + "", "compile").actual())
+ ),
+ srcMainJava(
+ java(
+ "class A { javax." + namespace + "." + type + " api; }",
+ "class A { jakarta." + namespace + "." + type + " api; }"
+ )
+ )
+ )
+ );
+ }
+}