From 53e503cf3dc28c30fd6e6f6414119ace01e7e2cd Mon Sep 17 00:00:00 2001 From: "Hudson, Ryan" Date: Mon, 8 Jun 2026 13:54:51 -0400 Subject: [PATCH 01/13] Contributing AddMockitoJavaAgentToMavenSurefirePlugin recipe for better recipe alignment to Mockito recommendations. --- ...MockitoJavaAgentToMavenSurefirePlugin.java | 175 ++ .../META-INF/rewrite/java-version-25.yml | 22 +- .../resources/META-INF/rewrite/recipes.csv | 599 +++---- ...itoJavaAgentToMavenSurefirePluginTest.java | 1442 +++++++++++++++++ .../java/migrate/UpgradeToJava25Test.java | 3 +- 5 files changed, 1919 insertions(+), 322 deletions(-) create mode 100644 src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java create mode 100644 src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java new file mode 100644 index 0000000000..322bf4996c --- /dev/null +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 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; + +import org.intellij.lang.annotations.Language; +import org.openrewrite.ExecutionContext; +import org.openrewrite.Preconditions; +import org.openrewrite.Recipe; +import org.openrewrite.TreeVisitor; +import org.openrewrite.internal.ListUtils; +import org.openrewrite.maven.AddPlugin; +import org.openrewrite.maven.AddPropertyVisitor; +import org.openrewrite.maven.ChangePluginExecutions; +import org.openrewrite.maven.MavenIsoVisitor; +import org.openrewrite.maven.search.DependencyInsight; +import org.openrewrite.maven.search.FindPlugin; +import org.openrewrite.maven.tree.Plugin; +import org.openrewrite.maven.tree.ResolvedDependency; +import org.openrewrite.maven.tree.Scope; +import org.openrewrite.semver.LatestRelease; +import org.openrewrite.xml.AddOrUpdateChildTag; +import org.openrewrite.xml.AddToTagVisitor; +import org.openrewrite.xml.XPathMatcher; +import org.openrewrite.xml.XmlIsoVisitor; +import org.openrewrite.xml.tree.Content; +import org.openrewrite.xml.tree.Xml; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +public class AddMockitoJavaAgentToMavenSurefirePlugin extends Recipe { + + private static final XPathMatcher MAVEN_SUREFIRE_PLUGIN_MATCHER = new XPathMatcher( + "/project/build/plugins/plugin[artifactId='maven-surefire-plugin']"); + + private static final XPathMatcher MAVEN_SUREFIRE_PLUGIN_CONFIGURATION_MATCHER = new XPathMatcher( + "/project/build/plugins/plugin[artifactId='maven-surefire-plugin']/configuration"); + + @Language("xpath") + private static final String MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER = "/project/build/plugins/plugin[artifactId='maven-dependency-plugin']/executions/execution"; + + @Language("xml") + private static final String MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL = "properties"; + + @Language("xml") + private static final String MAVEN_DEPENDENCY_PLUGIN_EXECUTION_TAG = ""+ MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL + ""; + + @Override + public String getDisplayName() { + return "Add Mockito Java Agent to Maven Surefire Plugin"; + } + + @Override + public String getDescription() { + return "Adds required configuration to specifically enable the Mockito/Bytebuddy Java agent in the Maven Surefire plugin for Java 21 compatibility."; + } + + @Override + public TreeVisitor getVisitor() { + return Preconditions.check(new DependencyInsight("org.mockito", "mockito-core", "test", null, false), new MavenIsoVisitor() { + private final String CONFIGURATION_TAG_TEMPLATE = "%s"; + + private String getArgLineJavaAgentArgument() { + String mockitoCoreVersion = getResolutionResult().getDependencies().getOrDefault(Scope.Test, new ArrayList<>()).stream() + .filter(dependency -> dependency.getGroupId().equals("org.mockito") && dependency.getArtifactId() + .equals("mockito-core")).findFirst().map(ResolvedDependency::getVersion).get(); + + return new LatestRelease(null).compare(null, mockitoCoreVersion, "5.14.0") >= 0 ? + "-javaagent:${org.mockito:mockito-core:jar}" : "-javaagent:${net.bytebuddy:byte-buddy-agent:jar}"; + } + + private Xml.Tag buildConfigurationTag(String argLineJavaAgentParam, boolean hasExistingArgLine) { + return Xml.Tag.build(String.format(CONFIGURATION_TAG_TEMPLATE, hasExistingArgLine ? argLineJavaAgentParam : "@{argLine} " + argLineJavaAgentParam)); + } + + private void maybeAddMavenDependencyPluginWithPropertiesGoal() { + Optional mavenDependencyPlugin = getResolutionResult().getPom().getPlugins().stream() + .filter(plugin -> plugin.getGroupId().equals("org.apache.maven.plugins") + && plugin.getArtifactId().equals("maven-dependency-plugin")).findFirst(); + + if (!mavenDependencyPlugin.isPresent()) { + doAfterVisit(new AddPlugin("org.apache.maven.plugins", "maven-dependency-plugin", null, null, null, + "" + MAVEN_DEPENDENCY_PLUGIN_EXECUTION_TAG + "", "**/pom.xml").getVisitor()); + } else if (mavenDependencyPlugin.get().getExecutions().isEmpty()) { + doAfterVisit(new ChangePluginExecutions("org.apache.maven.plugins", "maven-dependency-plugin", MAVEN_DEPENDENCY_PLUGIN_EXECUTION_TAG).getVisitor()); + } else if (mavenDependencyPlugin.get().getExecutions().stream().noneMatch(execution -> execution.getGoals() != null)) { + doAfterVisit(new AddOrUpdateChildTag(MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER, "" + MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL + "", false).getVisitor()); + } else if (mavenDependencyPlugin.get().getExecutions().stream().noneMatch(execution -> execution.getGoals() != null && execution.getGoals().contains("properties"))) { + doAfterVisit(new AppendChildTagToParentVisitor(MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER + "/goals", MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL)); + } + } + + @Override + public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) { + if (getResolutionResult().getPom().getPluginManagement().stream().anyMatch( + plugin -> plugin.getGroupId().equals("org.apache.maven.plugins") && plugin.getArtifactId() + .equals("maven-surefire-plugin") && plugin.getConfigurationStringValue("argLine") != null && plugin.getConfigurationStringValue("argLine").contains(getArgLineJavaAgentArgument()))) { + return document; + } + + maybeAddMavenDependencyPluginWithPropertiesGoal(); + doAfterVisit(new AddPropertyVisitor("argLine", "", true)); + + if (FindPlugin.find(document, "org.apache.maven.plugins", "maven-surefire-plugin").isEmpty()) { + doAfterVisit(new AddPlugin("org.apache.maven.plugins", "maven-surefire-plugin", null, + String.format(CONFIGURATION_TAG_TEMPLATE, "@{argLine} " + getArgLineJavaAgentArgument()), null, + null, null).getVisitor()); + return document; + } + return super.visitDocument(document, ctx); + } + + @Override + public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { + Xml.Tag t = super.visitTag(tag, ctx); + String argLineJavaAgentParam = getArgLineJavaAgentArgument(); + Xml.Tag configurationTag = buildConfigurationTag(argLineJavaAgentParam, false); + + //noinspection unchecked + final List tagContents = (List) t.getContent(); + if (MAVEN_SUREFIRE_PLUGIN_MATCHER.matches(getCursor()) && !t.getChild("configuration").isPresent()) { + return autoFormat(t.withContent(ListUtils.concat(tagContents, configurationTag)), ctx); + } else if (MAVEN_SUREFIRE_PLUGIN_CONFIGURATION_MATCHER.matches(getCursor())) { + List argLineTagChildren = t.getChildren("argLine"); + if (argLineTagChildren.size() == 1) { + Xml.Tag argLineTag = argLineTagChildren.get(0); + String existingArgLineValue = argLineTag.getValue().orElse("@{argLine}"); + + if (!existingArgLineValue.contains(argLineJavaAgentParam)) { + List nonArgLineTags = ListUtils.filter(tagContents, content -> content != argLineTag); + Xml.Tag configurationTagWithExistingArgParams = buildConfigurationTag(existingArgLineValue + " " + argLineJavaAgentParam, true); + return autoFormat(t.withContent( + ListUtils.concatAll(nonArgLineTags, configurationTagWithExistingArgParams.getContent())), ctx); + } + } else if(argLineTagChildren.isEmpty()) { + return autoFormat(t.withContent( + ListUtils.concatAll(tagContents, configurationTag.getContent())), ctx); + } + } + return t; + } + }); + } + public static class AppendChildTagToParentVisitor extends XmlIsoVisitor { + private final XPathMatcher parentXPathMatcher; + private final Xml.Tag newChildTag; + + public AppendChildTagToParentVisitor(String parentXPath, @Language("xml") String newChildTag) { + this.parentXPathMatcher = new XPathMatcher(parentXPath); + this.newChildTag = Xml.Tag.build(newChildTag); + } + + @Override + public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { + if (parentXPathMatcher.matches(getCursor()) && !tag.print(getCursor()).contains(newChildTag.print(getCursor()))) { + return autoFormat(AddToTagVisitor.addToTag(tag, newChildTag, getCursor()), ctx); + } + return super.visitTag(tag, ctx); + } + } +} diff --git a/src/main/resources/META-INF/rewrite/java-version-25.yml b/src/main/resources/META-INF/rewrite/java-version-25.yml index a6df5b20b0..41c637db47 100644 --- a/src/main/resources/META-INF/rewrite/java-version-25.yml +++ b/src/main/resources/META-INF/rewrite/java-version-25.yml @@ -222,27 +222,7 @@ recipeList: groupId: org.mockito artifactId: mockito-* newVersion: 5.17.x - - org.openrewrite.java.migrate.AddSurefireFailsafeArgLineForMockito - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.AddSurefireFailsafeArgLineForMockito -displayName: Add surefire `--add-opens` for Mockito/ByteBuddy -description: >- - Adds `--add-opens` JVM arguments required by Mockito and ByteBuddy to the Maven Surefire and Failsafe plugin - `argLine` configuration. Only applied when the project depends on Mockito. -preconditions: - - org.openrewrite.java.dependencies.search.ModuleHasDependency: - groupIdPattern: org.mockito - artifactIdPattern: mockito-* -recipeList: - - org.openrewrite.java.migrate.AddSurefireFailsafeArgLine: - argLine: >- - --add-opens java.base/java.lang=ALL-UNNAMED - --add-opens java.base/java.lang.reflect=ALL-UNNAMED - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED - --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED - -Dnet.bytebuddy.experimental=true + - org.openrewrite.java.migrate.AddMockitoJavaAgentToMavenSurefirePlugin --- type: specs.openrewrite.org/v1beta/recipe diff --git a/src/main/resources/META-INF/rewrite/recipes.csv b/src/main/resources/META-INF/rewrite/recipes.csv index fee711cd19..1e365c08e0 100644 --- a/src/main/resources/META-INF/rewrite/recipes.csv +++ b/src/main/resources/META-INF/rewrite/recipes.csv @@ -1,430 +1,431 @@ ecosystem,packageName,name,displayName,description,recipeCount,category1,category2,category3,category4,category1Description,category2Description,category3Description,category4Description,options,dataTables maven,org.openrewrite.recipe:rewrite-migrate-java,com.google.guava.InlineGuavaMethods,Inline `guava` methods annotated with `@InlineMe`,Automatically generated recipes to inline method calls based on `@InlineMe` annotations discovered in the type table.,66,,,Guava,Google,,,,,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.JSpecifyBestPractices,JSpecify best practices,"Apply JSpecify best practices, such as migrating off of alternatives, and adding missing `@Nullable` annotations.",34,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromJakartaAnnotationApi,Migrate from Jakarta annotation API to JSpecify,Migrate from Jakarta annotation API to JSpecify.,5,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateToJSpecify,Migrate to JSpecify,This recipe will migrate to JSpecify annotations from various other nullability annotation standards.,29,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromJavaxAnnotationApi,Migrate from javax annotation API to JSpecify,Migrate from javax annotation API to JSpecify.,7,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromJakartaAnnotationApi,Migrate from Jakarta annotation API to JSpecify,Migrate from Jakarta annotation API to JSpecify.,5,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromJetbrainsAnnotations,Migrate from JetBrains annotations to JSpecify,Migrate from JetBrains annotations to JSpecify.,5,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromMicrometerAnnotations,Migrate from Micrometer annotations to JSpecify,Migrate from Micrometer annotations to JSpecify.,6,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromMicronautAnnotations,Migrate from Micronaut Framework annotations to JSpecify,Migrate from Micronaut Framework annotations to JSpecify.,5,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateFromSpringFrameworkAnnotations,Migrate from Spring Framework annotations to JSpecify,Migrate from Spring Framework annotations to JSpecify.,6,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateToJSpecify,Migrate to JSpecify,This recipe will migrate to JSpecify annotations from various other nullability annotation standards.,29,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AccessController,Remove Security AccessController,The Security Manager API is unsupported in Java 24. This recipe will remove the usage of `java.security.AccessController`.,4,,,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.jspecify.MigrateFromMicronautAnnotations,Migrate from Micronaut Framework annotations to JSpecify,Migrate from Micronaut Framework annotations to JSpecify.,5,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddJDeprScanPlugin,Add `JDeprScan` Maven Plug-in,Add the `JDeprScan` Maven plugin to scan class files for uses of deprecated APIs.,1,,,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"":""release"",""type"":""String"",""displayName"":""release"",""description"":""Specifies the Java SE release that provides the set of deprecated APIs for scanning."",""example"":""11""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddLombokMapstructBinding,Add `lombok-mapstruct-binding` when both MapStruct and Lombok are used,Add the `lombok-mapstruct-binding` annotation processor as needed when both MapStruct and Lombok are used.,5,,,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.AddLombokMapstructBindingMavenDependencyOnly,Add `lombok-mapstruct-binding` dependency for Maven when both MapStruct and Lombok are used,"Add the `lombok-mapstruct-binding` when both MapStruct and Lombok are used, and the dependency does not already exist. Only to be called from `org.openrewrite.java.migrate.AddLombokMapstructBinding` to reduce redundant checks.",2,,,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.ArrayStoreExceptionToTypeNotPresentException,Catch `TypeNotPresentException` thrown by `Class.getAnnotation()`,Replace catch blocks for `ArrayStoreException` around `Class.getAnnotation()` with `TypeNotPresentException` to ensure compatibility with Java 11+.,1,,,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.UpgradeDockerImageVersion,Upgrade Docker image Java version,"Upgrade Docker image tags to use the specified Java version. Updates common Java Docker images including eclipse-temurin, amazoncorretto, azul/zulu-openjdk, and others. Also migrates deprecated images (openjdk, adoptopenjdk) to eclipse-temurin. Uses a single `ChangeFrom` glob capture per (image, oldVersion) to preserve any tag suffix.",1,,,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UseJavaUtilBase64,Prefer `java.util.Base64` instead of `sun.misc`,Prefer `java.util.Base64` instead of using `sun.misc` in Java 8 or higher. `sun.misc` is not exported by the Java module system and accessing this class will result in a warning in Java 11 and an error in Java 17.,1,,,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"":""useMimeCoder"",""type"":""boolean"",""displayName"":""Use Mime Coder"",""description"":""Use `Base64.getMimeEncoder()/getMimeDecoder()` instead of `Base64.getEncoder()/getDecoder()`."",""example"":""false"",""value"":false}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.IllegalArgumentExceptionToAlreadyConnectedException,Replace `IllegalArgumentException` with `AlreadyConnectedException` in `DatagramChannel.send()` method,Replace `IllegalArgumentException` with `AlreadyConnectedException` for DatagramChannel.send() to ensure compatibility with Java 11+.,1,,,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.RemovedSecurityManagerMethods,Replace deprecated methods in`SecurityManager`,"Replace `SecurityManager` methods `checkAwtEventQueueAccess()`, `checkSystemClipboardAccess()`, `checkMemberAccess()` and `checkTopLevelWindow()` deprecated in Java SE 11 by `checkPermission(new java.security.AllPermission())`.",1,,,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.AddMockitoJavaAgentToMavenSurefirePlugin,Add Mockito Java Agent to Maven Surefire Plugin,Adds required configuration to specifically enable the Mockito/Bytebuddy Java agent in the Maven Surefire plugin for Java 21 compatibility.,1,,,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.ReplaceLocalizedStreamMethods,Replace `getLocalizedInputStream` and `getLocalizedOutputStream` with direct assignment,Replaces `Runtime.getLocalizedInputStream(InputStream)` and `Runtime.getLocalizedOutputStream(OutputStream)` with their direct arguments. This modification is made because the previous implementation of `getLocalizedInputStream` and `getLocalizedOutputStream` merely returned the arguments provided.,1,,,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"":""localizedInputStreamMethodMatcher"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)"",""value"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)""},{""name"":""localizedOutputStreamMethodMatcher"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)"",""value"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddMissingMethodImplementation,Adds missing method implementations,Check for missing methods required by interfaces and adds them.,1,,,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"":""fullyQualifiedClassName"",""type"":""String"",""displayName"":""Fully qualified class name"",""description"":""A fully qualified class being implemented with missing method."",""example"":""com.yourorg.FooBar"",""required"":true},{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""A method pattern for matching required method definition."",""example"":""*..* hello(..)"",""required"":true},{""name"":""methodTemplateString"",""type"":""String"",""displayName"":""Method template"",""description"":""Template of method to add"",""example"":""public String hello() { return \\\""Hello from #{}!\\\""; }"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddStaticVariableOnProducerSessionBean,Adds `static` modifier to `@Produces` fields that are in session beans,"Ensures that the fields annotated with `@Produces` which is inside the session bean (`@Stateless`, `@Stateful`, or `@Singleton`) are declared `static`.",1,,,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.ReplaceAWTGetPeerMethod,Replace AWT `getPeer()` method,This recipe replaces the use of `getPeer()` method in `java.awt.*` classes. `component.getPeer() != null` is replaced with `component.isDisplayable()` and `component.getPeer() instanceof LightweightPeer` is replaced with `component.isLightweight()`.,1,,,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"":""getPeerMethodPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.awt.* getPeer()"",""value"":""java.awt.* getPeer()""},{""name"":""lightweightPeerFQCN"",""type"":""String"",""displayName"":""The LightweightPeer interface FQCN"",""description"":""The fully qualified class name of the LightweightPeer interface to replace in `instanceof`."",""example"":""java.awt.peer.LightweightPeer"",""value"":""java.awt.peer.LightweightPeer""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UseTabsOrSpaces,Force indentation to either tabs or spaces,"This is useful for one-off migrations of a codebase that has mixed indentation styles, while preserving all other auto-detected formatting rules.",1,,,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"":""useTabs"",""type"":""boolean"",""displayName"":""Use tabs"",""description"":""Whether to use tabs for indentation."",""required"":true,""value"":false}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BeanDiscovery,Behavior change to bean discovery in modules with `beans.xml` file with no version specified,Alters beans with missing version attribute to include this attribute as well as the bean-discovery-mode="all" attribute to maintain an explicit bean archive.,1,,,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.MXBeanRule,MBean and MXBean interfaces must be public,Sets visibility of MBean and MXBean interfaces to public.,1,,,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.UpgradeJavaVersion,Upgrade Java version,"Upgrade build plugin configuration to use the specified Java version. This recipe changes `java.toolchain.languageVersion` in `build.gradle(.kts)` of gradle projects, or maven-compiler-plugin target version and related settings. Will not downgrade if the version is newer than the specified version.",8,,,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSuppressionForIllegalReflectionWarningsPlugin,Add maven jar plugin to suppress illegal reflection warnings,Adds a maven jar plugin that's configured to suppress Illegal Reflection Warnings.,1,,,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"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""An exact version number, or node-style semver selector used to select the version number."",""example"":""29.X""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSurefireFailsafeArgLine,Add `argLine` to surefire and failsafe plugins,"Adds the specified arguments to the `argLine` configuration of the Maven Surefire and Failsafe plugins, merging with any existing argLine value without duplicating arguments.",1,,,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"":""argLine"",""type"":""String"",""displayName"":""Arg line"",""description"":""The arguments to add to the surefire and failsafe plugin `argLine` configuration. Individual arguments are space-separated. Arguments already present in the existing argLine are not duplicated."",""example"":""--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSurefireFailsafeArgLineForMockito,Add surefire `--add-opens` for Mockito/ByteBuddy,Adds `--add-opens` JVM arguments required by Mockito and ByteBuddy to the Maven Surefire and Failsafe plugin `argLine` configuration. Only applied when the project depends on Mockito.,2,,,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.ArrayStoreExceptionToTypeNotPresentException,Catch `TypeNotPresentException` thrown by `Class.getAnnotation()`,Replace catch blocks for `ArrayStoreException` around `Class.getAnnotation()` with `TypeNotPresentException` to ensure compatibility with Java 11+.,1,,,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.BeanDiscovery,Behavior change to bean discovery in modules with `beans.xml` file with no version specified,"Alters beans with missing version attribute to include this attribute as well as the bean-discovery-mode=""all"" attribute to maintain an explicit bean archive.",1,,,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.BeansXmlNamespace,Change `beans.xml` `schemaLocation` to match XML namespace,Set the `schemaLocation` that corresponds to the `xmlns` set in `beans.xml` files.,1,,,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.BounceCastleFromJdk15OntoJdk18On,Migrate Bouncy Castle to `jdk18on`,This recipe will upgrade Bouncy Castle dependencies from `-jdk15on` or `-jdk15to18` to `-jdk18on`.,15,,,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.BouncyCastleFromJdk15OnToJdk15to18,Migrate Bouncy Castle from `jdk15on` to `jdk15to18` for Java < 8,This recipe replaces the Bouncy Castle artifacts from `jdk15on` to `jdk15to18`. `jdk15on` isn't maintained anymore and `jdk18on` is only for Java 8 and above. The `jdk15to18` artifact is the up-to-date replacement of the unmaintained `jdk15on` for Java < 8.,8,,,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.DontOverfetchDto,Replace DTO method parameters with data elements,Replace method parameters that have DTOs with their data elements when only the specified data element is used.,1,,,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"":""dtoType"",""type"":""String"",""displayName"":""DTO type"",""description"":""The fully qualified name of the DTO."",""example"":""animals.Dog"",""required"":true},{""name"":""dtoDataElement"",""type"":""String"",""displayName"":""Data element"",""description"":""Replace the DTO as a method parameter when only this data element is used."",""example"":""name"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpdateSdkMan,Update SDKMan Java version,"Update the SDKMAN JDK version in the `.sdkmanrc` file. Given a major release (e.g., 17), the recipe will update the current distribution to the current default SDKMAN version of the specified major release. The distribution option can be used to specify a specific JVM distribution. Note that these must correspond to valid SDKMAN distributions.",1,,,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"":""newVersion"",""type"":""String"",""displayName"":""Java version"",""description"":""The Java version to update to. Use `latest.patch` to upgrade to the latest version within the current major version."",""example"":""17""},{""name"":""newDistribution"",""type"":""String"",""displayName"":""Distribution"",""description"":""The JVM distribution to use."",""example"":""tem""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.CastArraysAsListToList,Remove explicit casts on `Arrays.asList(..).toArray()`,"Convert code like `(Integer[]) Arrays.asList(1, 2, 3).toArray()` to `Arrays.asList(1, 2, 3).toArray(new Integer[0])`.",1,,,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.ReplaceStringLiteralValue,Replace `String` literal,Replace the value of a complete `String` literal.,2,,,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"":""oldLiteralValue"",""type"":""String"",""displayName"":""Old literal `String` value"",""description"":""The `String` value to replace."",""example"":""apple"",""required"":true},{""name"":""newLiteralValue"",""type"":""String"",""displayName"":""New literal `String` value"",""description"":""The `String` value to replace with."",""example"":""orange"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ChangeDefaultKeyStore,Return String `jks` when `KeyStore.getDefaultType()` is called,"In Java 11 the default keystore was updated from JKS to PKCS12. As a result, applications relying on KeyStore.getDefaultType() may encounter issues after migrating, unless their JKS keystore has been converted to PKCS12. This recipe returns default key store of `jks` when `KeyStore.getDefaultType()` method is called to use the pre Java 11 default keystore.",1,,,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.ChangeMethodInvocationReturnType,Change method invocation return type,Changes the return type of a method invocation.,2,,,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"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""A method pattern that is used to find matching method declarations/invocations."",""example"":""org.mockito.Matchers anyVararg()"",""required"":true},{""name"":""newReturnType"",""type"":""String"",""displayName"":""New method invocation return type"",""description"":""The fully qualified new return type of method invocation."",""example"":""long"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ComIntelliJAnnotationsToOrgJetbrainsAnnotations,Migrate com.intellij:annotations to org.jetbrains:annotations,This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.,2,,,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.DeleteDeprecatedFinalize,Avoid using the deprecated empty `finalize()` method in `java.desktop`,The java.desktop module had a few implementations of finalize() that did nothing and have been removed. This recipe will remove these methods.,4,,,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.DeprecatedCountStackFramesMethod,Remove `Thread.countStackFrames()` method,"`Thread.countStackFrames()` has been removed in Java SE 14 and has been changed in this release to unconditionally throw `UnsupportedOperationException` - This recipe removes the usage of this method in your application as long as the method is not assigned to a variable. - For more information on the Java SE 14 deprecation of this method, see https://bugs.java.com/bugdatabase/view_bug?bug_id=8205132.",2,,,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.DeprecatedJavaxSecurityCert,Use `java.security.cert` instead of `javax.security.cert`,The `javax.security.cert` package has been deprecated for removal.,2,,,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.DeprecatedLogRecordThreadID,Adopt `setLongThreadID` in `java.util.logging.LogRecord`,Avoid using the deprecated methods in `java.util.logging.LogRecord`.,4,,,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.DontOverfetchDto,Replace DTO method parameters with data elements,Replace method parameters that have DTOs with their data elements when only the specified data element is used.,1,,,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"":""dtoType"",""type"":""String"",""displayName"":""DTO type"",""description"":""The fully qualified name of the DTO."",""example"":""animals.Dog"",""required"":true},{""name"":""dtoDataElement"",""type"":""String"",""displayName"":""Data element"",""description"":""Replace the DTO as a method parameter when only this data element is used."",""example"":""name"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.EnableLombokAnnotationProcessor,Enable Lombok annotation processor,With Java 23 the encapsulation of JDK internals made it necessary to configure annotation processors like Lombok explicitly. The change is valid for older versions as well.,3,,,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.IBMJDKtoOracleJDK,Migrate from IBM Runtimes to Oracle Runtimes,This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions necessary for migrating from IBM Runtimes to Oracle Runtimes.,3,,,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.RemoveIllegalSemicolons,Remove illegal semicolons,"Remove semicolons after package declarations and imports, no longer accepted in Java 21 as of [JDK-8027682](https://bugs.openjdk.org/browse/JDK-8027682).",2,,,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.ReplaceComSunAWTUtilitiesMethods,Replace `com.sun.awt.AWTUtilities` static method invocations,"This recipe replaces several static calls in `com.sun.awt.AWTUtilities` with the JavaSE 11 equivalent. The methods replaced are `AWTUtilities.isTranslucencySupported()`, `AWTUtilities.setWindowOpacity()`, `AWTUtilities.getWindowOpacity()`, `AWTUtilities.getWindowShape()`, `AWTUtilities.isWindowOpaque()`, `AWTUtilities.isTranslucencyCapable()` and `AWTUtilities.setComponentMixingCutoutShape()`.",1,,,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"":""getAWTIsWindowsTranslucencyPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)"",""value"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)""},{""name"":""isWindowOpaquePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities isWindowOpaque(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities isWindowOpaque(java.awt.Window)""},{""name"":""isTranslucencyCapablePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)"",""value"":""com.sun.awt.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)""},{""name"":""setWindowOpacityPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities setWindowOpacity(java.awt.Window, float)"",""value"":""com.sun.awt.AWTUtilities setWindowOpacity(java.awt.Window, float)""},{""name"":""getWindowOpacityPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities getWindowOpacity(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowOpacity(java.awt.Window)""},{""name"":""getWindowShapePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilitiesTest getWindowShape(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowShape(java.awt.Window)""},{""name"":""setComponentMixingCutoutShapePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)"",""value"":""com.sun.awt.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSurefireFailsafeArgLine,Add `argLine` to surefire and failsafe plugins,"Adds the specified arguments to the `argLine` configuration of the Maven Surefire and Failsafe plugins, merging with any existing argLine value without duplicating arguments.",1,,,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"":""argLine"",""type"":""String"",""displayName"":""Arg line"",""description"":""The arguments to add to the surefire and failsafe plugin `argLine` configuration. Individual arguments are space-separated. Arguments already present in the existing argLine are not duplicated."",""example"":""--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BeansXmlNamespace,Change `beans.xml` `schemaLocation` to match XML namespace,Set the `schemaLocation` that corresponds to the `xmlns` set in `beans.xml` files.,1,,,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.MigrateGraalVMResourceConfig,Migrate GraalVM resource-config.json to glob patterns,Migrates GraalVM native-image resource-config.json files from the legacy regex pattern format (JDK 21 and earlier) to the new glob pattern format (JDK 23+). Converts `pattern` entries to `glob` entries and restructures the format. Note: `excludes` are no longer supported in the new format and will be removed.,1,,,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.JpaCacheProperties,Disable the persistence unit second-level cache,Sets an explicit value for the shared cache mode.,1,,,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.UpgradeKotlinJvmTargetVersion,Upgrade Kotlin `jvmTarget` to match the Java version,Align the Kotlin `jvmTarget` with the project's Java version so the Kotlin compiler emits bytecode at the same level as `javac`. Covers `kotlin-maven-plugin` `` configuration and the Gradle `kotlinOptions { jvmTarget = ... }` / `compilerOptions { jvmTarget = ... }` blocks (Groovy and Kotlin DSL). Will not downgrade if the existing Kotlin target is higher than the requested version.,1,,,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to align Kotlin's `jvmTarget` with."",""example"":""21"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREThrowableFinalMethods,Rename final method declarations `getSuppressed()` and `addSuppressed(Throwable exception)` in classes that extend `Throwable`,The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes that extend `java.lang.Throwable` to `myGetSuppressed` and `myAddSuppressed(Throwable)`. These methods were added to Throwable in Java 7 and are marked final which cannot be overridden.,1,,,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.ReferenceCloneMethod,Replace `java.lang.ref.Reference.clone()` with constructor call,"The recipe replaces any clone calls that may resolve to a `java.lang.ref.Reference.clone()` or any of its known subclasses: `java.lang.ref.PhantomReference`, `java.lang.ref.SoftReference`, and `java.lang.ref.WeakReference` with a constructor call passing in the referent and reference queue as parameters.",1,,,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.BouncyCastleFromJdk15OnToJdk15to18,Migrate Bouncy Castle from `jdk15on` to `jdk15to18` for Java < 8,This recipe replaces the Bouncy Castle artifacts from `jdk15on` to `jdk15to18`. `jdk15on` isn't maintained anymore and `jdk18on` is only for Java 8 and above. The `jdk15to18` artifact is the up-to-date replacement of the unmaintained `jdk15on` for Java < 8.,8,,,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.BounceCastleFromJdk15OntoJdk18On,Migrate Bouncy Castle to `jdk18on`,This recipe will upgrade Bouncy Castle dependencies from `-jdk15on` or `-jdk15to18` to `-jdk18on`.,15,,,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.IBMSemeru,Migrate to IBM Semeru Runtimes,This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions only available in IBM Semeru Runtimes.,20,,,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.IllegalArgumentExceptionToAlreadyConnectedException,Replace `IllegalArgumentException` with `AlreadyConnectedException` in `DatagramChannel.send()` method,Replace `IllegalArgumentException` with `AlreadyConnectedException` for DatagramChannel.send() to ensure compatibility with Java 11+.,1,,,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.InternalBindPackages,Use `com.sun.xml.bind.*` instead of `com.sun.xml.internal.bind.*`,Do not use APIs from `com.sun.xml.internal.bind.*` packages.,2,,,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.JREDoNotUseSunNetSslAPIs,Use `javax.net.ssl` instead of `com.sun.net.ssl`,Do not use APIs from `com.sun.net.ssl` packages.,2,,,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.JREDoNotUseSunNetSslInternalSslProvider,Use `com.ibm.jsse2` instead of `com.sun.net.ssl.internal.ssl`,Do not use the `com.sun.net.ssl.internal.ssl.Provider` class.,5,,,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.JREDoNotUseSunNetSslInternalWwwProtocol,Use `com.ibm.net.ssl.www2.protocol` instead of `com.sun.net.ssl.internal.www.protocol`,Do not use the `com.sun.net.ssl.internal.www.protocol` package.,2,,,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.IBMJDKtoOracleJDK,Migrate from IBM Runtimes to Oracle Runtimes,This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions necessary for migrating from IBM Runtimes to Oracle Runtimes.,3,,,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.JREDoNotUseSunNetSslInternalWwwProtocolHttpsHandler,Use `com.ibm.net.ssl.www2.protocol.https.Handler` instead of `com.sun.net.ssl.internal.www.protocol.https.Handler`,Do not use the `com.sun.net.ssl.internal.www.protocol.https.Handler` class.,2,,,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.JREJdbcInterfaceNewMethods,Adds missing JDBC interface methods,Add method implementations stubs to classes that implement JDBC interfaces.,10,,,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.JREThrowableFinalMethods,Rename final method declarations `getSuppressed()` and `addSuppressed(Throwable exception)` in classes that extend `Throwable`,The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes that extend `java.lang.Throwable` to `myGetSuppressed` and `myAddSuppressed(Throwable)`. These methods were added to Throwable in Java 7 and are marked final which cannot be overridden.,1,,,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.JREWrapperInterface,Add missing `isWrapperFor` and `unwrap` methods,Add method implementations stubs to classes that implement `java.sql.Wrapper`.,3,,,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.Java8toJava11,Migrate to Java 11,"This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.",255,,,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.JavaBestPractices,Java best practices,"Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.",1505,,,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.JpaCacheProperties,Disable the persistence unit second-level cache,Sets an explicit value for the shared cache mode.,1,,,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.Jre17AgentMainPreMainPublic,Set visibility of `premain` and `agentmain` methods to `public`,Check for a behavior change in Java agents.,5,,,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.JREDoNotUseSunNetSslInternalWwwProtocol,Use `com.ibm.net.ssl.www2.protocol` instead of `com.sun.net.ssl.internal.www.protocol`,Do not use the `com.sun.net.ssl.internal.www.protocol` package.,2,,,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.JREDoNotUseSunNetSslInternalSslProvider,Use `com.ibm.jsse2` instead of `com.sun.net.ssl.internal.ssl`,Do not use the `com.sun.net.ssl.internal.ssl.Provider` class.,5,,,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.JREDoNotUseSunNetSslAPIs,Use `javax.net.ssl` instead of `com.sun.net.ssl`,Do not use APIs from `com.sun.net.ssl` packages.,2,,,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.Krb5LoginModuleClass,Use `com.sun.security.auth.module.Krb5LoginModule` instead of `com.ibm.security.auth.module.Krb5LoginModule`,Do not use the `com.ibm.security.auth.module.Krb5LoginModule` class.,2,,,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.MXBeanRule,MBean and MXBean interfaces must be public,Sets visibility of MBean and MXBean interfaces to public.,1,,,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.MigrateGraalVMResourceConfig,Migrate GraalVM resource-config.json to glob patterns,Migrates GraalVM native-image resource-config.json files from the legacy regex pattern format (JDK 21 and earlier) to the new glob pattern format (JDK 23+). Converts `pattern` entries to `glob` entries and restructures the format. Note: `excludes` are no longer supported in the new format and will be removed.,1,,,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.MigrateZipErrorToZipException,Use `ZipException` instead of `ZipError`,Use `ZipException` instead of the deprecated `ZipError` in Java 9 or higher.,2,,,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.ReferenceCloneMethod,Replace `java.lang.ref.Reference.clone()` with constructor call,"The recipe replaces any clone calls that may resolve to a `java.lang.ref.Reference.clone()` or any of its known subclasses: `java.lang.ref.PhantomReference`, `java.lang.ref.SoftReference`, and `java.lang.ref.WeakReference` with a constructor call passing in the referent and reference queue as parameters.",1,,,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.RemoveIllegalSemicolons,Remove illegal semicolons,"Remove semicolons after package declarations and imports, no longer accepted in Java 21 as of [JDK-8027682](https://bugs.openjdk.org/browse/JDK-8027682).",2,,,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.RemoveSecurityManager,Remove Security SecurityManager,The Security Manager API is unsupported in Java 24. This recipe will remove the usage of `java.security.SecurityManager`.,4,,,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.RemoveSecurityPolicy,Remove Security Policy,The Security Manager API is unsupported in Java 24. This recipe will remove the use of `java.security.Policy`.,4,,,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.RemovedFileIOFinalizeMethods,Replace `finalize` method in `java.io.FileInputStream` and `java.io.FileOutputStream`,The `finalize` method in `java.io.FileInputStream` and `java.io.FileOutputStream` is no longer available in Java SE 12 and later. The recipe replaces it with the `close` method.,3,,,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.RemovedJavaXMLWSModuleProvided,Do not package `java.xml.ws` module in WebSphere Liberty applications,"The `java.xml.ws` module was removed in Java11. Websphere Liberty provides its own implementation of the module, which can be used by specifying the `jaxws-2.2` feature in the server.xml file. This recipe updates the `javax.xml.ws` dependency to use the `provided` scope to avoid class loading issues.",3,,,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.RemovedJaxBModuleProvided,Do not package `java.xml.bind` and `java.activation` modules in WebSphere Liberty applications,"The `java.xml.bind` and `java.activation` modules were removed in Java11. Websphere Liberty provides its own implementation of the modules, which can be used by specifying the `jaxb-2.2` feature in the server.xml file. This recipe updates the `javax.xml.bind` and `javax.activation` dependencies to use the `provided` scope to avoid class loading issues.",5,,,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.RemovedLegacySunJSSEProviderName,Use `SunJSSE` instead of `com.sun.net.ssl.internal.ssl.Provider`,The `com.sun.net.ssl.internal.ssl.Provider` provider name was removed.,2,,,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.RemovedModifierAndConstantBootstrapsConstructors,Change `java.lang.reflect.Modifier` and ` java.lang.invoke.ConstantBootstraps` method calls to static,The `java.lang.reflect.Modifier()` and `java.lang.invoke.ConstantBootstraps()` constructors have been removed in Java SE 15 because both classes only contain static methods. This recipe converts the usage of all methods in the two classes to be static. See https://docs.oracle.com/en/java/javase/15/migrate/index.html#GUID-233853B8-0782-429E-BEF7-7532EE610E63 for more information on these changes.,3,,,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.WasDevMvnChangeParentArtifactId,Change `net.wasdev.maven.parent:java8-parent` to `:parent`,This recipe changes the artifactId of the `` tag in the `pom.xml` from `java8-parent` to `parent`.,2,,,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.ComIntelliJAnnotationsToOrgJetbrainsAnnotations,Migrate com.intellij:annotations to org.jetbrains:annotations,This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.,2,,,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.JavaBestPractices,Java best practices,"Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.",1505,,,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.javaee6,Migrate to JavaEE6,"These recipes help with the Migration to Java EE 6, flagging and updating deprecated methods.",2,,,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.javaee7,Migrate to JavaEE7,"These recipes help with the Migration to Java EE 7, flagging and updating deprecated methods.",8,,,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.javaee8,Migrate to JavaEE8,"These recipes help with the Migration to Java EE 8, flagging and updating deprecated methods.",18,,,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.Java8toJava11,Migrate to Java 11,"This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.",255,,,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.UpgradeBuildToJava11,Upgrade build to Java 11,Updates build files to use Java 11 as the target/source.,39,,,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.UpgradePluginsForJava11,Upgrade plugins to Java 11 compatible versions,Updates plugins to version compatible with Java 11.,6,,,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.InternalBindPackages,Use `com.sun.xml.bind.*` instead of `com.sun.xml.internal.bind.*`,Do not use APIs from `com.sun.xml.internal.bind.*` packages.,2,,,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.RemovedPolicy,Replace `javax.security.auth.Policy` with `java.security.Policy`,The `javax.security.auth.Policy` class is not available from Java SE 11 onwards.,2,,,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.RemovedRMIConnectorServerCredentialTypesConstant,Replace `RMIConnectorServer.CREDENTIAL_TYPES` constant,This recipe replaces the `RMIConnectorServer.CREDENTIAL_TYPES` constant with the `RMIConnectorServer.CREDENTIALS_FILTER_PATTERN` constant.,2,,,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.RemovedRuntimeTraceMethods,Remove `Runtime.traceInstructions(boolean)` and `Runtime.traceMethodCalls` methods,The `traceInstructions` and `traceMethodCalls` methods in `java.lang.Runtime` were deprecated in Java SE 9 and are no longer available in Java SE 13 and later. The recipe removes the invocations of these methods since the method invocations do nothing functionally.,3,,,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.RemovedSSLSessionGetPeerCertificateChainMethodImpl,Replace `SSLSession.getPeerCertificateChain()` method,The `javax.net.ssl.SSLSession.getPeerCertificateChain()` method implementation was removed from the SunJSSE provider and HTTP client implementation in Java SE 15. The default implementation will now throw an `UnsupportedOperationException`. Applications using this method should be updated to use the `javax.net.ssl.SSLSession.getPeerCertificates()` method instead.,2,,,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.RemovedSecurityManagerMethods,Replace deprecated methods in`SecurityManager`,"Replace `SecurityManager` methods `checkAwtEventQueueAccess()`, `checkSystemClipboardAccess()`, `checkMemberAccess()` and `checkTopLevelWindow()` deprecated in Java SE 11 by `checkPermission(new java.security.AllPermission())`.",1,,,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.RemovedSubjectMethods,Adopt `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()` methods`,Replaces the `javax.security.auth.Subject.getSubject()` and `javax.security.auth.Subject.doAs()` methods with `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()`.,3,,,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.RemovedToolProviderConstructor,Change `javax.tools.ToolProvider` methods calls to static,"The `javax.tools.ToolProvider()` constructor has been removed in Java SE 16 since the class only contains static methods. The recipe converts `javax.tools.ToolProvider getSystemJavaCompiler()`, `javax.tools.ToolProvider getSystemDocumentationTool()` and `javax.tools.ToolProvider getSystemToolClassLoader()` to static methods.",2,,,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.ThreadStopDestroy,Remove `Thread.destroy()` and `Thread.stop(Throwable)`,"The `java.lang.Thread.destroy()` method was never implemented, and the `java.lang.Thread.stop(java.lang.Throwable)` method has been unusable since Java SE 8. This recipe removes any usage of these methods from your application.",3,,,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.UpgradeToJava17,Migrate to Java 17,"This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.",416,,,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.UpgradeBuildToJava17,Upgrade build to Java 17,Updates build files to use Java 17 as the target/source.,99,,,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.UpgradePluginsForJava17,Upgrade plugins to Java 17 compatible versions,Updates plugins to version compatible with Java 17.,8,,,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.DeprecatedJavaxSecurityCert,Use `java.security.cert` instead of `javax.security.cert`,The `javax.security.cert` package has been deprecated for removal.,2,,,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.RemovedLegacySunJSSEProviderName,Use `SunJSSE` instead of `com.sun.net.ssl.internal.ssl.Provider`,The `com.sun.net.ssl.internal.ssl.Provider` provider name was removed.,2,,,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.DeprecatedLogRecordThreadID,Adopt `setLongThreadID` in `java.util.logging.LogRecord`,Avoid using the deprecated methods in `java.util.logging.LogRecord`.,4,,,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.Jre17AgentMainPreMainPublic,Set visibility of `premain` and `agentmain` methods to `public`,Check for a behavior change in Java agents.,5,,,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.RemovedZipFinalizeMethods,"Replace `finalize` method in `java.util.zip.ZipFile`, `java.util.zip.Inflater` and `java.util.zip.Deflater`","The `finalize` method in `java.util.zip.ZipFile` is replaced with the `close` method and is replaced by the `end` method in `java.util.zip.Inflater` and `java.util.zip.Deflater` as it is no longer available in Java SE 12 and later.",4,,,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.ReplaceAWTGetPeerMethod,Replace AWT `getPeer()` method,This recipe replaces the use of `getPeer()` method in `java.awt.*` classes. `component.getPeer() != null` is replaced with `component.isDisplayable()` and `component.getPeer() instanceof LightweightPeer` is replaced with `component.isLightweight()`.,1,,,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"":""getPeerMethodPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.awt.* getPeer()"",""value"":""java.awt.* getPeer()""},{""name"":""lightweightPeerFQCN"",""type"":""String"",""displayName"":""The LightweightPeer interface FQCN"",""description"":""The fully qualified class name of the LightweightPeer interface to replace in `instanceof`."",""example"":""java.awt.peer.LightweightPeer"",""value"":""java.awt.peer.LightweightPeer""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods,Replace `com.sun.awt.AWTUtilities` static method invocations,"This recipe replaces several static calls in `com.sun.awt.AWTUtilities` with the JavaSE 11 equivalent. The methods replaced are `AWTUtilities.isTranslucencySupported()`, `AWTUtilities.setWindowOpacity()`, `AWTUtilities.getWindowOpacity()`, `AWTUtilities.getWindowShape()`, `AWTUtilities.isWindowOpaque()`, `AWTUtilities.isTranslucencyCapable()` and `AWTUtilities.setComponentMixingCutoutShape()`.",1,,,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"":""getAWTIsWindowsTranslucencyPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)"",""value"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)""},{""name"":""isWindowOpaquePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities isWindowOpaque(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities isWindowOpaque(java.awt.Window)""},{""name"":""isTranslucencyCapablePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)"",""value"":""com.sun.awt.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)""},{""name"":""setWindowOpacityPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities setWindowOpacity(java.awt.Window, float)"",""value"":""com.sun.awt.AWTUtilities setWindowOpacity(java.awt.Window, float)""},{""name"":""getWindowOpacityPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities getWindowOpacity(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowOpacity(java.awt.Window)""},{""name"":""getWindowShapePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilitiesTest getWindowShape(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowShape(java.awt.Window)""},{""name"":""setComponentMixingCutoutShapePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)"",""value"":""com.sun.awt.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceLocalizedStreamMethods,Replace `getLocalizedInputStream` and `getLocalizedOutputStream` with direct assignment,Replaces `Runtime.getLocalizedInputStream(InputStream)` and `Runtime.getLocalizedOutputStream(OutputStream)` with their direct arguments. This modification is made because the previous implementation of `getLocalizedInputStream` and `getLocalizedOutputStream` merely returned the arguments provided.,1,,,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"":""localizedInputStreamMethodMatcher"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)"",""value"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)""},{""name"":""localizedOutputStreamMethodMatcher"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)"",""value"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceStringLiteralValue,Replace `String` literal,Replace the value of a complete `String` literal.,2,,,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"":""oldLiteralValue"",""type"":""String"",""displayName"":""Old literal `String` value"",""description"":""The `String` value to replace."",""example"":""apple"",""required"":true},{""name"":""newLiteralValue"",""type"":""String"",""displayName"":""New literal `String` value"",""description"":""The `String` value to replace with."",""example"":""orange"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl,Replace `SSLSession.getPeerCertificateChain()` method,The `javax.net.ssl.SSLSession.getPeerCertificateChain()` method implementation was removed from the SunJSSE provider and HTTP client implementation in Java SE 15. The default implementation will now throw an `UnsupportedOperationException`. Applications using this method should be updated to use the `javax.net.ssl.SSLSession.getPeerCertificates()` method instead.,2,,,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.SunNetSslPackageUnavailable,Replace `com.sun.net.ssl` package,The internal API `com.sun.net.ssl` is removed. The package was intended for internal use only and replacement APIs can be found in the `javax.net.ssl` package.,2,,,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.RemovedRMIConnectorServerCredentialTypesConstant,Replace `RMIConnectorServer.CREDENTIAL_TYPES` constant,This recipe replaces the `RMIConnectorServer.CREDENTIAL_TYPES` constant with the `RMIConnectorServer.CREDENTIALS_FILTER_PATTERN` constant.,2,,,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.DeprecatedCountStackFramesMethod,Remove `Thread.countStackFrames()` method,"`Thread.countStackFrames()` has been removed in Java SE 14 and has been changed in this release to unconditionally throw `UnsupportedOperationException` + This recipe removes the usage of this method in your application as long as the method is not assigned to a variable. + For more information on the Java SE 14 deprecation of this method, see https://bugs.java.com/bugdatabase/view_bug?bug_id=8205132.",2,,,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.RemovedFileIOFinalizeMethods,Replace `finalize` method in `java.io.FileInputStream` and `java.io.FileOutputStream`,The `finalize` method in `java.io.FileInputStream` and `java.io.FileOutputStream` is no longer available in Java SE 12 and later. The recipe replaces it with the `close` method.,3,,,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.RemovedToolProviderConstructor,Change `javax.tools.ToolProvider` methods calls to static,"The `javax.tools.ToolProvider()` constructor has been removed in Java SE 16 since the class only contains static methods. The recipe converts `javax.tools.ToolProvider getSystemJavaCompiler()`, `javax.tools.ToolProvider getSystemDocumentationTool()` and `javax.tools.ToolProvider getSystemToolClassLoader()` to static methods.",2,,,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.RemovedModifierAndConstantBootstrapsConstructors,Change `java.lang.reflect.Modifier` and ` java.lang.invoke.ConstantBootstraps` method calls to static,The `java.lang.reflect.Modifier()` and `java.lang.invoke.ConstantBootstraps()` constructors have been removed in Java SE 15 because both classes only contain static methods. This recipe converts the usage of all methods in the two classes to be static. See https://docs.oracle.com/en/java/javase/15/migrate/index.html#GUID-233853B8-0782-429E-BEF7-7532EE610E63 for more information on these changes.,3,,,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.RemovedRuntimeTraceMethods,Remove `Runtime.traceInstructions(boolean)` and `Runtime.traceMethodCalls` methods,The `traceInstructions` and `traceMethodCalls` methods in `java.lang.Runtime` were deprecated in Java SE 9 and are no longer available in Java SE 13 and later. The recipe removes the invocations of these methods since the method invocations do nothing functionally.,3,,,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.AddLombokMapstructBinding,Add `lombok-mapstruct-binding` when both MapStruct and Lombok are used,Add the `lombok-mapstruct-binding` annotation processor as needed when both MapStruct and Lombok are used.,5,,,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.AddLombokMapstructBindingMavenDependencyOnly,Add `lombok-mapstruct-binding` dependency for Maven when both MapStruct and Lombok are used,"Add the `lombok-mapstruct-binding` when both MapStruct and Lombok are used, and the dependency does not already exist. Only to be called from `org.openrewrite.java.migrate.AddLombokMapstructBinding` to reduce redundant checks.",2,,,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.UpgradeToJava21,Migrate to Java 21,This recipe will apply changes commonly needed when migrating to Java 21. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 21 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 21.,592,,,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.UpgradeBuildToJava21,Upgrade build to Java 21,Updates build files to use Java 21 as the target/source.,139,,,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.UpgradePluginsForJava21,Upgrade plugins to Java 21 compatible versions,Updates plugins and dependencies to version compatible with Java 21.,6,,,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.RemovedSubjectMethods,Adopt `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()` methods`,Replaces the `javax.security.auth.Subject.getSubject()` and `javax.security.auth.Subject.doAs()` methods with `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()`.,3,,,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.DeleteDeprecatedFinalize,Avoid using the deprecated empty `finalize()` method in `java.desktop`,The java.desktop module had a few implementations of finalize() that did nothing and have been removed. This recipe will remove these methods.,4,,,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.SwitchPatternMatching,Adopt switch pattern matching (JEP 441),[JEP 441](https://openjdk.org/jeps/441) describes how some switch statements can be improved with pattern matching. This recipe applies some of those improvements where applicable.,3,,,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.UpgradeToJava25,Migrate to Java 25,This recipe will apply changes commonly needed when migrating to Java 25. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 25 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 25.,1156,,,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.AccessController,Remove Security AccessController,The Security Manager API is unsupported in Java 24. This recipe will remove the usage of `java.security.AccessController`.,4,,,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.RemoveSecurityPolicy,Remove Security Policy,The Security Manager API is unsupported in Java 24. This recipe will remove the use of `java.security.Policy`.,4,,,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.RemoveSecurityManager,Remove Security SecurityManager,The Security Manager API is unsupported in Java 24. This recipe will remove the usage of `java.security.SecurityManager`.,4,,,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.SystemGetSecurityManagerToNull,Replace `System.getSecurityManager()` with `null`,The Security Manager API is unsupported in Java 24. This recipe will replace `System.getSecurityManager()` with `null` to make its behavior more obvious and try to simplify execution paths afterwards.,3,,,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.ThreadStopDestroy,Remove `Thread.destroy()` and `Thread.stop(Throwable)`,"The `java.lang.Thread.destroy()` method was never implemented, and the `java.lang.Thread.stop(java.lang.Throwable)` method has been unusable since Java SE 8. This recipe removes any usage of these methods from your application.",3,,,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.UpdateSdkMan,Update SDKMan Java version,"Update the SDKMAN JDK version in the `.sdkmanrc` file. Given a major release (e.g., 17), the recipe will update the current distribution to the current default SDKMAN version of the specified major release. The distribution option can be used to specify a specific JVM distribution. Note that these must correspond to valid SDKMAN distributions.",1,,,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"":""newVersion"",""type"":""String"",""displayName"":""Java version"",""description"":""The Java version to update to. Use `latest.patch` to upgrade to the latest version within the current major version."",""example"":""17""},{""name"":""newDistribution"",""type"":""String"",""displayName"":""Distribution"",""description"":""The JVM distribution to use."",""example"":""tem""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava11,Upgrade build to Java 11,Updates build files to use Java 11 as the target/source.,39,,,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.UpgradeBuildToJava17,Upgrade build to Java 17,Updates build files to use Java 17 as the target/source.,99,,,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.UpgradeBuildToJava21,Upgrade build to Java 21,Updates build files to use Java 21 as the target/source.,139,,,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.MigrateZipErrorToZipException,Use `ZipException` instead of `ZipError`,Use `ZipException` instead of the deprecated `ZipError` in Java 9 or higher.,2,,,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.EnableLombokAnnotationProcessor,Enable Lombok annotation processor,With Java 23 the encapsulation of JDK internals made it necessary to configure annotation processors like Lombok explicitly. The change is valid for older versions as well.,3,,,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.UpgradePluginsForJava25,Upgrade plugins to Java 25 compatible versions,Updates plugins and dependencies to versions compatible with Java 25.,10,,,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.AddSurefireFailsafeArgLineForMockito,Add surefire `--add-opens` for Mockito/ByteBuddy,Adds `--add-opens` JVM arguments required by Mockito and ByteBuddy to the Maven Surefire and Failsafe plugin `argLine` configuration. Only applied when the project depends on Mockito.,2,,,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.UpgradeBuildToJava24,Upgrade build to Java 24 for Kotlin pre-2.3,"Kotlin versions before 2.3 only support up to Java 24. Applies only to modules that actually compile Kotlin (i.e. contain `.kt` source files), so transitive `kotlin-stdlib` dependencies do not trigger the cap.",169,,,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.UpgradeBuildToJava25,Upgrade build to Java 25 (non-Kotlin),"Upgrades build files to Java 25 for modules without Kotlin source files. This covers pure Java projects, including those that only pick up `kotlin-stdlib` transitively through another dependency.",179,,,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.UpgradeBuildToJava25ForKotlin,Upgrade build to Java 25 for Kotlin 2.3+,Upgrades build files to Java 25 for Kotlin modules already on Kotlin 2.3 or later.,179,,,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.UpgradeDockerImageVersion,Upgrade Docker image Java version,"Upgrade Docker image tags to use the specified Java version. Updates common Java Docker images including eclipse-temurin, amazoncorretto, azul/zulu-openjdk, and others. Also migrates deprecated images (openjdk, adoptopenjdk) to eclipse-temurin. Uses a single `ChangeFrom` glob capture per (image, oldVersion) to preserve any tag suffix.",1,,,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeJavaVersion,Upgrade Java version,"Upgrade build plugin configuration to use the specified Java version. This recipe changes `java.toolchain.languageVersion` in `build.gradle(.kts)` of gradle projects, or maven-compiler-plugin target version and related settings. Will not downgrade if the version is newer than the specified version.",8,,,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeKotlinJvmTargetVersion,Upgrade Kotlin `jvmTarget` to match the Java version,Align the Kotlin `jvmTarget` with the project's Java version so the Kotlin compiler emits bytecode at the same level as `javac`. Covers `kotlin-maven-plugin` `` configuration and the Gradle `kotlinOptions { jvmTarget = ... }` / `compilerOptions { jvmTarget = ... }` blocks (Groovy and Kotlin DSL). Will not downgrade if the existing Kotlin target is higher than the requested version.,1,,,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to align Kotlin's `jvmTarget` with."",""example"":""21"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradePluginsForJava11,Upgrade plugins to Java 11 compatible versions,Updates plugins to version compatible with Java 11.,6,,,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.UpgradePluginsForJava17,Upgrade plugins to Java 17 compatible versions,Updates plugins to version compatible with Java 17.,8,,,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.UpgradePluginsForJava21,Upgrade plugins to Java 21 compatible versions,Updates plugins and dependencies to version compatible with Java 21.,6,,,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.UpgradePluginsForJava25,Upgrade plugins to Java 25 compatible versions,Updates plugins and dependencies to versions compatible with Java 25.,10,,,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.UpgradeToJava17,Migrate to Java 17,"This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.",416,,,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.UpgradeToJava21,Migrate to Java 21,This recipe will apply changes commonly needed when migrating to Java 21. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 21 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 21.,592,,,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.UpgradeToJava25,Migrate to Java 25,This recipe will apply changes commonly needed when migrating to Java 25. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 25 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 25.,1156,,,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.UpgradeToJava6,Migrate to Java 6,This recipe will apply changes commonly needed when upgrading to Java 6. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.,7,,,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.JREWrapperInterface,Add missing `isWrapperFor` and `unwrap` methods,Add method implementations stubs to classes that implement `java.sql.Wrapper`.,3,,,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.UpgradeToJava7,Migrate to Java 7,This recipe will apply changes commonly needed when upgrading to Java 7. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.,28,,,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.JREJdbcInterfaceNewMethods,Adds missing JDBC interface methods,Add method implementations stubs to classes that implement JDBC interfaces.,10,,,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.UpgradeToJava8,Migrate to Java 8,This recipe will apply changes commonly needed when upgrading to Java 8. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.,54,,,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.UseJavaUtilBase64,Prefer `java.util.Base64` instead of `sun.misc`,Prefer `java.util.Base64` instead of using `sun.misc` in Java 8 or higher. `sun.misc` is not exported by the Java module system and accessing this class will result in a warning in Java 11 and an error in Java 17.,1,,,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"":""useMimeCoder"",""type"":""boolean"",""displayName"":""Use Mime Coder"",""description"":""Use `Base64.getMimeEncoder()/getMimeDecoder()` instead of `Base64.getEncoder()/getDecoder()`."",""example"":""false"",""value"":false}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UseTabsOrSpaces,Force indentation to either tabs or spaces,"This is useful for one-off migrations of a codebase that has mixed indentation styles, while preserving all other auto-detected formatting rules.",1,,,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"":""useTabs"",""type"":""boolean"",""displayName"":""Use tabs"",""description"":""Whether to use tabs for indentation."",""required"":true,""value"":false}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.WasDevMvnChangeParentArtifactId,Change `net.wasdev.maven.parent:java8-parent` to `:parent`,This recipe changes the artifactId of the `` tag in the `pom.xml` from `java8-parent` to `parent`.,2,,,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.cobertura.RemoveCoberturaMavenPlugin,Remove Cobertura Maven plugin,"This recipe will remove Cobertura, as it is not compatible with Java 11.",2,,Cobertura,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.concurrent.JavaConcurrentAPIs,Use modernized `java.util.concurrent` APIs,The Java concurrent APIs were updated in Java 9 and those changes resulted in certain APIs being deprecated. This recipe update an application to replace the deprecated APIs with their modern alternatives.,15,,`java.util.concurrent` 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.concurrent.MigrateAtomicBooleanWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicBoolean#weakCompareAndSetPlain(boolean, boolean)`","Use `AtomicBoolean#weakCompareAndSetPlain(boolean, boolean)` instead of the deprecated `AtomicBoolean#weakCompareAndSet(boolean, boolean)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicIntegerArrayWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicIntegerArray#weakCompareAndSetPlain(int, int, int)`","Use `AtomicIntegerArray#weakCompareAndSetPlain(int, int, int)` instead of the deprecated `AtomicIntegerArray#weakCompareAndSet(int, int, int)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicIntegerWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicInteger#weakCompareAndSetPlain(int, int)`","Use `AtomicInteger#weakCompareAndSetPlain(int, int)` instead of the deprecated `AtomicInteger#weakCompareAndSet(int, int)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicLongArrayWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicLongArray#weakCompareAndSetPlain(int, long, long)`","Use `AtomicLongArray#weakCompareAndSetPlain(int, long, long)` instead of the deprecated `AtomicLongArray#weakCompareAndSet(int, long, long)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicIntegerArrayWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicIntegerArray#weakCompareAndSetPlain(int, int, int)`","Use `AtomicIntegerArray#weakCompareAndSetPlain(int, int, int)` instead of the deprecated `AtomicIntegerArray#weakCompareAndSet(int, int, int)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicLongWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicLong#weakCompareAndSetPlain(long, long)`","Use `AtomicLong#weakCompareAndSetPlain(long, long)` instead of the deprecated `AtomicLong#weakCompareAndSet(long, long)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicReferenceArrayWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicReferenceArray#weakCompareAndSetPlain(int, T, T)`","Use `AtomicReferenceArray#weakCompareAndSetPlain(int, T, T)` instead of the deprecated `AtomicReferenceArray#weakCompareAndSet(int, T, T)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicLongArrayWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicLongArray#weakCompareAndSetPlain(int, long, long)`","Use `AtomicLongArray#weakCompareAndSetPlain(int, long, long)` instead of the deprecated `AtomicLongArray#weakCompareAndSet(int, long, long)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicReferenceWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicReference#weakCompareAndSetPlain(T, T)`","Use `AtomicReference#weakCompareAndSetPlain(T, T)` instead of the deprecated `AtomicReference#weakCompareAndSet(T, T)` in Java 9 or higher.",2,,`java.util.concurrent` 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.concurrent.MigrateAtomicReferenceArrayWeakCompareAndSetToWeakCompareAndSetPlain,"Use `AtomicReferenceArray#weakCompareAndSetPlain(int, T, T)`","Use `AtomicReferenceArray#weakCompareAndSetPlain(int, T, T)` instead of the deprecated `AtomicReferenceArray#weakCompareAndSet(int, T, T)` in Java 9 or higher.",2,,`java.util.concurrent` 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.datanucleus.UpgradeDataNucleus_4_0,Migrate to DataNucleus 4.0,"Migrate DataNucleus 3.x applications to 4.0. This recipe handles package relocations, type renames, property key changes, and dependency updates introduced in AccessPlatform 4.0.",35,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusPackageMoves_4_0,DataNucleus 4.0 package moves,Relocate packages that were moved in DataNucleus 4.0.,6,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusPackageMoves_5_0,DataNucleus 5.0 package moves,Relocate packages that were moved in DataNucleus 5.0.,6,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusPackageMoves_5_2,DataNucleus 5.2 package moves,Relocate packages that were moved in DataNucleus 5.2.,2,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_4_0,DataNucleus 4.0 property migrations,Rename property keys that changed in DataNucleus 4.0.,23,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_5_0,DataNucleus 5.0 property migrations,Rename property keys that changed in DataNucleus 5.0.,9,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_5_1,DataNucleus 5.1 property migrations,Rename property keys that changed in DataNucleus 5.1.,19,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_5_2,DataNucleus 5.2 property migrations,Rename property keys that changed in DataNucleus 5.2.,7,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusTypeChanges_4_0,DataNucleus 4.0 type changes,Rename types that were changed in DataNucleus 4.0.,3,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusTypeChanges_5_0,DataNucleus 5.0 type changes,Rename types that were changed in DataNucleus 5.0.,2,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.UpgradeDataNucleus_4_0,Migrate to DataNucleus 4.0,"Migrate DataNucleus 3.x applications to 4.0. This recipe handles package relocations, type renames, property key changes, and dependency updates introduced in AccessPlatform 4.0.",35,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_4_0,DataNucleus 4.0 property migrations,Rename property keys that changed in DataNucleus 4.0.,23,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.UpgradeDataNucleus_5_0,Migrate to DataNucleus 5.0,"Migrate DataNucleus 4.x applications to 5.0. This recipe handles package relocations, type renames, property key changes, and dependency updates.",55,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusPackageMoves_5_0,DataNucleus 5.0 package moves,Relocate packages that were moved in DataNucleus 5.0.,6,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusTypeChanges_5_0,DataNucleus 5.0 type changes,Rename types that were changed in DataNucleus 5.0.,2,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_5_0,DataNucleus 5.0 property migrations,Rename property keys that changed in DataNucleus 5.0.,9,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.UpgradeDataNucleus_5_1,Migrate to DataNucleus 5.1,"Migrate DataNucleus applications to 5.1. This recipe first applies the 5.0 migration, then handles the transaction namespace reorganization and other property renames introduced in 5.1.",76,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_5_1,DataNucleus 5.1 property migrations,Rename property keys that changed in DataNucleus 5.1.,19,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.UpgradeDataNucleus_5_2,Migrate to DataNucleus 5.2,"Migrate DataNucleus applications to 5.2. This recipe first applies the 5.1 migration, then handles the column mapping package move and query-related property renames introduced in 5.2.",87,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.guava.NoGuava,Prefer the Java standard library instead of Guava,"Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.",185,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaAtomicsNewReference,Prefer `new AtomicReference<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaCollections2Transform,Prefer `Collection.stream().map(Function)` over `Collections2.transform`,"Prefer `Collection.stream().map(Function)` over `Collections2.transform(Collection, Function)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaCreateTempDir,Prefer `Files#createTempDirectory()`,Replaces Guava `Files#createTempDir()` with Java `Files#createTempDirectory(..)`. Transformations are limited to scopes throwing or catching `java.io.IOException`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaDirectExecutor,Prefer `Runnable::run`,"`Executor` is a SAM-compatible interface, so `Runnable::run` is just as succinct as `MoreExecutors.directExecutor()` but without the third-party library requirement.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaFunctionsCompose,Prefer `Function.compose(Function)`,"Prefer `Function.compose(Function)` over `Functions.compose(Function, Function)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableListCopyOf,Prefer `List.copyOf(..)` in Java 10 or higher,Replaces `.common.collect.ImmutableList.copyOf(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableListOf,Prefer `List.of(..)` in Java 9 or higher,Replaces `.common.collect.ImmutableList.of(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableMapCopyOf,Prefer `Map.copyOf(..)` in Java 10 or higher,Replaces `.common.collect.ImmutableMap.copyOf(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableMapOf,Prefer `Map.of(..)` in Java 9 or higher,Replaces `.common.collect.ImmutableMap.of(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableSetCopyOf,Prefer `Set.copyOf(..)` in Java 10 or higher,Replaces `.common.collect.ImmutableSet.copyOf(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.datanucleus.DataNucleusPackageMoves_5_2,DataNucleus 5.2 package moves,Relocate packages that were moved in DataNucleus 5.2.,2,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.datanucleus.DataNucleusProperties_5_2,DataNucleus 5.2 property migrations,Rename property keys that changed in DataNucleus 5.2.,7,,DataNucleus,Modernize,Java,,Recipes for migrating [DataNucleus](https://www.datanucleus.org/) JDO/JPA persistence applications.,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.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullRecipe,`Preconditions.checkNotNull` with `String` message to `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaMapsNewLinkedHashMap,Prefer `new LinkedHashMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableSetOf,Prefer `Set.of(..)` in Java 9 or higher,Replaces `.common.collect.ImmutableSet.of(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaMapsNewTreeMap,Prefer `new TreeMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableListCopyOf,Prefer `List.copyOf(..)` in Java 10 or higher,Replaces `.common.collect.ImmutableList.copyOf(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaFunctionsCompose,Prefer `Function.compose(Function)`,"Prefer `Function.compose(Function)` over `Functions.compose(Function, Function)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaIterablesAll,Prefer `Collection.stream().allMatch(Predicate)`,"Prefer `Collection.stream().allMatch(Predicate)` over `Iterables.all(Collection, Predicate)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaIterablesAnyFilter,Prefer `Collection.stream().anyMatch(Predicate)`,"Prefer `Collection.stream().anyMatch(Predicate)` over `Iterables.any(Collection, Predicate)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaIterablesTransform,Prefer `Collection.stream().map(Function)` over `Iterables.transform`,"Prefer `Collection.stream().map(Function)` over `Iterables.transform(Collection, Function)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaJava11,Prefer the Java 11 standard library instead of Guava,"Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.",11,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaJava21,Prefer the Java 21 standard library instead of Guava,"Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.",9,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaListsNewArrayList,Prefer `new ArrayList<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaListsNewCopyOnWriteArrayList,Prefer `new CopyOnWriteArrayList<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaListsNewLinkedList,Prefer `new LinkedList<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaMapsNewHashMap,Prefer `new HashMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaMapsNewLinkedHashMap,Prefer `new LinkedHashMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaMapsNewTreeMap,Prefer `new TreeMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaOptionalAsSet,Prefer `Optional.stream().collect(Collectors.toSet())`,Prefer `Optional.stream().collect(Collectors.toSet())` over `Optional.asSet()`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoMapsAndSetsWithExpectedSize,Prefer JDK methods for Maps and Sets of an expected size,Prefer Java 19+ methods to create Maps and Sets of an expected size instead of using Guava methods.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes,Refaster style Guava to Java migration recipes,"Recipes that migrate from Guava to Java, using Refaster style templates for cases beyond what declarative recipes can cover.",4,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableListOf,Prefer `List.of(..)` in Java 9 or higher,Replaces `.common.collect.ImmutableList.of(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullToObjectsRequireNonNullRecipe,`Preconditions.checkNotNull` to `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPredicatesInstanceOf,Prefer `A.class::isInstance`,Prefer `A.class::isInstance` over `Predicates.instanceOf(A.class)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullMessageTypeObjectRecipe,`Preconditions.checkNotNull` with `Object` message to `Objects.requireNonNull` with `String.valueOf`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaOptionalFromJavaUtil,Replace `com.google.common.base.Optional#fromJavaUtil(java.util.Optional)` with argument,Replaces `com.google.common.base.Optional#fromJavaUtil(java.util.Optional)` with argument.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableMapCopyOf,Prefer `Map.copyOf(..)` in Java 10 or higher,Replaces `.common.collect.ImmutableMap.copyOf(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaOptionalToJavaUtil,Remove `com.google.common.base.Optional#toJavaUtil()`,Remove calls to `com.google.common.base.Optional#toJavaUtil()`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPredicate,Change Guava's `Predicate` into `java.util.function.Predicate` where possible,Change the type only where no methods are used that explicitly require a Guava `Predicate`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaSetsFilter,Prefer `Collection.stream().filter(Predicate)`,"Prefer `Collection.stream().filter(Predicate)` over `Sets.filter(Set, Predicate)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilOptionalOrSupplier,Prefer `java.util.Optional#or(Supplier>)`,Prefer `java.util.Optional#or(Supplier>)` over `com.google.common.base.Optional#or(com.google.common.base.Optional).,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPredicatesAndOr,Prefer `Predicate.and(Predicate)`,"Prefer `Predicate.and(Predicate)` over `Predicates.and(Predicate, Predicate)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaSetsNewLinkedHashSet,Prefer `new LinkedHashSet<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPredicatesEqualTo,Prefer `Predicate.isEqual(Object)`,Prefer `Predicate.isEqual(Object)` over `Predicates.equalTo(Object)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPredicatesInstanceOf,Prefer `A.class::isInstance`,Prefer `A.class::isInstance` over `Predicates.instanceOf(A.class)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPrimitiveAsList,Prefer `Arrays.asList(..)` over Guava primitives,Migrate from Guava `com.google.common.primitives.* asList(..)` to `Arrays.asList(..)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullToObjectsRequireNonNullRecipe,`Preconditions.checkNotNull` to `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullMessageTypeObjectRecipe,`Preconditions.checkNotNull` with `Object` message to `Objects.requireNonNull` with `String.valueOf`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullRecipe,`Preconditions.checkNotNull` with `String` message to `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaRefasterRecipes,Refaster style Guava to Java migration recipes,"Recipes that migrate from Guava to Java, using Refaster style templates for cases beyond what declarative recipes can cover.",4,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaSetsFilter,Prefer `Collection.stream().filter(Predicate)`,"Prefer `Collection.stream().filter(Predicate)` over `Sets.filter(Set, Predicate)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaIterablesTransform,Prefer `Collection.stream().map(Function)` over `Iterables.transform`,"Prefer `Collection.stream().map(Function)` over `Iterables.transform(Collection, Function)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaDirectExecutor,Prefer `Runnable::run`,"`Executor` is a SAM-compatible interface, so `Runnable::run` is just as succinct as `MoreExecutors.directExecutor()` but without the third-party library requirement.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaSetsNewConcurrentHashSet,Prefer `new ConcurrentHashMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaListsNewCopyOnWriteArrayList,Prefer `new CopyOnWriteArrayList<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableSetCopyOf,Prefer `Set.copyOf(..)` in Java 10 or higher,Replaces `.common.collect.ImmutableSet.copyOf(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaCollections2Transform,Prefer `Collection.stream().map(Function)` over `Collections2.transform`,"Prefer `Collection.stream().map(Function)` over `Collections2.transform(Collection, Function)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaImmutableMapOf,Prefer `Map.of(..)` in Java 9 or higher,Replaces `.common.collect.ImmutableMap.of(..)` if the returned type is immediately down-cast.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaCreateTempDir,Prefer `Files#createTempDirectory()`,Replaces Guava `Files#createTempDir()` with Java `Files#createTempDirectory(..)`. Transformations are limited to scopes throwing or catching `java.io.IOException`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaStringJoin,Prefer `String#join()` over Guava `Joiner#join()`,Replaces supported calls to `com.google.common.base.Joiner#join()` with `java.lang.String#join()`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaAtomicsNewReference,Prefer `new AtomicReference<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaIterablesAnyFilter,Prefer `Collection.stream().anyMatch(Predicate)`,"Prefer `Collection.stream().anyMatch(Predicate)` over `Iterables.any(Collection, Predicate)`.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaPrimitiveAsList,Prefer `Arrays.asList(..)` over Guava primitives,Migrate from Guava `com.google.common.primitives.* asList(..)` to `Arrays.asList(..)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaSetsNewHashSet,Prefer `new HashSet<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaSetsNewLinkedHashSet,Prefer `new LinkedHashSet<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoMapsAndSetsWithExpectedSize,Prefer JDK methods for Maps and Sets of an expected size,Prefer Java 19+ methods to create Maps and Sets of an expected size instead of using Guava methods.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferCharCompare,Prefer `java.lang.Char#compare`,Prefer `java.lang.Char#compare` instead of using `com.google.common.primitives.Chars#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerCompare,Prefer `Integer#compare`,Prefer `java.lang.Integer#compare` instead of using `com.google.common.primitives.Ints#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerCompareUnsigned,Prefer `Integer#compareUnsigned`,Prefer `java.lang.Integer#compareUnsigned` instead of using `com.google.common.primitives.UnsignedInts#compare` or `com.google.common.primitives.UnsignedInts#compareUnsigned`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerDivideUnsigned,Prefer `Integer#divideUnsigned`,Prefer `java.lang.Integer#divideUnsigned` instead of using `com.google.common.primitives.UnsignedInts#divide` or `com.google.common.primitives.UnsignedInts#divideUnsigned`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerParseUnsignedInt,Prefer `Integer#parseUnsignedInt`,Prefer `java.lang.Integer#parseUnsignedInt` instead of using `com.google.common.primitives.UnsignedInts#parseUnsignedInt`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerRemainderUnsigned,Prefer `Integer#remainderUnsigned`,Prefer `java.lang.Integer#remainderUnsigned` instead of using `com.google.common.primitives.UnsignedInts#remainderUnsigned`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaOptionalAsSet,Prefer `Optional.stream().collect(Collectors.toSet())`,Prefer `Optional.stream().collect(Collectors.toSet())` over `Optional.asSet()`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaListsNewLinkedList,Prefer `new LinkedList<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilOptionalOrElseNull,Prefer `java.util.Optional#orElse(null)` over `com.google.common.base.Optional#orNull()`,Replaces `com.google.common.base.Optional#orNull()` with `java.util.Optional#orElse(null)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaMapsNewHashMap,Prefer `new HashMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuava,Prefer the Java standard library instead of Guava,"Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.",185,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaJava11,Prefer the Java 11 standard library instead of Guava,"Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.",11,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.NoGuavaJava21,Prefer the Java 21 standard library instead of Guava,"Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.",9,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaNioCharsetStandardCharsets,Prefer `java.nio.charset.StandardCharsets`,Prefer `java.nio.charset.StandardCharsets` instead of using `com.google.common.base.Charsets`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaStringJoin,Prefer `String#join()` over Guava `Joiner#join()`,Replaces supported calls to `com.google.common.base.Joiner#join()` with `java.lang.String#join()`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilCollectionsSynchronizedNavigableMap,Prefer `java.util.Collections#synchronizedNavigableMap`,Prefer `java.util.Collections#synchronizedNavigableMap` instead of using `com.google.common.collect.Maps#synchronizedNavigableMap`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilCollectionsUnmodifiableNavigableMap,Prefer `java.util.Collections#unmodifiableNavigableMap`,Prefer `java.util.Collections#unmodifiableNavigableMap` instead of using `com.google.common.collect.Maps#unmodifiableNavigableMap`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilFunction,Prefer `java.util.function.Function`,Prefer `java.util.function.Function` instead of using `com.google.common.base.Function`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilObjectsEquals,Prefer `java.util.Objects#equals`,Prefer `java.util.Objects#equals` instead of using `com.google.common.base.Objects#equal`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilObjectsHashCode,Prefer `java.util.Objects#hash`,Prefer `java.util.Objects#hash` instead of using `com.google.common.base.Objects#hashCode` or `com.google.common.base.Objects hash(..)`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilObjectsRequireNonNullElse,Prefer `java.util.Objects#requireNonNullElse`,Prefer `java.util.Objects#requireNonNullElse` instead of using `com.google.common.base.MoreObjects#firstNonNull`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilOptional,Prefer `java.util.Optional`,Prefer `java.util.Optional` instead of using `com.google.common.base.Optional`.,12,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilOptionalOrElseNull,Prefer `java.util.Optional#orElse(null)` over `com.google.common.base.Optional#orNull()`,Replaces `com.google.common.base.Optional#orNull()` with `java.util.Optional#orElse(null)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilOptionalOrSupplier,Prefer `java.util.Optional#or(Supplier>)`,Prefer `java.util.Optional#or(Supplier>)` over `com.google.common.base.Optional#or(com.google.common.base.Optional).,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilPredicate,Prefer `java.util.function.Predicate`,Prefer `java.util.function.Predicate` instead of using `com.google.common.base.Predicate`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilSupplier,Prefer `java.util.function.Supplier`,Prefer `java.util.function.Supplier` instead of using `com.google.common.base.Supplier`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilObjectsEquals,Prefer `java.util.Objects#equals`,Prefer `java.util.Objects#equals` instead of using `com.google.common.base.Objects#equal`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilObjectsHashCode,Prefer `java.util.Objects#hash`,Prefer `java.util.Objects#hash` instead of using `com.google.common.base.Objects#hashCode` or `com.google.common.base.Objects hash(..)`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilObjectsRequireNonNullElse,Prefer `java.util.Objects#requireNonNullElse`,Prefer `java.util.Objects#requireNonNullElse` instead of using `com.google.common.base.MoreObjects#firstNonNull`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilCollectionsUnmodifiableNavigableMap,Prefer `java.util.Collections#unmodifiableNavigableMap`,Prefer `java.util.Collections#unmodifiableNavigableMap` instead of using `com.google.common.collect.Maps#unmodifiableNavigableMap`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferJavaUtilCollectionsSynchronizedNavigableMap,Prefer `java.util.Collections#synchronizedNavigableMap`,Prefer `java.util.Collections#synchronizedNavigableMap` instead of using `com.google.common.collect.Maps#synchronizedNavigableMap`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferCharCompare,Prefer `java.lang.Char#compare`,Prefer `java.lang.Char#compare` instead of using `com.google.common.primitives.Chars#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerCompare,Prefer `Integer#compare`,Prefer `java.lang.Integer#compare` instead of using `com.google.common.primitives.Ints#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferLongCompare,Prefer `Long#compare`,Prefer `java.lang.Long#compare` instead of using `com.google.common.primitives.Longs#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferShortCompare,Prefer `Short#compare`,Prefer `java.lang.Short#compare` instead of using `com.google.common.primitives.Shorts#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerCompareUnsigned,Prefer `Integer#compareUnsigned`,Prefer `java.lang.Integer#compareUnsigned` instead of using `com.google.common.primitives.UnsignedInts#compare` or `com.google.common.primitives.UnsignedInts#compareUnsigned`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerDivideUnsigned,Prefer `Integer#divideUnsigned`,Prefer `java.lang.Integer#divideUnsigned` instead of using `com.google.common.primitives.UnsignedInts#divide` or `com.google.common.primitives.UnsignedInts#divideUnsigned`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerParseUnsignedInt,Prefer `Integer#parseUnsignedInt`,Prefer `java.lang.Integer#parseUnsignedInt` instead of using `com.google.common.primitives.UnsignedInts#parseUnsignedInt`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferIntegerRemainderUnsigned,Prefer `Integer#remainderUnsigned`,Prefer `java.lang.Integer#remainderUnsigned` instead of using `com.google.common.primitives.UnsignedInts#remainderUnsigned`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferLongCompareUnsigned,Prefer `Long#compareUnsigned`,Prefer `java.lang.Long#compareUnsigned` instead of using `com.google.common.primitives.UnsignedLongs#compare` or `com.google.common.primitives.UnsignedLongs#compareUnsigned`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferLongDivideUnsigned,Prefer `Long#divideUnsigned`,Prefer `java.lang.Long#divideUnsigned` instead of using `com.google.common.primitives.UnsignedLongs#divide` or `com.google.common.primitives.UnsignedLongs#divideUnsigned`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferLongParseUnsignedLong,Prefer `Long#parseUnsignedInt`,Prefer `java.lang.Long#parseUnsignedInt` instead of using `com.google.common.primitives.UnsignedLongs#parseUnsignedInt`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferLongRemainderUnsigned,Prefer `Long#remainderUnsigned`,Prefer `java.lang.Long#remainderUnsigned` instead of using `com.google.common.primitives.UnsignedLongs#remainderUnsigned`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferMathAddExact,Prefer `Math#addExact`,Prefer `java.lang.Math#addExact` instead of using `com.google.common.math.IntMath#checkedAdd` or `com.google.common.math.IntMath#addExact`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferMathClamp,Prefer `Math#clamp`,Prefer `java.lang.Math#clamp` instead of using `com.google.common.primitives.*#constrainToRange`.,7,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferMathMultiplyExact,Prefer `Math#multiplyExact`,Prefer `java.lang.Math#multiplyExact` instead of using `com.google.common.primitives.IntMath#checkedMultiply` or `com.google.common.primitives.IntMath#multiplyExact`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferMathSubtractExact,Prefer `Math#subtractExact`,Prefer `java.lang.Math#subtractExact` instead of using `com.google.common.primitives.IntMath#checkedSubtract` or `com.google.common.primitives.IntMath#subtractExact`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferShortCompare,Prefer `Short#compare`,Prefer `java.lang.Short#compare` instead of using `com.google.common.primitives.Shorts#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.AddInputStreamBulkReadMethod,Add bulk read method to `InputStream` implementations,"Adds a `read(byte[], int, int)` method to `InputStream` subclasses that only override the single-byte `read()` method. Java's default `InputStream.read(byte[], int, int)` implementation calls the single-byte `read()` method in a loop, which can cause severe performance degradation (up to 350x slower) for bulk reads. This recipe detects `InputStream` implementations that delegate to another stream and adds the missing bulk read method to delegate bulk reads as well.",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.guava.PreferMathMultiplyExact,Prefer `Math#multiplyExact`,Prefer `java.lang.Math#multiplyExact` instead of using `com.google.common.primitives.IntMath#checkedMultiply` or `com.google.common.primitives.IntMath#multiplyExact`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.guava.PreferMathClamp,Prefer `Math#clamp`,Prefer `java.lang.Math#clamp` instead of using `com.google.common.primitives.*#constrainToRange`.,7,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,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.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.io.AddInputStreamBulkReadMethod,Add bulk read method to `InputStream` implementations,"Adds a `read(byte[], int, int)` method to `InputStream` subclasses that only override the single-byte `read()` method. Java's default `InputStream.read(byte[], int, int)` implementation calls the single-byte `read()` method in a loop, which can cause severe performance degradation (up to 350x slower) for bulk reads. This recipe detects `InputStream` implementations that delegate to another stream and adds the missing bulk read method to delegate bulk reads as well.",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.UpdateManagedBeanToNamed,Update Faces `@ManagedBean` to use CDI `@Named`,Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace `@ManagedBean` with `@Named` for CDI-based bean management.,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.UpdateAnnotationAttributeJavaxToJakarta,Update annotation attributes using `javax` to `jakarta`,Replace `javax` with `jakarta` in annotation attributes for matching annotation signatures.,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"":""signature"",""type"":""String"",""displayName"":""Annotation signature"",""description"":""An annotation signature to match."",""example"":""@javax.jms..*""}]", +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.UpdateGetRealPath,Updates `getRealPath()` to call `getContext()` followed by `getRealPath()`,Updates `getRealPath()` for `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` to use `ServletContext.getRealPath(String)`.,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.RemoveBeanIsNullable,Remove `Bean.isNullable()`,"`Bean.isNullable()` has been removed in CDI 4.0.0, and now always returns `false`.",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.UpdateBeanManagerMethods,Update `fireEvent()` and `createInjectionTarget()` calls,Updates `BeanManager.fireEvent()` or `BeanManager.createInjectionTarget()`.,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.UpdateAddAnnotatedTypes,"Replace `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` with `addAnnotatedType(AnnotatedType, String)`","`BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` is deprecated in CDI 1.1. It is Replaced by `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)`.",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.JakartaEE10,Migrate to Jakarta EE 10,"These recipes help with the Migration to Jakarta EE 10, flagging and updating deprecated methods.",587,,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.MigrationToJakarta10Apis,Migrate Jakarta EE 9 api dependencies to Jakarta EE 10 versions,Jakarta EE 10 updates some apis compared to Jakarta EE 9.,28,,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.UpdateFileupload2Dependencies,Update Apache Commons FileUpload2 package for EE10,Update Apache Commons FileUpload2 package for EE10.,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.ServletCookieBehaviorChangeRFC6265,Remove `getComment` and `getVersion` methods,"Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265. In addition, the behavior of these methods has been changed so the setters no longer have any effect, the getComment methods return null, and the getVersion method returns 0. The deprecated methods are removed.",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.WsWsocServerContainerDeprecation,Replace `doUpgrade(..)` with `ServerContainer.upgradeHttpToWebSocket(..)`,Deprecated `WsWsocServerContainer.doUpgrade(..)` is replaced by the Jakarta WebSocket 2.1 specification `ServerContainer.upgradeHttpToWebSocket(..)`.,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.RemovedIsParmetersProvidedMethod,Use `isParametersProvided()`,"Expression Language prior to 5.0 provides the deprecated MethodExpression.isParmetersProvided() method, with the word 'parameter' misspelled in the method name. This method is unavailable in Jakarta Expression Language 5.0. Use the correctly spelled MethodExpression.isParametersProvided() method instead.",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.RemovedSOAPElementFactory,Use `jakarta.xml.soap.SOAPFactory` to create `SOAPElements`,"XML Web Services prior to 4.0 provides the deprecated SOAPElementFactory class, which is removed in XML Web Services 4.0. The recommended replacement is to use jakarta.xml.soap.SOAPFactory to create SOAPElements.",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.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.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.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.RemovalsServletJakarta10,Replace deprecated Jakarta Servlet methods and classes,This recipe replaces the classes and methods deprecated in Jakarta Servlet 6.0.,25,,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.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.,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.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.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x,Jakarta Faces 4.0 to 4.1,Jakarta EE 11 uses Faces 4.1 a minor upgrade.,148,,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.FacesJNDINamesChanged,"JNDI name `jsf/ClientSideSecretKey` has been renamed to `faces/ClientSideSecretKey`, and the `jsf/FlashSecretKey` JNDI name has been renamed to `faces/FlashSecretKey`","The `jsf/ClientSideSecretKey` JNDI name has been renamed to `faces/ClientSideSecretKey`, and the `jsf/FlashSecretKey` JNDI name has been renamed to `faces/FlashSecretKey`. The JNDI keys that have been renamed are updated to allow use of the keys.",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.FacesManagedBeansRemoved,Substitute removed Faces Managed Beans,"This recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 4.0.",15,,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.FileuploadToFileUpload2,Migrate deprecated `org.apache.commons.fileload` packages to `org.apache.commons.fileload.core`,Migrate deprecated `org.apache.commons.fileload` packages to `org.apache.commons.fileload.core`.,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.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.,23,,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.",586,,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.",602,,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.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE10,Faces XHTML migration for Jakarta EE 10,Find and replace legacy JSF namespace URIs with Jakarta Faces URNs in XHTML files.,19,,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.JakartaFacesXhtmlEE9,Faces XHTML migration for Jakarta EE 9,Find and replace javax references to jakarta in XHTML files.,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.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.JavaxToJakartaCdiExtensions,Rename CDI Extension to Jakarta,Rename `javax.enterprise.inject.spi.Extension` to `jakarta.enterprise.inject.spi.Extension`.,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.UpdateJakartaPlatform10,Update Jakarta EE Platform Dependencies to 10.0.0,Update Jakarta EE Platform Dependencies to 10.0.0.,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.UpdateJakartaAnnotations2,Update Jakarta EE annotation Dependencies to 2.1.x,Update Jakarta EE annotation Dependencies to 2.1.x.,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.UpdateJakartaXmlWsEE10,Update Jakarta EE XML Web Services Dependencies for EE 10,Update Jakarta EE XML Web Services Dependencies for EE 10.,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.UpdateJerseyDependencies,Update GlassFish Jersey Dependencies to 3.1.x,Update GlassFish Jersey Dependencies to 3.1.x.,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.UpdateApacheCommonsEmailDependencies,Update Apache Commons Email to Email2 for Jakarta,Update Apache Commons Email to Email2 for Jakarta.,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.UpdateApacheShiroDependencies,Update Apache Shiro Dependencies to 2.0.x,Update Apache Shiro Dependencies to 2.0.x.,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.UpdateEclipseLinkDependencies,Update EclipseLink Dependencies to 4.x,Update EclipseLink Dependencies to 4.x.,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.UpdateYassonDependencies,Update Eclipse Yasson Dependencies to 3.0.x,Update Eclipse Yasson Dependencies to 3.0.x.,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.JettyUpgradeEE10,Update Jetty EE9 to Jetty EE10,"Update Jetty dependencies from EE9 to EE10, changing the groupId and artifactIds as needed.",14,,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.MigratePluginsForJakarta10,Update Plugins for Jakarta EE 10,Update plugin to be compatible with Jakarta EE 10.,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.,,"[{""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.MigrateFastjsonForJakarta10,Update Fastjson for Jakarta EE 10,Update Fastjson to be compatible with Jakarta EE 10.,19,,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.JakartaEE11,Migrate to Jakarta EE 11,"These recipes help with the Migration to Jakarta EE 11, flagging and updating deprecated methods.",603,,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.UpdateJakartaPlatform11,Update Jakarta EE Platform Dependencies to 11.0.x,Update Jakarta EE Platform Dependencies to 11.0.x.,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.JavaxMigrationToJakarta,Migrate to Jakarta EE 9,Jakarta EE 9 is the first version of Jakarta EE that uses the new `jakarta` namespace.,365,,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.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.",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.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.JavaxValidationMigrationToJakartaValidation,Migrate deprecated `javax.validation` packages to `jakarta.validation`,"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.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.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.",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.JavaxElToJakartaEl,Migrate deprecated `javax.el` packages to `jakarta.el`,"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.FileuploadToFileUpload2,Migrate deprecated `org.apache.commons.fileload` packages to `org.apache.commons.fileload.core`,Migrate deprecated `org.apache.commons.fileload` packages to `org.apache.commons.fileload.core`.,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.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.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxInterceptorToJakartaInterceptor,Migrate deprecated `javax.interceptor` packages to `jakarta.interceptor`,"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.JavaxJmsToJakartaJms,Migrate deprecated `javax.jms` packages to `jakarta.jms`,"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.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.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.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.,364,,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.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxResourceToJakartaResource,Migrate deprecated `javax.resource` packages to `jakarta.resource`,"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.JavaxSecurityToJakartaSecurity,Migrate deprecated `javax.security.enterprise` packages to `jakarta.security.enterprise`,"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.JavaxServletToJakartaServlet,Migrate deprecated `javax.servlet` packages to `jakarta.servlet`,"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.JavaxToJakartaCdiExtensions,Rename CDI Extension to Jakarta,Rename `javax.enterprise.inject.spi.Extension` to `jakarta.enterprise.inject.spi.Extension`.,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.JavaxTransactionMigrationToJakartaTransaction,Migrate deprecated `javax.transaction` packages to `jakarta.transaction`,"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.JavaxValidationMigrationToJakartaValidation,Migrate deprecated `javax.validation` packages to `jakarta.validation`,"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.JavaxWebFragmentXmlToJakartaWebFragmentXml,Migrate xmlns entries in `web-fragment.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.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml,Migrate xmlns entries in `web.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.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxWebsocketToJakartaWebsocket,Migrate deprecated `javax.websocket` packages to `jakarta.websocket`,"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.JavaxWsToJakartaWs,Migrate deprecated `javax.ws` packages to `jakarta.ws`,"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.JavaxXmlBindMigrationToJakartaXmlBind,Migrate deprecated `javax.xml.bind` packages to `jakarta.xml.bind`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",14,,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.JavaxXmlSoapToJakartaXmlSoap,Migrate deprecated `javax.soap` packages to `jakarta.soap`,"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.JavaxXmlBindMigrationToJakartaXmlBind,Migrate deprecated `javax.xml.bind` packages to `jakarta.xml.bind`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation.",15,,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.RetainJaxbApiForJackson,Retain `javax.xml.bind:jaxb-api` when `jackson-module-jaxb-annotations` is present,"When migrating from `javax.xml.bind` to `jakarta.xml.bind` 3.0+, the `javax.xml.bind:jaxb-api` dependency is normally replaced. However, if `jackson-module-jaxb-annotations` is on the classpath (and still uses the `javax.xml.bind` namespace), this recipe ensures `javax.xml.bind:jaxb-api` remains available as a runtime dependency to prevent `NoClassDefFoundError`.",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.JavaxXmlToJakartaXmlXJCBinding,Migrate XJC Bindings to Jakata XML,"Java EE has been rebranded to Jakarta EE, migrates the namespace and version in XJC bindings.",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.JavaxXmlSoapToJakartaXmlSoap,Migrate deprecated `javax.soap` packages to `jakarta.soap`,"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.JavaxXmlWsMigrationToJakartaXmlWs,Migrate deprecated `javax.xml.ws` packages to `jakarta.xml.ws`,"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.JettyUpgradeEE10,Update Jetty EE9 to Jetty EE10,"Update Jetty dependencies from EE9 to EE10, changing the groupId and artifactIds as needed.",14,,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.JettyUpgradeEE9,Update Jetty9 to Jetty12,Update Jetty dependencies from version 9 to version 12.,13,,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.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.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.,, +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.,23,,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.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.,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.JohnzonJavaxToJakarta,Migrate Johnzon from javax to jakarta namespace,Java EE has been rebranded to Jakarta EE. This recipe replaces existing Johnzon dependencies with their counterparts that are compatible with Jakarta EE 9.,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.MigrateFastjsonForJakarta10,Update Fastjson for Jakarta EE 10,Update Fastjson to be compatible with Jakarta EE 10.,19,,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.MigratePluginsForJakarta10,Update Plugins for Jakarta EE 10,Update plugin to be compatible with Jakarta EE 10.,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.,,"[{""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.MigrationToJakarta10Apis,Migrate Jakarta EE 9 api dependencies to Jakarta EE 10 versions,Jakarta EE 10 updates some apis compared to Jakarta EE 9.,28,,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.OmniFacesNamespaceMigration,OmniFaces Namespace Migration,Find and replace legacy OmniFaces namespaces.,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.RemovalsServletJakarta10,Replace deprecated Jakarta Servlet methods and classes,This recipe replaces the classes and methods deprecated in Jakarta Servlet 6.0.,25,,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.RemoveBeanIsNullable,Remove `Bean.isNullable()`,"`Bean.isNullable()` has been removed in CDI 4.0.0, and now always returns `false`.",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.RemoveJakartaAnnotationDependencyWhenManagedBySpringBoot,Remove `jakarta.annotation-api` dependency when managed by Spring Boot,Best practice recipe to cleanup a direct dependency which also comes transitively for Spring Boot applications.,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.RemovedIsParmetersProvidedMethod,Use `isParametersProvided()`,"Expression Language prior to 5.0 provides the deprecated MethodExpression.isParmetersProvided() method, with the word 'parameter' misspelled in the method name. This method is unavailable in Jakarta Expression Language 5.0. Use the correctly spelled MethodExpression.isParametersProvided() method instead.",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.RemovedJakartaFacesExpressionLanguageClasses,Use `jakarta.el` instead of `jakarta.faces.el` and `javax.faces.el`,Several classes were removed and replaced in Jakarta Faces 3.0. The only Object definition not removed in the `jakarta.faces.el` package is the CompositeComponentExpressionHolder interface.,17,,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.RemovedJakartaFacesResourceResolver,Replace `ResourceResolver` with `ResourceHandler`,The `ResourceResolver` class was removed in Jakarta Faces 3.0. The functionality provided by that class can be replaced by using the `jakarta.faces.application.ResourceHandler` class.,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.RemovedSOAPElementFactory,Use `jakarta.xml.soap.SOAPFactory` to create `SOAPElements`,"XML Web Services prior to 4.0 provides the deprecated SOAPElementFactory class, which is removed in XML Web Services 4.0. The recommended replacement is to use jakarta.xml.soap.SOAPFactory to create SOAPElements.",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.RemovedStateManagerMethods,Use `StateManagementStrategy`,"Faces 3.0 introduced using `StateManagementStrategy` in favor of `StateManager`, which was later removed in Faces 4.0.",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.RemovedUIComponentConstant,Replace `CURRENT_COMPONENT` and `CURRENT_COMPOSITE_COMPONENT` with `getCurrentComponent()` and `getCurrentCompositeComponent()`,Replace `jakarta.faces.component.UIComponent.CURRENT_COMPONENT` and `CURRENT_COMPOSITE_COMPONENT` constants with `jakarta.faces.component.UIComponent.getCurrentComponent()` and `getCurrentCompositeComponent()`. that were added in JSF 2.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.RestAssuredJavaxToJakarta,Migrate RestAssured from javax to jakarta namespace by upgrading to a version compatible with J2EE9,Java EE has been rebranded to Jakarta EE. This recipe replaces existing RestAssured dependencies with their counterparts that are compatible with Jakarta EE 9.,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.RetainJaxbApiForJackson,Retain `javax.xml.bind:jaxb-api` when `jackson-module-jaxb-annotations` is present,"When migrating from `javax.xml.bind` to `jakarta.xml.bind` 3.0+, the `javax.xml.bind:jaxb-api` dependency is normally replaced. However, if `jackson-module-jaxb-annotations` is on the classpath (and still uses the `javax.xml.bind` namespace), this recipe ensures `javax.xml.bind:jaxb-api` remains available as a runtime dependency to prevent `NoClassDefFoundError`.",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.ServletCookieBehaviorChangeRFC6265,Remove `getComment` and `getVersion` methods,"Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265. In addition, the behavior of these methods has been changed so the setters no longer have any effect, the getComment methods return null, and the getVersion method returns 0. The deprecated methods are removed.",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.UpdateAddAnnotatedTypes,"Replace `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` with `addAnnotatedType(AnnotatedType, String)`","`BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` is deprecated in CDI 1.1. It is Replaced by `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)`.",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.UpdateAnnotationAttributeJavaxToJakarta,Update annotation attributes using `javax` to `jakarta`,Replace `javax` with `jakarta` in annotation attributes for matching annotation signatures.,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"":""signature"",""type"":""String"",""displayName"":""Annotation signature"",""description"":""An annotation signature to match."",""example"":""@javax.jms..*""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateApacheCommonsEmailDependencies,Update Apache Commons Email to Email2 for Jakarta,Update Apache Commons Email to Email2 for Jakarta.,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.UpdateApacheShiroDependencies,Update Apache Shiro Dependencies to 2.0.x,Update Apache Shiro Dependencies to 2.0.x.,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.UpdateApacheWSSecurityPackages,Migrate `org.apache.ws.security` and `org.apache.ws.security.components.crypto` packages to `org.apache.wss4j.common.ext` and `org.apache.wss4j.common.crypto` packages,Java EE has been rebranded to Jakarta EE. This recipe replaces Apache security packages to migrate to Apache `wss4j`.,21,,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.UpdateBeanManagerMethods,Update `fireEvent()` and `createInjectionTarget()` calls,Updates `BeanManager.fireEvent()` or `BeanManager.createInjectionTarget()`.,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.UpdateEclipseLinkDependencies,Update EclipseLink Dependencies to 4.x,Update EclipseLink Dependencies to 4.x.,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.UpdateFileupload2Dependencies,Update Apache Commons FileUpload2 package for EE10,Update Apache Commons FileUpload2 package for EE10.,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.UpdateGetRealPath,Updates `getRealPath()` to call `getContext()` followed by `getRealPath()`,Updates `getRealPath()` for `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` to use `ServletContext.getRealPath(String)`.,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.UpdateJakartaAnnotations2,Update Jakarta EE annotation Dependencies to 2.1.x,Update Jakarta EE annotation Dependencies to 2.1.x.,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.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.RemoveJakartaAnnotationDependencyWhenManagedBySpringBoot,Remove `jakarta.annotation-api` dependency when managed by Spring Boot,Best practice recipe to cleanup a direct dependency which also comes transitively for Spring Boot applications.,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.JettyUpgradeEE9,Update Jetty9 to Jetty12,Update Jetty dependencies from version 9 to version 12.,13,,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.UpdateRestLet2_6,Update RestLet to 2.6.0,Update RestLet to 2.6.0.,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.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.UpdateJakartaFacesApi3,Migrate deprecated `javax.faces` packages to `jakarta.faces`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation and upgrade.",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.JakartaFacesXhtmlEE9,Faces XHTML migration for Jakarta EE 9,Find and replace javax references to jakarta in XHTML files.,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.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.JavaxWebFragmentXmlToJakartaWebFragmentXml,Migrate xmlns entries in `web-fragment.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.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml,Migrate xmlns entries in `web.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.,, +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.FacesJNDINamesChanged,"JNDI name `jsf/ClientSideSecretKey` has been renamed to `faces/ClientSideSecretKey`, and the `jsf/FlashSecretKey` JNDI name has been renamed to `faces/FlashSecretKey`","The `jsf/ClientSideSecretKey` JNDI name has been renamed to `faces/ClientSideSecretKey`, and the `jsf/FlashSecretKey` JNDI name has been renamed to `faces/FlashSecretKey`. The JNDI keys that have been renamed are updated to allow use of the keys.",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.RemovedJakartaFacesResourceResolver,Replace `ResourceResolver` with `ResourceHandler`,The `ResourceResolver` class was removed in Jakarta Faces 3.0. The functionality provided by that class can be replaced by using the `jakarta.faces.application.ResourceHandler` class.,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.RemovedUIComponentConstant,Replace `CURRENT_COMPONENT` and `CURRENT_COMPOSITE_COMPONENT` with `getCurrentComponent()` and `getCurrentCompositeComponent()`,Replace `jakarta.faces.component.UIComponent.CURRENT_COMPONENT` and `CURRENT_COMPOSITE_COMPONENT` constants with `jakarta.faces.component.UIComponent.getCurrentComponent()` and `getCurrentCompositeComponent()`. that were added in JSF 2.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.RemovedStateManagerMethods,Use `StateManagementStrategy`,"Faces 3.0 introduced using `StateManagementStrategy` in favor of `StateManager`, which was later removed in Faces 4.0.",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.RemovedJakartaFacesExpressionLanguageClasses,Use `jakarta.el` instead of `jakarta.faces.el` and `javax.faces.el`,Several classes were removed and replaced in Jakarta Faces 3.0. The only Object definition not removed in the `jakarta.faces.el` package is the CompositeComponentExpressionHolder interface.,17,,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.UpgradeFaces3OpenSourceLibraries,Upgrade Faces open source libraries,"Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.",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.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.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi4,Update Jakarta EE Java Faces Dependencies to 4.0.x,Update Jakarta EE Java Faces Dependencies to 4.0.x.,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.JakartaFacesXhtmlEE10,Faces XHTML migration for Jakarta EE 10,Find and replace legacy JSF namespace URIs with Jakarta Faces URNs in XHTML files.,19,,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.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.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.,, +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.FacesManagedBeansRemoved,Substitute removed Faces Managed Beans,"This recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 4.0.",15,,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.UpgradeFaces4OpenSourceLibraries,Upgrade Faces open source libraries,"Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.",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.Faces4xMigrationToFaces41x,Jakarta Faces 4.0 to 4.1,Jakarta EE 11 uses Faces 4.1 a minor upgrade.,148,,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.UpdateJakartaFacesApi41,Update Jakarta EE Java Faces Dependencies to 4.1.x,Update Jakarta EE Java Faces Dependencies to 4.1.x.,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.UpdateJakartaPlatform10,Update Jakarta EE Platform Dependencies to 10.0.0,Update Jakarta EE Platform Dependencies to 10.0.0.,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.UpdateJakartaPlatform11,Update Jakarta EE Platform Dependencies to 11.0.x,Update Jakarta EE Platform Dependencies to 11.0.x.,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.UpdateJakartaXmlWsEE10,Update Jakarta EE XML Web Services Dependencies for EE 10,Update Jakarta EE XML Web Services Dependencies for EE 10.,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.UpdateJerseyDependencies,Update GlassFish Jersey Dependencies to 3.1.x,Update GlassFish Jersey Dependencies to 3.1.x.,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.UpdateManagedBeanToNamed,Update Faces `@ManagedBean` to use CDI `@Named`,Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace `@ManagedBean` with `@Named` for CDI-based bean management.,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.UpdateRestLet2_6,Update RestLet to 2.6.0,Update RestLet to 2.6.0.,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.UpdateYassonDependencies,Update Eclipse Yasson Dependencies to 3.0.x,Update Eclipse Yasson Dependencies to 3.0.x.,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.UpgradeFaces3OpenSourceLibraries,Upgrade Faces open source libraries,"Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.",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.OmniFacesNamespaceMigration,OmniFaces Namespace Migration,Find and replace legacy OmniFaces namespaces.,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.UpgradeFaces41OpenSourceLibraries,Upgrade Faces open source libraries,Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.,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.UpgradeFaces4OpenSourceLibraries,Upgrade Faces open source libraries,"Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.",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.WsWsocServerContainerDeprecation,Replace `doUpgrade(..)` with `ServerContainer.upgradeHttpToWebSocket(..)`,Deprecated `WsWsocServerContainer.doUpgrade(..)` is replaced by the Jakarta WebSocket 2.1 specification `ServerContainer.upgradeHttpToWebSocket(..)`.,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.javaee6,Migrate to JavaEE6,"These recipes help with the Migration to Java EE 6, flagging and updating deprecated methods.",2,,,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.javaee7,Migrate to JavaEE7,"These recipes help with the Migration to Java EE 7, flagging and updating deprecated methods.",8,,,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.javaee7.OpenJPAPersistenceProvider,Removed OpenJPA providers in the persistence.xml file,"When migrating to EclipseLink, using OpenJPA providers in EclipseLink results in runtime errors. To resolve these errors, the recipe removes the flagged OpenJPA provider from the persistence.xml.",2,,Java EE 7,Modernize,Java,,Recipes for migrating to [Java EE 7](https://javaee.github.io/javaee-spec/javadocs/).,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.javaee8,Migrate to JavaEE8,"These recipes help with the Migration to Java EE 8, flagging and updating deprecated methods.",18,,,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.javaee8.ApacheDefaultProvider,Flags any `org.apache.bval.jsr*` (bval 1.1) and `org.apache.bval.jsr303*` (bval 1.0) package references,This recipe flags any `org.apache.bval.jsr*` (bval 1.1) and `org.apache.bval.jsr303*` (bval 1.0) package references in validation.xml deployment descriptors. Bean Validation 2.0 and later use the Hibernate Validator implementation instead of the Apache BVal implementation which was used for Bean Validation 1.0 and 1.1.,6,,Java EE 8,Modernize,Java,,Recipes for migrating to [Java EE 8](https://javaee.github.io/javaee-spec/javadocs/).,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.javaee8.ServletIsRequestedSessionIdFromURL,Replace `HttpServletRequestWrapper.isRequestedSessionIdFromUrl()` with `isRequestedSessionIdFromURL()`,The method `HttpServletRequestWrapper.isRequestedSessionIdFromUrl()` is deprecated in JavaEE8 and is replaced by `HttpServletRequestWrapper.isRequestedSessionIdFromURL()`.,2,,Java EE 8,Modernize,Java,,Recipes for migrating to [Java EE 8](https://javaee.github.io/javaee-spec/javadocs/).,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.javaee8.ApacheDefaultProvider,Flags any `org.apache.bval.jsr*` (bval 1.1) and `org.apache.bval.jsr303*` (bval 1.0) package references,This recipe flags any `org.apache.bval.jsr*` (bval 1.1) and `org.apache.bval.jsr303*` (bval 1.0) package references in validation.xml deployment descriptors. Bean Validation 2.0 and later use the Hibernate Validator implementation instead of the Apache BVal implementation which was used for Bean Validation 1.0 and 1.1.,6,,Java EE 8,Modernize,Java,,Recipes for migrating to [Java EE 8](https://javaee.github.io/javaee-spec/javadocs/).,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.javax.AddScopeToInjectedClass,Add scope annotation to injected classes,Finds member variables annotated with `@Inject' and applies `@Dependent` scope annotation to the variable's type.,1,,`javax` 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.javax.AddDefaultConstructorToEntityClass,`@Entity` objects with constructors must also have a default constructor,"When a Java Persistence API (JPA) entity class has a constructor with arguments, the class must also have a default, no-argument constructor. The OpenJPA implementation automatically generates the no-argument constructor, but the EclipseLink implementation does not.",1,,`javax` 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.javax.AddTransientAnnotationToCollections,Unannotated collection attributes require a Transient annotation,"In OpenJPA, attributes that inherit from the `java.util.Collection` interface are not a default persistent type, so these attributes are not persisted unless they are annotated. EclipseLink has a different default behavior and attempts to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated collection attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` 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.javax.RemoveTemporalAnnotation,Remove the `@Temporal` annotation for some `java.sql` attributes,"OpenJPA persists the fields of attributes of type `java.sql.Date`, `java.sql.Time`, or `java.sql.Timestamp` that have a `javax.persistence.Temporal` annotation, whereas EclipseLink throws an exception. Remove the `@Temporal` annotation so the behavior in EclipseLink will match the behavior in OpenJPA.",1,,`javax` 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.javax.UseJoinColumnForMapping,`@JoinColumn` annotations must be used with relationship mappings,"In OpenJPA, when a relationship attribute has either a `@OneToOne` or a `@ManyToOne` annotation with a `@Column` annotation, the `@Column` annotation is treated as a `@JoinColumn` annotation. EclipseLink throws an exception that indicates that the entity class must use `@JoinColumn` instead of `@Column` to map a relationship attribute.",1,,`javax` 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.javax.AddJaxwsRuntime,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle `compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",3,,`javax` 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.javax.AddColumnAnnotation,`@ElementCollection` annotations must be accompanied by a defined `@Column` annotation,"When an attribute is annotated with `@ElementCollection`, a separate table is created for the attribute that includes the attribute ID and value. In OpenJPA, the column for the annotated attribute is named element, whereas EclipseLink names the column based on the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a `@Column` annotation with the name attribute set to element.",1,,`javax` 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.javax.AddCommonAnnotationsDependencies,Add explicit Common Annotations dependencies,Add the necessary `annotation-api` dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.,4,,`javax` 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.javax.AddDefaultConstructorToEntityClass,`@Entity` objects with constructors must also have a default constructor,"When a Java Persistence API (JPA) entity class has a constructor with arguments, the class must also have a default, no-argument constructor. The OpenJPA implementation automatically generates the no-argument constructor, but the EclipseLink implementation does not.",1,,`javax` 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.javax.AddInjectDependencies,Add explicit Inject dependencies,Add the necessary `inject-api` dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.,3,,`javax` 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.javax.AddJaxbAPIDependencies,Add explicit JAXB API dependencies,This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. Running a full javax to Jakarta migration using `org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta` will update to versions greater than 3.x which necessitates the package change as well.,9,,`javax` 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.,,"[{""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.javax.AddJaxbDependenciesWithRuntime,Add explicit JAXB API dependencies and runtime,This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. Running a full javax to Jakarta migration using `org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta` will update to versions greater than 3.x which necessitates the package change as well.,13,,`javax` 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.,,"[{""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.javax.AddJaxbDependenciesWithoutRuntime,Add explicit JAXB API dependencies and remove runtimes,This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. All JAXB runtime implementation dependencies are removed.,14,,`javax` 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.,,"[{""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.javax.AddJaxbRuntime,Use latest JAXB API and runtime for Jakarta EE 8,"Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle `compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive dependency on the JAXB API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` 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.,"[{""name"":""runtime"",""type"":""String"",""displayName"":""JAXB run-time"",""description"":""Which implementation of the JAXB run-time that will be added to maven projects that have transitive dependencies on the JAXB API"",""example"":""glassfish"",""valid"":[""glassfish"",""sun""],""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsDependencies,Add explicit JAX-WS dependencies,This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the `javax.xml.bind` namespace.,12,,`javax` 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.javax.AddTransientAnnotationToEntity,Unannotated entity attributes require a Transient annotation,"In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated entity attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` 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.javax.RemoveEmbeddableId,`@Embeddable` classes cannot have an `@Id` annotation when referenced by an `@EmbeddedId` annotation,"According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an `@EmbeddedId` annotation, the embeddable class cannot contain an attribute with an `@Id` annotation. If both the `@EmbeddedId` annotation and the `@Id` annotation are defined, OpenJPA ignores the `@Id` annotation, whereas EclipseLink throws an exception.",1,,`javax` 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.javax.AddJaxwsRuntime$AddJaxwsRuntimeGradle,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update Gradle build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `compileOnly`+`testImplementation` configurations, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` 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.javax.AddJaxwsRuntime$AddJaxwsRuntimeMaven,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update maven build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` 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.javax.AddJaxwsRuntime,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle `compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",3,,`javax` 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.javax.AddScopeToInjectedClass,Add scope annotation to injected classes,Finds member variables annotated with `@Inject' and applies `@Dependent` scope annotation to the variable's type.,1,,`javax` 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.javax.HttpSessionInvalidate,Use HttpServletRequest `logout` method for programmatic security logout in Servlet 3.0,Do not rely on HttpSession `invalidate` method for programmatic security logout. Add the HttpServletRequest `logout` method which was introduced in Java EE 6 as part of the Servlet 3.0 specification.,1,,`javax` 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.javax.AddTableGenerator,Attributes with automatically generated values require configuration,Adds missing `@TableGenerator` annotation and updates the `@GeneratedValue` annotation values when it uses automatically generated values.,1,,`javax` 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.javax.AddTransientAnnotationToCollections,Unannotated collection attributes require a Transient annotation,"In OpenJPA, attributes that inherit from the `java.util.Collection` interface are not a default persistent type, so these attributes are not persisted unless they are annotated. EclipseLink has a different default behavior and attempts to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated collection attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` 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.javax.AddTransientAnnotationToEntity,Unannotated entity attributes require a Transient annotation,"In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated entity attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` 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.javax.AddJaxwsRuntime$AddJaxwsRuntimeMaven,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update maven build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` 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.javax.AddTransientAnnotationToPrivateAccessor,Private accessor methods must have a `@Transient` annotation,"According to the JPA 2.1 specification, when property access is used, the property accessor methods must be public or protected. OpenJPA ignores any private accessor methods, whereas EclipseLink persists those attributes. To ignore private accessor methods in EclipseLink, the methods must have a `@Transient` annotation.",1,,`javax` 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.javax.HttpSessionInvalidate,Use HttpServletRequest `logout` method for programmatic security logout in Servlet 3.0,Do not rely on HttpSession `invalidate` method for programmatic security logout. Add the HttpServletRequest `logout` method which was introduced in Java EE 6 as part of the Servlet 3.0 specification.,1,,`javax` 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.javax.AddJaxbRuntime,Use latest JAXB API and runtime for Jakarta EE 8,"Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle `compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive dependency on the JAXB API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` 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.,"[{""name"":""runtime"",""type"":""String"",""displayName"":""JAXB run-time"",""description"":""Which implementation of the JAXB run-time that will be added to maven projects that have transitive dependencies on the JAXB API"",""example"":""glassfish"",""valid"":[""glassfish"",""sun""],""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies,Add explicit Common Annotations dependencies,Add the necessary `annotation-api` dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.,4,,`javax` 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.javax.AddInjectDependencies,Add explicit Inject dependencies,Add the necessary `inject-api` dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.,3,,`javax` 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.javax.AddJaxwsDependencies,Add explicit JAX-WS dependencies,This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the `javax.xml.bind` namespace.,12,,`javax` 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.javax.JavaxLangModelUtil,Use modernized `javax.lang.model.util` APIs,"Certain `javax.lang.model.util` APIs have become deprecated and their usages changed, necessitating usage changes.",19,,`javax` 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.javax.JavaxManagementMonitorAPIs,Use modernized `javax.management.monitor` APIs,"Certain `javax.management.monitor` APIs have become deprecated and their usages changed, necessitating usage changes.",3,,`javax` 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.javax.JavaxXmlStreamAPIs,Use modernized `javax.xml.stream` APIs,"Certain `javax.xml.stream` APIs have become deprecated and their usages changed, necessitating usage changes.",7,,`javax` 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.javax.MigrateAbstractAnnotationValueVisitor6To9,Use `javax.lang.model.util.AbstractAnnotationValueVisitor9`,Use `javax.lang.model.util.AbstractAnnotationValueVisitor9` instead of the deprecated `javax.lang.model.util.AbstractAnnotationValueVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateAbstractElementVisitor6To9,Use `javax.lang.model.util.AbstractElementVisitor9`,Use `javax.lang.model.util.AbstractElementVisitor9` instead of the deprecated `javax.lang.model.util.AbstractElementVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateAbstractTypeVisitor6To9,Use `javax.lang.model.util.AbstractTypeVisitor9`,Use `javax.lang.model.util.AbstractTypeVisitor9` instead of the deprecated `javax.lang.model.util.AbstractTypeVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateCounterMonitorSetThresholdToSetInitThreshold,Use `javax.management.monitor.CounterMonitor#setInitThreshold`,Use `javax.management.monitor.CounterMonitor#setInitThreshold` instead of the deprecated `javax.management.monitor.CounterMonitor#setThreshold` in JMX 1.2 or higher.,2,,`javax` 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.javax.MigrateElementKindVisitor6To9,Use `javax.lang.model.util.ElementKindVisitor9`,Use `javax.lang.model.util.ElementKindVisitor9` instead of the deprecated `javax.lang.model.util.ElementKindVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateElementScanner6To9,Use `javax.lang.model.util.ElementScanner9`,Use `javax.lang.model.util.ElementScanner9` instead of the deprecated `javax.lang.model.util.ElementScanner6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateJaxBWSPlugin,Migrate JAXB-WS Plugin,Upgrade the JAXB-WS Maven plugin to be compatible with Java 11.,4,,`javax` 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.,,"[{""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.javax.MigrateSimpleAnnotationValueVisitor6To9,Use `javax.lang.model.util.SimpleAnnotationValueVisitor9`,Use `javax.lang.model.util.SimpleAnnotationValueVisitor9` instead of the deprecated `javax.lang.model.util.SimpleAnnotationValueVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateSimpleElementVisitor6To9,Use `javax.lang.model.util.SimpleElementVisitor9`,Use `javax.lang.model.util.SimpleElementVisitor9` instead of the deprecated `javax.lang.model.util.SimpleElementVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateSimpleTypeVisitor6To9,Use `javax.lang.model.util.SimpleTypeVisitor9`,Use `javax.lang.model.util.SimpleTypeVisitor9` instead of the deprecated `javax.lang.model.util.SimpleTypeVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.MigrateTypeKindVisitor6To9,Use `javax.lang.model.util.TypeKindVisitor9`,Use `javax.lang.model.util.TypeKindVisitor9` instead of the deprecated `javax.lang.model.util.TypeKindVisitor6` in Java 9 or higher.,2,,`javax` 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.javax.JavaxManagementMonitorAPIs,Use modernized `javax.management.monitor` APIs,"Certain `javax.management.monitor` APIs have become deprecated and their usages changed, necessitating usage changes.",3,,`javax` 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.javax.MigrateCounterMonitorSetThresholdToSetInitThreshold,Use `javax.management.monitor.CounterMonitor#setInitThreshold`,Use `javax.management.monitor.CounterMonitor#setInitThreshold` instead of the deprecated `javax.management.monitor.CounterMonitor#setThreshold` in JMX 1.2 or higher.,2,,`javax` 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.javax.JavaxXmlStreamAPIs,Use modernized `javax.xml.stream` APIs,"Certain `javax.xml.stream` APIs have become deprecated and their usages changed, necessitating usage changes.",7,,`javax` 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.javax.MigrateXMLEventFactoryNewInstanceToNewFactory,"Use `javax.xml.stream.XMLEventFactory#newFactory(String, ClassLoader)`",Use `javax.xml.stream.XMLEventFactory#newFactory` instead of the deprecated `javax.xml.stream.XMLEventFactory#newInstance` in Java 7 or higher.,2,,`javax` 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.javax.MigrateXMLInputFactoryNewInstanceToNewFactory,"Use `javax.xml.stream.XMLInputFactory#newFactory(String, ClassLoader)`",Use `javax.xml.stream.XMLInputFactory#newFactory` instead of the deprecated `javax.xml.stream.XMLInputFactory#newInstance` in Java 7 or higher.,2,,`javax` 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.javax.MigrateXMLOutputFactoryNewInstanceToNewFactory,"Use `javax.xml.stream.XMLOutputFactory#newFactory(String, ClassLoader)`",Use `javax.xml.stream.XMLOutputFactory#newFactory` instead of the deprecated `javax.xml.stream.XMLOutputFactory#newInstance` in Java 7 or higher.,2,,`javax` 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.javax.RemoveEmbeddableId,`@Embeddable` classes cannot have an `@Id` annotation when referenced by an `@EmbeddedId` annotation,"According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an `@EmbeddedId` annotation, the embeddable class cannot contain an attribute with an `@Id` annotation. If both the `@EmbeddedId` annotation and the `@Id` annotation are defined, OpenJPA ignores the `@Id` annotation, whereas EclipseLink throws an exception.",1,,`javax` 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.javax.RemoveTemporalAnnotation,Remove the `@Temporal` annotation for some `java.sql` attributes,"OpenJPA persists the fields of attributes of type `java.sql.Date`, `java.sql.Time`, or `java.sql.Timestamp` that have a `javax.persistence.Temporal` annotation, whereas EclipseLink throws an exception. Remove the `@Temporal` annotation so the behavior in EclipseLink will match the behavior in OpenJPA.",1,,`javax` 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.javax.UseJoinColumnForMapping,`@JoinColumn` annotations must be used with relationship mappings,"In OpenJPA, when a relationship attribute has either a `@OneToOne` or a `@ManyToOne` annotation with a `@Column` annotation, the `@Column` annotation is treated as a `@JoinColumn` annotation. EclipseLink throws an exception that indicates that the entity class must use `@JoinColumn` instead of `@Column` to map a relationship attribute.",1,,`javax` 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.javax.AddJaxbDependenciesWithRuntime,Add explicit JAXB API dependencies and runtime,This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. Running a full javax to Jakarta migration using `org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta` will update to versions greater than 3.x which necessitates the package change as well.,13,,`javax` 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.,,"[{""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.javax.AddJaxbDependenciesWithoutRuntime,Add explicit JAXB API dependencies and remove runtimes,This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. All JAXB runtime implementation dependencies are removed.,14,,`javax` 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.,,"[{""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.javax.AddJaxbAPIDependencies,Add explicit JAXB API dependencies,This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. Running a full javax to Jakarta migration using `org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta` will update to versions greater than 3.x which necessitates the package change as well.,9,,`javax` 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.,,"[{""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.javax.MigrateJaxBWSPlugin,Migrate JAXB-WS Plugin,Upgrade the JAXB-WS Maven plugin to be compatible with Java 11.,4,,`javax` 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.,,"[{""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.javax.openJPAToEclipseLink,Migrate from OpenJPA to EclipseLink JPA,These recipes help migrate Java Persistence applications using OpenJPA to EclipseLink JPA.,10,,`javax` 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.jspecify.MoveAnnotationToArrayType,Move annotation to array type,"When an annotation like `@Nullable` is applied to an array type in declaration position, this recipe moves it to the array brackets. For example, `@Nullable byte[]` becomes `byte @Nullable[]`. Best used before `ChangeType` in a migration pipeline, targeting the pre-migration annotation type.",1,,Jspecify,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"":""annotationType"",""type"":""String"",""displayName"":""Annotation type"",""description"":""The type of annotation to move to the array type. Should target the pre-migration annotation type to avoid changing the semantics of pre-existing type-use annotations on object arrays."",""example"":""javax.annotation.*ull*"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.ExplicitRecordImport,Add explicit import for `Record` classes,"Add explicit import for `Record` classes when upgrading past Java 14+, to avoid conflicts with `java.lang.Record`.",1,,`java.lang` 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.lang.FindNonVirtualExecutors,Find non-virtual `ExecutorService` creation,Find all places where static `java.util.concurrent.Executors` method creates a non-virtual `java.util.concurrent.ExecutorService`. This recipe can be used to search fro `ExecutorService` that can be replaced by Virtual Thread executor.,7,,`java.lang` 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.,,"[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.FindVirtualThreadOpportunities,Find Virtual Thread opportunities,Find opportunities to convert existing code to use Virtual Threads.,10,,`java.lang` 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.,,"[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.IfElseIfConstructToSwitch,If-else-if-else to switch,"Replace if-else-if-else with switch statements. In order to be replaced with a switch, all conditions must be on the same variable and there must be at least three cases.",1,,`java.lang` 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.lang.JavaLangAPIs,Use modernized `java.lang` APIs,"Certain Java lang APIs have become deprecated and their usages changed, necessitating usage changes.",16,,`java.lang` 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.lang.JavadocToMarkdownDocComment,Convert Javadoc to Markdown documentation comments,"Convert traditional Javadoc comments (`/** ... */`) to Markdown documentation comments (`///`) as supported by JEP 467 in Java 23+. Transforms HTML constructs like `

`, ``, ``, `

`, and lists to their Markdown equivalents, and converts inline tags like `{@code}` and `{@link}` to Markdown syntax.",1,,`java.lang` 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.lang.MigrateCharacterIsJavaLetterOrDigitToIsJavaIdentifierPart,Use `Character#isJavaIdentifierPart(char)`,Use `Character#isJavaIdentifierPart(char)` instead of the deprecated `Character#isJavaLetterOrDigit(char)` in Java 1.1 or higher.,2,,`java.lang` 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.lang.MigrateCharacterIsJavaLetterToIsJavaIdentifierStart,Use `Character#isJavaIdentifierStart(char)`,Use `Character#isJavaIdentifierStart(char)` instead of the deprecated `Character#isJavaLetter(char)` in Java 1.1 or higher.,2,,`java.lang` 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.lang.MigrateCharacterIsSpaceToIsWhitespace,Use `Character#isWhitespace(char)`,Use `Character#isWhitespace(char)` instead of the deprecated `Character#isSpace(char)` in Java 1.1 or higher.,2,,`java.lang` 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.lang.MigrateClassLoaderDefineClass,"Use `ClassLoader#defineClass(String, byte[], int, int)`","Use `ClassLoader#defineClass(String, byte[], int, int)` instead of the deprecated `ClassLoader#defineClass(byte[], int, int)` in Java 1.1 or higher.",1,,`java.lang` 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.lang.MigrateClassNewInstanceToGetDeclaredConstructorNewInstance,Use `Class#getDeclaredConstructor().newInstance()`,Use `Class#getDeclaredConstructor().newInstance()` instead of the deprecated `Class#newInstance()` in Java 9 or higher.,1,,`java.lang` 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.lang.MigrateMainMethodToInstanceMain,Migrate `public static void main(String[] args)` to instance `void main()`,"Migrate `public static void main(String[] args)` method to instance `void main()` method when the `args` parameter is unused, as supported by JEP 512 in Java 25+.",1,,`java.lang` 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.lang.MigrateProcessWaitForDuration,Use `Process#waitFor(Duration)`,"Use `Process#waitFor(Duration)` instead of `Process#waitFor(long, TimeUnit)` in Java 25 or higher.",1,,`java.lang` 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.lang.MigrateRuntimeVersionMajorToFeature,Use `Runtime.Version#feature()`,Use `Runtime.Version#feature()` instead of the deprecated `Runtime.Version#major()` in Java 10 or higher.,2,,`java.lang` 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.lang.MigrateRuntimeVersionMinorToInterim,Use `Runtime.Version#interim()`,Use `Runtime.Version#interim()` instead of the deprecated `Runtime.Version#minor()` in Java 10 or higher.,2,,`java.lang` 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.lang.MigrateRuntimeVersionSecurityToUpdate,Use `Runtime.Version#update()`,Use `Runtime.Version#update()` instead of the deprecated `Runtime.Version#security()` in Java 10 or higher.,2,,`java.lang` 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.lang.MigrateClassLoaderDefineClass,"Use `ClassLoader#defineClass(String, byte[], int, int)`","Use `ClassLoader#defineClass(String, byte[], int, int)` instead of the deprecated `ClassLoader#defineClass(byte[], int, int)` in Java 1.1 or higher.",1,,`java.lang` 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.lang.StringRulesRecipes$IndexOfStringRecipe,"Replace `String.indexOf(String, 0)` with `String.indexOf(String)`","Replace `String.indexOf(String str, int fromIndex)` with `String.indexOf(String)`.",1,,`java.lang` 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.lang.MigrateSecurityManagerMulticast,Use `SecurityManager#checkMulticast(InetAddress)`,"Use `SecurityManager#checkMulticast(InetAddress)` instead of the deprecated `SecurityManager#checkMulticast(InetAddress, byte)` in Java 1.4 or higher.",1,,`java.lang` 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.lang.NullCheckAsSwitchCase,Add null check to existing switch cases,"In later Java 21+, null checks are valid in switch cases. This recipe will only add null checks to existing switch cases if there are no other statements in between them or if the block in the if statement is not impacting the flow of the switch.",1,,`java.lang` 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.lang.RefineSwitchCases,Use switch cases refinement when possible,Use guarded switch case labels and guards if all the statements in the switch block do if/else if/else on the guarded label.,1,,`java.lang` 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.lang.RenameUnderscoreIdentifier,Rename `_` identifier to `__`,"Renames single-underscore identifiers to double-underscore in Java source files with source compatibility of Java 8 or below. In Java 9+, `_` is a reserved keyword and causes a compile error.",1,,`java.lang` 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.lang.ReplaceUnusedVariablesWithUnderscore,Replace unused variables with underscore,"Replace unused variable declarations with underscore (_) for Java 22+. This includes unused variables in enhanced for loops, catch blocks, and lambda parameters where the variable is never referenced.",1,,`java.lang` 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.lang.StringFormatted,Prefer `String.formatted(Object...)`,"Prefer `String.formatted(Object...)` over `String.format(String, Object...)` in Java 17 or higher.",1,,`java.lang` 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.,"[{""name"":""addParentheses"",""type"":""Boolean"",""displayName"":""Add parentheses around the first argument"",""description"":""Add parentheses around the first argument if it is not a simple expression. Default true; if false no change will be made. ""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes$IndexOfCharRecipe,"Replace `String.indexOf(char, 0)` with `String.indexOf(char)`","Replace `String.indexOf(char ch, int fromIndex)` with `String.indexOf(char)`.",1,,`java.lang` 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.lang.StringRulesRecipes$IndexOfStringRecipe,"Replace `String.indexOf(String, 0)` with `String.indexOf(String)`","Replace `String.indexOf(String str, int fromIndex)` with `String.indexOf(String)`.",1,,`java.lang` 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.lang.StringRulesRecipes$RedundantCallRecipe,Replace redundant `String` method calls with self,Replace redundant `substring(..)` and `toString()` method calls with the `String` self.,1,,`java.lang` 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.lang.StringRulesRecipes$UseEqualsIgnoreCaseRecipe,Replace lower and upper case `String` comparisons with `String.equalsIgnoreCase(String)`,Replace `String` equality comparisons involving `.toLowerCase()` or `.toUpperCase()` with `String.equalsIgnoreCase(String anotherString)`.,1,,`java.lang` 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.lang.StringRulesRecipes,A collection of `String` rules,A collection of rules for refactoring methods called on `String` instances in Java code.,5,,`java.lang` 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.lang.SwitchCaseAssignmentsToSwitchExpression,Convert assigning Switch statements to Switch expressions,Switch statements for which each case is assigning a value to the same variable can be converted to a switch expression that returns the value of the variable. This recipe is only applicable for Java 21 and later.,1,,`java.lang` 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.lang.ThreadStopUnsupported,"Replace `Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` with `throw new UnsupportedOperationException()`","`Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` always throws a `new UnsupportedOperationException` in Java 21+. This recipe makes that explicit, as the migration is more complicated. See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html .",1,,`java.lang` 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.lang.RefineSwitchCases,Use switch cases refinement when possible,Use guarded switch case labels and guards if all the statements in the switch block do if/else if/else on the guarded label.,1,,`java.lang` 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.lang.SwitchCaseEnumGuardToLabel,Use switch cases labels for enums,Use switch case labels when a guard is checking equality with an enum.,1,,`java.lang` 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.lang.IfElseIfConstructToSwitch,If-else-if-else to switch,"Replace if-else-if-else with switch statements. In order to be replaced with a switch, all conditions must be on the same variable and there must be at least three cases.",1,,`java.lang` 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.lang.StringRulesRecipes$IndexOfCharRecipe,"Replace `String.indexOf(char, 0)` with `String.indexOf(char)`","Replace `String.indexOf(char ch, int fromIndex)` with `String.indexOf(char)`.",1,,`java.lang` 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.lang.SwitchCaseReturnsToSwitchExpression,Convert switch cases where every case returns into a returned switch expression,Switch statements where each case returns a value can be converted to a switch expression that returns the value directly. This recipe is only applicable for Java 21 and later.,1,,`java.lang` 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.lang.SwitchCaseAssignmentsToSwitchExpression,Convert assigning Switch statements to Switch expressions,Switch statements for which each case is assigning a value to the same variable can be converted to a switch expression that returns the value of the variable. This recipe is only applicable for Java 21 and later.,1,,`java.lang` 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.lang.NullCheckAsSwitchCase,Add null check to existing switch cases,"In later Java 21+, null checks are valid in switch cases. This recipe will only add null checks to existing switch cases if there are no other statements in between them or if the block in the if statement is not impacting the flow of the switch.",1,,`java.lang` 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.lang.MigrateProcessWaitForDuration,Use `Process#waitFor(Duration)`,"Use `Process#waitFor(Duration)` instead of `Process#waitFor(long, TimeUnit)` in Java 25 or higher.",1,,`java.lang` 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.lang.SwitchExpressionYieldToArrow,Convert switch expression yield to arrow,Convert switch expressions with colon cases and yield statements to arrow syntax. This recipe is only applicable for Java 21 and later.,1,,`java.lang` 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.lang.ThreadStopUnsupported,"Replace `Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` with `throw new UnsupportedOperationException()`","`Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` always throws a `new UnsupportedOperationException` in Java 21+. This recipe makes that explicit, as the migration is more complicated. See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html .",1,,`java.lang` 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.lang.ExplicitRecordImport,Add explicit import for `Record` classes,"Add explicit import for `Record` classes when upgrading past Java 14+, to avoid conflicts with `java.lang.Record`.",1,,`java.lang` 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.lang.UseStringIsEmptyRecipe,Replace `0 < s.length()` with `!s.isEmpty()`,Replace `0 < s.length()` and `s.length() != 0` with `!s.isEmpty()`.,1,,`java.lang` 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.lang.RenameUnderscoreIdentifier,Rename `_` identifier to `__`,"Renames single-underscore identifiers to double-underscore in Java source files with source compatibility of Java 8 or below. In Java 9+, `_` is a reserved keyword and causes a compile error.",1,,`java.lang` 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.lang.UseTextBlocks,Use text blocks,Text blocks are easier to read than concatenated strings.,1,,`java.lang` 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.,"[{""name"":""convertStringsWithoutNewlines"",""type"":""boolean"",""displayName"":""Whether to convert strings without newlines (the default value is true)."",""description"":""Whether or not strings without newlines should be converted to text block when processing code. The default value is true."",""example"":""true"",""value"":true},{""name"":""avoidLineContinuations"",""type"":""boolean"",""displayName"":""Whether to avoid line continuation escape sequences."",""description"":""When enabled, the recipe avoids using `\\` line continuation escapes in text blocks where the content contains newlines. Non-newline-joined strings are placed on the same text block line instead. The default value is false."",""example"":""true"",""value"":false}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.MigrateClassNewInstanceToGetDeclaredConstructorNewInstance,Use `Class#getDeclaredConstructor().newInstance()`,Use `Class#getDeclaredConstructor().newInstance()` instead of the deprecated `Class#newInstance()` in Java 9 or higher.,1,,`java.lang` 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.lang.StringFormatted,Prefer `String.formatted(Object...)`,"Prefer `String.formatted(Object...)` over `String.format(String, Object...)` in Java 17 or higher.",1,,`java.lang` 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.,"[{""name"":""addParentheses"",""type"":""Boolean"",""displayName"":""Add parentheses around the first argument"",""description"":""Add parentheses around the first argument if it is not a simple expression. Default true; if false no change will be made. ""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes$RedundantCallRecipe,Replace redundant `String` method calls with self,Replace redundant `substring(..)` and `toString()` method calls with the `String` self.,1,,`java.lang` 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.lang.JavadocToMarkdownDocComment,Convert Javadoc to Markdown documentation comments,"Convert traditional Javadoc comments (`/** ... */`) to Markdown documentation comments (`///`) as supported by JEP 467 in Java 23+. Transforms HTML constructs like `

`, ``, ``, `

`, and lists to their Markdown equivalents, and converts inline tags like `{@code}` and `{@link}` to Markdown syntax.",1,,`java.lang` 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.lang.JavaLangAPIs,Use modernized `java.lang` APIs,"Certain Java lang APIs have become deprecated and their usages changed, necessitating usage changes.",16,,`java.lang` 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.lang.MigrateCharacterIsJavaLetterToIsJavaIdentifierStart,Use `Character#isJavaIdentifierStart(char)`,Use `Character#isJavaIdentifierStart(char)` instead of the deprecated `Character#isJavaLetter(char)` in Java 1.1 or higher.,2,,`java.lang` 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.lang.MigrateCharacterIsJavaLetterOrDigitToIsJavaIdentifierPart,Use `Character#isJavaIdentifierPart(char)`,Use `Character#isJavaIdentifierPart(char)` instead of the deprecated `Character#isJavaLetterOrDigit(char)` in Java 1.1 or higher.,2,,`java.lang` 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.lang.MigrateCharacterIsSpaceToIsWhitespace,Use `Character#isWhitespace(char)`,Use `Character#isWhitespace(char)` instead of the deprecated `Character#isSpace(char)` in Java 1.1 or higher.,2,,`java.lang` 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.lang.MigrateRuntimeVersionMajorToFeature,Use `Runtime.Version#feature()`,Use `Runtime.Version#feature()` instead of the deprecated `Runtime.Version#major()` in Java 10 or higher.,2,,`java.lang` 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.lang.MigrateRuntimeVersionMinorToInterim,Use `Runtime.Version#interim()`,Use `Runtime.Version#interim()` instead of the deprecated `Runtime.Version#minor()` in Java 10 or higher.,2,,`java.lang` 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.lang.MigrateRuntimeVersionSecurityToUpdate,Use `Runtime.Version#update()`,Use `Runtime.Version#update()` instead of the deprecated `Runtime.Version#security()` in Java 10 or higher.,2,,`java.lang` 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.lang.UseVar,Use local variable type inference,"Apply local variable type inference (`var`) for primitives and objects. These recipes can cause unused imports, be advised to run `org.openrewrite.java.RemoveUnusedImports afterwards.",7,,`java.lang` 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.lang.var.UseVarForConstructors,Use `var` for constructor call assignments,"Replace explicit type declarations with `var` when the variable is initialized with a constructor call of exactly the same type. Does not transform when declared type differs from constructor type (e.g., interface vs implementation).",1,Var,`java.lang` 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.lang.var.UseVarForGenericMethodInvocations,Apply `var` to generic method invocations,"Apply `var` to variables initialized by invocations of generic methods. This recipe ignores generic factory methods without parameters, because open rewrite cannot handle them correctly ATM.",1,Var,`java.lang` 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.lang.FindVirtualThreadOpportunities,Find Virtual Thread opportunities,Find opportunities to convert existing code to use Virtual Threads.,10,,`java.lang` 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.,,"[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.FindNonVirtualExecutors,Find non-virtual `ExecutorService` creation,Find all places where static `java.util.concurrent.Executors` method creates a non-virtual `java.util.concurrent.ExecutorService`. This recipe can be used to search fro `ExecutorService` that can be replaced by Virtual Thread executor.,7,,`java.lang` 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.,,"[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForGenericsConstructors,Apply `var` to Generic Constructors,Apply `var` to generics variables initialized by constructor calls.,1,Var,`java.lang` 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.lang.var.UseVarForGenericMethodInvocations,Apply `var` to generic method invocations,"Apply `var` to variables initialized by invocations of generic methods. This recipe ignores generic factory methods without parameters, because open rewrite cannot handle them correctly ATM.",1,Var,`java.lang` 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.lang.var.UseVarForObject,Use `var` for reference-typed variables,Try to apply local variable type inference `var` to variables containing Objects where possible. This recipe will not touch variable declarations with generics or initializers containing ternary operators.,1,Var,`java.lang` 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.lang.var.UseVarForPrimitive,Use `var` for primitive and String variables,Try to apply local variable type inference `var` to primitive and String literal variables where possible. This recipe will not touch variable declarations with initializers containing ternary operators.,1,Var,`java.lang` 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.lang.var.UseVarForConstructors,Use `var` for constructor call assignments,"Replace explicit type declarations with `var` when the variable is initialized with a constructor call of exactly the same type. Does not transform when declared type differs from constructor type (e.g., interface vs implementation).",1,Var,`java.lang` 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.lang.var.UseVarForTypeCast,Use `var` for variables initialized with type casts,"Apply local variable type inference `var` to variables that are initialized by a cast expression where the cast type matches the declared variable type. This removes the redundant type duplication. For example, `String s = (String) obj;` becomes `var s = (String) obj;`.",1,Var,`java.lang` 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.logging.JavaLoggingAPIs,Use modernized `java.util.logging` APIs,"Certain Java logging APIs have become deprecated and their usages changed, necessitating usage changes.",7,,`java.util.logging` 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.logging.MigrateGetLoggingMXBeanToGetPlatformMXBean,Use `ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class)`,Use `ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class)` instead of the deprecated `LogManager#getLoggingMXBean()` in Java 9 or higher.,1,,`java.util.logging` 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.logging.MigrateInterfaceLoggingMXBeanToPlatformLoggingMXBean,Use `java.lang.management.PlatformLoggingMXBean`,Use `java.lang.management.PlatformLoggingMXBean` instead of the deprecated `java.util.logging.LoggingMXBean` in Java 9 or higher.,2,,`java.util.logging` 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.logging.MigrateLogRecordSetMillisToSetInstant,Use `LogRecord#setInstant(Instant)`,Use `LogRecord#setInstant(Instant)` instead of the deprecated `LogRecord#setMillis(long)` in Java 9 or higher.,1,,`java.util.logging` 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.lang.var.UseVarForPrimitive,Use `var` for primitive and String variables,Try to apply local variable type inference `var` to primitive and String literal variables where possible. This recipe will not touch variable declarations with initializers containing ternary operators.,1,Var,`java.lang` 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.logging.MigrateLoggerGlobalToGetGlobal,Use `Logger#getGlobal()`,The preferred way to get the global logger object is via the call `Logger#getGlobal()` over direct field access to `java.util.logging.Logger.global`.,1,,`java.util.logging` 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.logging.MigrateLoggerLogrbToUseResourceBundle,"Use `Logger#logrb(.., ResourceBundle bundleName, ..)`","Use `Logger#logrb(.., ResourceBundle bundleName, ..)` instead of the deprecated `java.util.logging.Logger#logrb(.., String bundleName, ..)` in Java 8 or higher.",1,,`java.util.logging` 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.lombok.AdoptLombokGetterMethodNames,Rename getter methods to fit Lombok,"Rename methods that are effectively getter to the name Lombok would give them. - +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.logging.MigrateLogRecordSetMillisToSetInstant,Use `LogRecord#setInstant(Instant)`,Use `LogRecord#setInstant(Instant)` instead of the deprecated `LogRecord#setMillis(long)` in Java 9 or higher.,1,,`java.util.logging` 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.logging.MigrateGetLoggingMXBeanToGetPlatformMXBean,Use `ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class)`,Use `ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class)` instead of the deprecated `LogManager#getLoggingMXBean()` in Java 9 or higher.,1,,`java.util.logging` 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.logging.JavaLoggingAPIs,Use modernized `java.util.logging` APIs,"Certain Java logging APIs have become deprecated and their usages changed, necessitating usage changes.",7,,`java.util.logging` 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.logging.MigrateInterfaceLoggingMXBeanToPlatformLoggingMXBean,Use `java.lang.management.PlatformLoggingMXBean`,Use `java.lang.management.PlatformLoggingMXBean` instead of the deprecated `java.util.logging.LoggingMXBean` in Java 9 or higher.,2,,`java.util.logging` 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.lombok.AdoptLombokSetterMethodNames,Rename setter methods to fit Lombok,"Rename methods that are effectively setter to the name Lombok would give them. Limitations: - - If two methods in a class are effectively the same getter then one's name will be corrected and the others name will be left as it is. + - If two methods in a class are effectively the same setter then one's name will be corrected and the others name will be left as it is. - If the correct name for a method is already taken by another method then the name will not be corrected. - Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g. `int getFoo() { return ba; } int getBa() { return foo; }` stays as it is.",1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.AdoptLombokSetterMethodNames,Rename setter methods to fit Lombok,"Rename methods that are effectively setter to the name Lombok would give them. +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokValueToRecord,Convert `@lombok.Value` class to Record,Convert Lombok `@Value` annotated classes to standard Java Records.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""useExactToString"",""type"":""Boolean"",""displayName"":""Add a `toString()` implementation matching Lombok"",""description"":""When set the `toString` format from Lombok is used in the migrated record.""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.AdoptLombokGetterMethodNames,Rename getter methods to fit Lombok,"Rename methods that are effectively getter to the name Lombok would give them. + Limitations: - - If two methods in a class are effectively the same setter then one's name will be corrected and the others name will be left as it is. + - If two methods in a class are effectively the same getter then one's name will be corrected and the others name will be left as it is. - If the correct name for a method is already taken by another method then the name will not be corrected. - Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g. `int getFoo() { return ba; } int getBa() { return foo; }` stays as it is.",1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.LombokBestPractices,Lombok Best Practices,Applies all recipes that enforce best practices for using Lombok.,27,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.LombokOnXToOnX_,Migrate Lombok's `@__` syntax to `onX_` for Java 8+,"Migrates Lombok's `onX` annotations from the Java 7 style using `@__` to the Java 8+ style using `onX_`. For example, `@Getter(onMethod=@__({@Id}))` becomes `@Getter(onMethod_={@Id})`.",1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.LombokValToFinalVar,Prefer `final var` over `lombok.val`,Prefer the Java standard library's `final var` and `var` over third-party usage of Lombok's `lombok.val` and `lombok.var` in Java 10 or higher.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.LombokValueToRecord,Convert `@lombok.Value` class to Record,Convert Lombok `@Value` annotated classes to standard Java Records.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""useExactToString"",""type"":""Boolean"",""displayName"":""Add a `toString()` implementation matching Lombok"",""description"":""When set the `toString` format from Lombok is used in the migrated record.""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UpdateLombokToJava11,Migrate Lombok to a Java 11 compatible version,Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.,9,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseAllArgsConstructor,Use `@AllArgsConstructor` where applicable,Prefer the Lombok `@AllArgsConstructor` annotation over explicitly written out constructors that assign all non-static fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseRequiredArgsConstructor,Use `@RequiredArgsConstructor` where applicable,Prefer the Lombok `@RequiredArgsConstructor` annotation over explicitly written out constructors that only assign final fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseNoArgsConstructor,Use `@NoArgsConstructor` where applicable,Prefer the Lombok `@NoArgsConstructor` annotation over explicitly written out constructors.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseLombokGetter,Convert getter methods to annotations,Convert trivial getter methods to `@Getter` annotations on their respective fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.LombokOnXToOnX_,Migrate Lombok's `@__` syntax to `onX_` for Java 8+,"Migrates Lombok's `onX` annotations from the Java 7 style using `@__` to the Java 8+ style using `onX_`. For example, `@Getter(onMethod=@__({@Id}))` becomes `@Getter(onMethod_={@Id})`.",1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseLombokSetter,Convert setter methods to annotations,Convert trivial setter methods to `@Setter` annotations on their respective fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseNoArgsConstructor,Use `@NoArgsConstructor` where applicable,Prefer the Lombok `@NoArgsConstructor` annotation over explicitly written out constructors.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UseRequiredArgsConstructor,Use `@RequiredArgsConstructor` where applicable,Prefer the Lombok `@RequiredArgsConstructor` annotation over explicitly written out constructors that only assign final fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.log.UseCommonsLog,Use `@CommonsLog` instead of explicit fields,Prefer the lombok annotation `@CommonsLog` over explicitly written out `org.apache.commons.logging.Log` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokBestPractices,Lombok Best Practices,Applies all recipes that enforce best practices for using Lombok.,27,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.UpdateLombokToJava11,Migrate Lombok to a Java 11 compatible version,Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.,9,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.log.UseSlf4j,Use `@Slf4` instead of explicit fields,Prefer the lombok annotation `@Slf4` over explicitly written out `org.slf4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog4j2,Use `@Log4j2` instead of explicit fields,Prefer the lombok annotation `@Log4j2` over explicitly written out `org.apache.logging.log4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseJBossLog,Use `@JBossLog` instead of explicit fields,Prefer the lombok annotation `@JBossLog` over explicitly written out `org.jboss.logging.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseCommonsLog,Use `@CommonsLog` instead of explicit fields,Prefer the lombok annotation `@CommonsLog` over explicitly written out `org.apache.commons.logging.Log` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog,Use `@Log` instead of explicit fields,Prefer the lombok annotation `@Log` over explicitly written out `java.util.logging.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog4j2,Use `@Log4j2` instead of explicit fields,Prefer the lombok annotation `@Log4j2` over explicitly written out `org.apache.logging.log4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLombokLogAnnotations,Use Lombok logger annotations instead of explicit fields,Applies all recipes that replace logger declarations with class level annotations.,6,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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.lombok.log.UseSlf4j,Use `@Slf4` instead of explicit fields,Prefer the lombok annotation `@Slf4` over explicitly written out `org.slf4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,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"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.maven.UpdateMavenProjectPropertyJavaVersion,Update Maven Java project properties,"The Java version is determined by several project properties, including: * `java.version` @@ -439,50 +440,50 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.m If none of these properties are in use and the maven compiler plugin is not otherwise configured, adds the `maven.compiler.release` property.",2,,Maven,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"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.maven.UseMavenCompilerPluginReleaseConfiguration,Use Maven compiler plugin release configuration,"Replaces any explicit `source` or `target` configuration (if present) on the `maven-compiler-plugin` with `release`, and updates the `release` value if needed. Will not downgrade the Java version if the current version is higher.",2,,Maven,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"":""releaseVersion"",""type"":""Integer"",""displayName"":""Release version"",""description"":""The new value for the release configuration. This recipe prefers ${java.version} if defined."",""example"":""11"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.metrics.SimplifyMicrometerMeterTags,Simplify [Micrometer](https://micrometer.io) meter tags,Use the simplest method to add new tags.,1,,Metrics,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.net.JavaNetAPIs,Use modernized `java.net` APIs,"Certain Java networking APIs have become deprecated and their usages changed, necessitating usage changes.",7,,`java.net` 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.net.MigrateHttpURLConnectionHttpServerErrorToHttpInternalError,Use `java.net.HttpURLConnection.HTTP_INTERNAL_ERROR`,Use `java.net.HttpURLConnection.HTTP_INTERNAL_ERROR` instead of the deprecated `java.net.HttpURLConnection.HTTP_SERVER_ERROR`.,1,,`java.net` 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.net.MigrateMulticastSocketGetTTLToGetTimeToLive,Use `java.net.MulticastSocket#getTimeToLive()`,Use `java.net.MulticastSocket#getTimeToLive()` instead of the deprecated `java.net.MulticastSocket#getTTL()` in Java 1.2 or higher.,2,,`java.net` 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.net.URLConstructorToURICreate,Convert `new URL(String)` to `URI.create(String).toURL()`,Converts `new URL(String)` constructor to `URI.create(String).toURL()`. The URL constructor has been deprecated due to security vulnerabilities when handling malformed URLs. Using `URI.create(String)` provides stronger validation and safer URL handling in modern Java applications.,1,,`java.net` 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.net.URLConstructorsToNewURI,"Convert `new URL(String, ..)` to `new URI(String, ..).toURL()`","Converts `new URL(String, ..)` constructors to `new URI(String, ..).toURL()`.",1,,`java.net` 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.net.MigrateMulticastSocketSetTTLToSetTimeToLive,Use `java.net.MulticastSocket#setTimeToLive(int)`,Use `java.net.MulticastSocket#setTimeToLive(int)` instead of the deprecated `java.net.MulticastSocket#setTTL(byte)` in Java 1.2 or higher.,1,,`java.net` 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.net.MigrateHttpURLConnectionHttpServerErrorToHttpInternalError,Use `java.net.HttpURLConnection.HTTP_INTERNAL_ERROR`,Use `java.net.HttpURLConnection.HTTP_INTERNAL_ERROR` instead of the deprecated `java.net.HttpURLConnection.HTTP_SERVER_ERROR`.,1,,`java.net` 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.net.MigrateURLDecoderDecode,"Use `java.net.URLDecoder#decode(String, StandardCharsets.UTF_8)`","Use `java.net.URLDecoder#decode(String, StandardCharsets.UTF_8)` instead of the deprecated `java.net.URLDecoder#decode(String)` in Java 10 or higher.",1,,`java.net` 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.net.MigrateURLEncoderEncode,"Use `java.net.URLEncoder#encode(String, StandardCharsets.UTF_8)`","Use `java.net.URLEncoder#encode(String, StandardCharsets.UTF_8)` instead of the deprecated `java.net.URLEncoder#encode(String)` in Java 10 or higher.",1,,`java.net` 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.net.URLConstructorToURICreate,Convert `new URL(String)` to `URI.create(String).toURL()`,Converts `new URL(String)` constructor to `URI.create(String).toURL()`. The URL constructor has been deprecated due to security vulnerabilities when handling malformed URLs. Using `URI.create(String)` provides stronger validation and safer URL handling in modern Java applications.,1,,`java.net` 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.net.URLConstructorsToNewURI,"Convert `new URL(String, ..)` to `new URI(String, ..).toURL()`","Converts `new URL(String, ..)` constructors to `new URI(String, ..).toURL()`.",1,,`java.net` 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.net.JavaNetAPIs,Use modernized `java.net` APIs,"Certain Java networking APIs have become deprecated and their usages changed, necessitating usage changes.",7,,`java.net` 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.net.MigrateMulticastSocketGetTTLToGetTimeToLive,Use `java.net.MulticastSocket#getTimeToLive()`,Use `java.net.MulticastSocket#getTimeToLive()` instead of the deprecated `java.net.MulticastSocket#getTTL()` in Java 1.2 or higher.,2,,`java.net` 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.nio.file.PathsGetToPathOf,Replace `Paths.get` with `Path.of`,The `java.nio.file.Paths.get` method was introduced in Java SE 7. The `java.nio.file.Path.of` method was introduced in Java SE 11. This recipe replaces all usages of `Paths.get` with `Path.of` for consistency.,3,File,Nio,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.search.AboutJavaVersion,Find which Java version is in use,A diagnostic for studying the distribution of Java language version levels (both source and target compatibility across files and source sets).,1,,Search,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"":""whenUsesType"",""type"":""String"",""description"":""Only mark the Java version when this type is in use."",""example"":""lombok.val""}]","[{""name"":""org.openrewrite.java.migrate.table.JavaVersionPerSourceSet"",""displayName"":""Java versions by source set"",""instanceName"":""Java versions by source set"",""description"":""A per-source set view of Java version in use."",""columns"":[{""name"":""projectName"",""type"":""String"",""displayName"":""Project name"",""description"":""The module name (useful especially for multi-module repositories).""},{""name"":""sourceSetName"",""type"":""String"",""displayName"":""Source set name"",""description"":""The source set, e.g. `main` or `test`.""},{""name"":""createdBy"",""type"":""String"",""displayName"":""Created by"",""description"":""The JDK release that was used to compile the source file.""},{""name"":""vmVendor"",""type"":""String"",""displayName"":""VM vendor"",""description"":""The vendor of the JVM that was used to compile the source file.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""String"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""}]}]" +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindInternalJavaxApis,Find uses of internal javax APIs,The libraries that define these APIs will have to be migrated before any of the repositories that use them.,1,,Search,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"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""Optionally limit the search to declarations that match the provided method pattern."",""example"":""java.util.List add(..)""}]","[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindDataUsedOnDto,Find data used on DTOs,Find data elements used on DTOs. This is useful to provide information where data over-fetching may be a problem.,1,,Search,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"":""dtoType"",""type"":""String"",""displayName"":""DTO type"",""description"":""The fully qualified name of the DTO."",""example"":""com.example.dto.*"",""required"":true}]","[{""name"":""org.openrewrite.java.migrate.table.DtoDataUses"",""displayName"":""Uses of the data elements of a DTO"",""instanceName"":""Uses of the data elements of a DTO"",""description"":""The use of the data elements of a DTO by the method declaration using it.""}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindDtoOverfetching,Find methods that only use one DTO data element,Find methods that have 'opportunities' for improvement.,1,,Search,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"":""dtoType"",""type"":""String"",""displayName"":""DTO type"",""description"":""The fully qualified name of the DTO."",""example"":""com.example.dto.*"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindInternalJavaxApis,Find uses of internal javax APIs,The libraries that define these APIs will have to be migrated before any of the repositories that use them.,1,,Search,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"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""Optionally limit the search to declarations that match the provided method pattern."",""example"":""java.util.List add(..)""}]","[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindJavaVersion,Find Java versions in use,"Finds Java versions in use, emitting one row per git repository (the lowest source/target compatibility across modules in that repository).",1,,Search,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.java.migrate.table.JavaVersionTable"",""displayName"":""Java version table"",""instanceName"":""Java version table"",""description"":""Records versions of Java in use"",""columns"":[{""name"":""sourceVersion"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The major version of Java used to compile the source code""},{""name"":""targetVersion"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The major version of Java the bytecode is compiled to run on""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindLocaleDateTimeFormats,Find locale-sensitive date/time formatting,"Finds usages of locale-based date/time formatting APIs that may be affected by JDK 20+ CLDR locale data changes, where the space before AM/PM was changed from a regular space to a narrow no-break space (NNBSP).",1,,Search,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.search.ModuleHasKotlinSource,Module has Kotlin source files,"Marks all files in modules that contain at least one Kotlin source file (`.kt`). Intended as a precondition to scope recipes to projects that actually compile Kotlin, as opposed to projects that merely pick up `kotlin-stdlib` transitively.",1,,Search,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"":""invertMarking"",""type"":""Boolean"",""displayName"":""Invert marking"",""description"":""If `true`, marks files in modules that do *not* contain Kotlin sources. Defaults to `false`.""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindJavaVersion,Find Java versions in use,"Finds Java versions in use, emitting one row per git repository (the lowest source/target compatibility across modules in that repository).",1,,Search,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.java.migrate.table.JavaVersionTable"",""displayName"":""Java version table"",""instanceName"":""Java version table"",""description"":""Records versions of Java in use"",""columns"":[{""name"":""sourceVersion"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The major version of Java used to compile the source code""},{""name"":""targetVersion"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The major version of Java the bytecode is compiled to run on""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.PlanJavaMigration,Plan a Java version migration,Study the set of Java versions and associated tools in use across many repositories.,1,,Search,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.java.migrate.table.JavaVersionMigrationPlan"",""displayName"":""Java version migration plan"",""instanceName"":""Java version migration plan"",""description"":""A per-repository view of the current state of Java versions and associated build tools"",""columns"":[{""name"":""hasJava"",""type"":""boolean"",""displayName"":""Has Java"",""description"":""Whether this is a Java repository at all.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""Integer"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""},{""name"":""gradleVersion"",""type"":""String"",""displayName"":""Gradle version"",""description"":""The version of Gradle in use, if any.""},{""name"":""hasGradleBuild"",""type"":""Boolean"",""displayName"":""Has Gradle build"",""description"":""Whether a build.gradle file exists in the repository.""},{""name"":""mavenVersion"",""type"":""String"",""displayName"":""Maven version"",""description"":""The version of Maven in use, if any.""},{""name"":""hasMavenPom"",""type"":""Boolean"",""displayName"":""Has Maven pom"",""description"":""Whether a pom.xml file exists in the repository.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.sql.JavaSqlAPIs,Use modernized `java.sql` APIs,"Certain Java sql APIs have become deprecated and their usages changed, necessitating usage changes.",2,,`java.sql` 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.search.AboutJavaVersion,Find which Java version is in use,A diagnostic for studying the distribution of Java language version levels (both source and target compatibility across files and source sets).,1,,Search,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"":""whenUsesType"",""type"":""String"",""description"":""Only mark the Java version when this type is in use."",""example"":""lombok.val""}]","[{""name"":""org.openrewrite.java.migrate.table.JavaVersionPerSourceSet"",""displayName"":""Java versions by source set"",""instanceName"":""Java versions by source set"",""description"":""A per-source set view of Java version in use."",""columns"":[{""name"":""projectName"",""type"":""String"",""displayName"":""Project name"",""description"":""The module name (useful especially for multi-module repositories).""},{""name"":""sourceSetName"",""type"":""String"",""displayName"":""Source set name"",""description"":""The source set, e.g. `main` or `test`.""},{""name"":""createdBy"",""type"":""String"",""displayName"":""Created by"",""description"":""The JDK release that was used to compile the source file.""},{""name"":""vmVendor"",""type"":""String"",""displayName"":""VM vendor"",""description"":""The vendor of the JVM that was used to compile the source file.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""String"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.sql.MigrateDriverManagerSetLogStream,Use `DriverManager#setLogWriter(java.io.PrintWriter)`,Use `DriverManager#setLogWriter(java.io.PrintWriter)` instead of the deprecated `DriverManager#setLogStream(java.io.PrintStream)` in Java 1.2 or higher.,1,,`java.sql` 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.sql.JavaSqlAPIs,Use modernized `java.sql` APIs,"Certain Java sql APIs have become deprecated and their usages changed, necessitating usage changes.",2,,`java.sql` 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.util.MigrateStringReaderToReaderOf,Use `Reader.of(CharSequence)` for non-synchronized readers,Migrate `new StringReader(String)` to `Reader.of(CharSequence)` in Java 25+. This only applies when assigning to `Reader` variables or returning from methods that return `Reader`. The new method creates non-synchronized readers which are more efficient when thread-safety is not required.,1,,`java.util` 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.util.IteratorNext,Replace `iterator().next()` with `getFirst()`,Replace `SequencedCollection.iterator().next()` with `getFirst()`.,1,,`java.util` 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.util.JavaUtilAPIs,Use modernized `java.util` APIs,Certain java util APIs have been introduced and are favored over previous APIs.,25,,`java.util` 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.util.ListFirstAndLast,"Replace `List.get(int)`, `add(int, Object)`, and `remove(int)` with `SequencedCollection` `*First` and `*Last` methods","Replace `list.get(0)` with `list.getFirst()`, `list.get(list.size() - 1)` with `list.getLast()`, and similar for `add(int, E)` and `remove(int)`.",1,,`java.util` 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.util.MigrateCollectionsSingletonSet,Prefer `Set.of(..)`,"Prefer `Set.of(..)` instead of using `Collections.singleton()` in Java 9 or higher. Note that the resulting `Set` is not behaviorally equivalent: `Set.of(..)` throws `NullPointerException` when probed with `contains(null)`, whereas `Collections.singleton(..)` returns `false`.",1,,`java.util` 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.util.ReplaceStreamCollectWithToList,Replace `Stream.collect(Collectors.toUnmodifiableList())` with `Stream.toList()`,Replace `Stream.collect(Collectors.toUnmodifiableList())` with Java 16+ `Stream.toList()`. Also replaces `Stream.collect(Collectors.toList())` if `convertToList` is set to `true`.,1,,`java.util` 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.,"[{""name"":""convertToList"",""type"":""Boolean"",""displayName"":""Convert mutable `Collectors.toList()` to immutable"",""description"":""Also replace `Stream.collect(Collectors.toList())` with `Stream.toList()`. *BEWARE*: Attempts to modify the returned list, result in an `UnsupportedOperationException`!""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsEmptyList,Prefer `List.of()`,Prefer `List.of()` instead of using `Collections.emptyList()` in Java 9 or higher.,1,,`java.util` 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.util.MigrateCollectionsEmptyMap,Prefer `Map.of()`,Prefer `Map.of()` instead of using `Collections.emptyMap()` in Java 9 or higher.,1,,`java.util` 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.util.MigrateCollectionsEmptySet,Prefer `Set.of()`,Prefer `Set.of()` instead of using `Collections.emptySet()` in Java 9 or higher.,1,,`java.util` 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.util.MigrateCollectionsSingletonList,Prefer `List.of(..)`,"Prefer `List.of(..)` instead of using `Collections.singletonList()` in Java 9 or higher. Note that the resulting `List` is not behaviorally equivalent: `List.of(..)` throws `NullPointerException` when probed with `contains(null)`, `indexOf(null)`, or `lastIndexOf(null)`, whereas `Collections.singletonList(..)` returns `false`/`-1`.",1,,`java.util` 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.util.RemoveFinalizerFromZip,"Remove invocations of deprecated invocations from Deflater, Inflater, ZipFile","Remove invocations of finalize() deprecated invocations from Deflater, Inflater, ZipFile.",1,,`java.util` 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.util.MigrateCollectionsSingletonMap,Prefer `Map.of(..)`,"Prefer `Map.of(..)` instead of using `Collections.singletonMap()` in Java 9 or higher. Note that the resulting `Map` is not behaviorally equivalent: `Map.of(..)` throws `NullPointerException` when probed with `containsKey(null)`, `containsValue(null)`, or `get(null)`, whereas `Collections.singletonMap(..)` returns `false`/`null`.",1,,`java.util` 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.util.MigrateCollectionsSingletonSet,Prefer `Set.of(..)`,"Prefer `Set.of(..)` instead of using `Collections.singleton()` in Java 9 or higher. Note that the resulting `Set` is not behaviorally equivalent: `Set.of(..)` throws `NullPointerException` when probed with `contains(null)`, whereas `Collections.singleton(..)` returns `false`.",1,,`java.util` 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.util.UseMapOf,Prefer `Map.of(..)`,Prefer `Map.of(..)` instead of using `java.util.Map#put(..)` in Java 10 or higher.,1,,`java.util` 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.util.MigrateCollectionsUnmodifiableList,Prefer `List.of(..)`,Prefer `List.Of(..)` instead of using `unmodifiableList(java.util.Arrays asList())` in Java 9 or higher.,1,,`java.util` 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.util.MigrateCollectionsUnmodifiableSet,Prefer `Set.of(..)`,Prefer `Set.Of(..)` instead of using `unmodifiableSet(java.util.Set(java.util.Arrays asList()))` in Java 9 or higher.,1,,`java.util` 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.util.MigrateInflaterDeflaterToClose,Replace `Inflater` and `Deflater` `end()` calls with `close()`,"Replace `end()` method calls with `close()` method calls for `Inflater` and `Deflater` classes in Java 25+, as they now implement AutoCloseable.",3,,`java.util` 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.util.MigrateStringReaderToReaderOf,Use `Reader.of(CharSequence)` for non-synchronized readers,Migrate `new StringReader(String)` to `Reader.of(CharSequence)` in Java 25+. This only applies when assigning to `Reader` variables or returning from methods that return `Reader`. The new method creates non-synchronized readers which are more efficient when thread-safety is not required.,1,,`java.util` 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.util.OptionalNotEmptyToIsPresent,Prefer `Optional.isPresent()`,Prefer `Optional.isPresent()` instead of using `!Optional.isEmpty()` in Java 11 or higher.,1,,`java.util` 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.util.OptionalNotPresentToIsEmpty,Prefer `Optional.isEmpty()`,Prefer `Optional.isEmpty()` instead of using `!Optional.isPresent()` in Java 11 or higher.,1,,`java.util` 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.util.OptionalStreamRecipe,`Stream` idiom recipe,Migrate Java 8 `Optional.filter(Optional::isPresent).map(Optional::get)` to Java 11 `.flatMap(Optional::stream)`.,1,,`java.util` 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.util.RemoveFinalizerFromZip,"Remove invocations of deprecated invocations from Deflater, Inflater, ZipFile","Remove invocations of finalize() deprecated invocations from Deflater, Inflater, ZipFile.",1,,`java.util` 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.util.MigrateCollectionsUnmodifiableSet,Prefer `Set.of(..)`,Prefer `Set.Of(..)` instead of using `unmodifiableSet(java.util.Set(java.util.Arrays asList()))` in Java 9 or higher.,1,,`java.util` 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.util.UsePredicateNot,Prefer `Predicate.not(..)` over casting to `Predicate` and calling `negate()`,Replace `((Predicate) lambdaOrMethodRef).negate()` with `Predicate.not(lambdaOrMethodRef)` as of Java 11.,1,,`java.util` 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.util.MigrateCollectionsEmptySet,Prefer `Set.of()`,Prefer `Set.of()` instead of using `Collections.emptySet()` in Java 9 or higher.,1,,`java.util` 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.util.ReplaceMathRandomWithThreadLocalRandomRecipe,Replace `java.lang.Math random()` with `ThreadLocalRandom nextDouble()`,Replace `java.lang.Math random()` with `ThreadLocalRandom nextDouble()` to reduce contention.,1,,`java.util` 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.util.ReplaceStreamCollectWithToList,Replace `Stream.collect(Collectors.toUnmodifiableList())` with `Stream.toList()`,Replace `Stream.collect(Collectors.toUnmodifiableList())` with Java 16+ `Stream.toList()`. Also replaces `Stream.collect(Collectors.toList())` if `convertToList` is set to `true`.,1,,`java.util` 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.,"[{""name"":""convertToList"",""type"":""Boolean"",""displayName"":""Convert mutable `Collectors.toList()` to immutable"",""description"":""Also replace `Stream.collect(Collectors.toList())` with `Stream.toList()`. *BEWARE*: Attempts to modify the returned list, result in an `UnsupportedOperationException`!""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.SequencedCollection,Adopt `SequencedCollection`,"Replace older code patterns with `SequencedCollection` methods, as per https://openjdk.org/jeps/431.",7,,`java.util` 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.util.StreamFindFirst,Use `getFirst()` instead of `stream().findFirst().orElseThrow()`,"For SequencedCollections, use `collection.getFirst()` instead of `collection.stream().findFirst().orElseThrow()`.",1,,`java.util` 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.util.UseEnumSetOf,Prefer `EnumSet of(..)`,Prefer `EnumSet of(..)` instead of using `Set of(..)` when the arguments are enums in Java 9 or higher.,1,,`java.util` 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.,"[{""name"":""convertEmptySet"",""type"":""Boolean"",""displayName"":""Convert empty `Set.of()` to `EnumSet.noneOf()`"",""description"":""When true, converts `Set.of()` with no arguments to `EnumSet.noneOf()`. Default true."",""example"":""true""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.UseListOf,Prefer `List.of(..)`,Prefer `List.of(..)` instead of using `java.util.List#add(..)` in anonymous ArrayList initializers in Java 10 or higher. This recipe will not modify code where the List is later mutated since `List.of` returns an immutable list.,1,,`java.util` 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.util.UseLocaleOf,Prefer `Locale.of(..)` over `new Locale(..)`,Prefer `Locale.of(..)` over `new Locale(..)` in Java 19 or higher.,1,,`java.util` 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.util.UseMapOf,Prefer `Map.of(..)`,Prefer `Map.of(..)` instead of using `java.util.Map#put(..)` in Java 10 or higher.,1,,`java.util` 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.util.UsePredicateNot,Prefer `Predicate.not(..)` over casting to `Predicate` and calling `negate()`,Replace `((Predicate) lambdaOrMethodRef).negate()` with `Predicate.not(lambdaOrMethodRef)` as of Java 11.,1,,`java.util` 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.util.OptionalNotEmptyToIsPresent,Prefer `Optional.isPresent()`,Prefer `Optional.isPresent()` instead of using `!Optional.isEmpty()` in Java 11 or higher.,1,,`java.util` 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.util.UseListOf,Prefer `List.of(..)`,Prefer `List.of(..)` instead of using `java.util.List#add(..)` in anonymous ArrayList initializers in Java 10 or higher. This recipe will not modify code where the List is later mutated since `List.of` returns an immutable list.,1,,`java.util` 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.util.UseEnumSetOf,Prefer `EnumSet of(..)`,Prefer `EnumSet of(..)` instead of using `Set of(..)` when the arguments are enums in Java 9 or higher.,1,,`java.util` 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.,"[{""name"":""convertEmptySet"",""type"":""Boolean"",""displayName"":""Convert empty `Set.of()` to `EnumSet.noneOf()`"",""description"":""When true, converts `Set.of()` with no arguments to `EnumSet.noneOf()`. Default true."",""example"":""true""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsEmptyMap,Prefer `Map.of()`,Prefer `Map.of()` instead of using `Collections.emptyMap()` in Java 9 or higher.,1,,`java.util` 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.util.UseSetOf,Prefer `Set.of(..)`,Prefer `Set.of(..)` instead of using `java.util.Set#add(..)` in anonymous HashSet initializers in Java 10 or higher. This recipe will not modify code where the Set is later mutated since `Set.of` returns an immutable set.,1,,`java.util` 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.util.StreamFindFirst,Use `getFirst()` instead of `stream().findFirst().orElseThrow()`,"For SequencedCollections, use `collection.getFirst()` instead of `collection.stream().findFirst().orElseThrow()`.",1,,`java.util` 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.util.OptionalNotPresentToIsEmpty,Prefer `Optional.isEmpty()`,Prefer `Optional.isEmpty()` instead of using `!Optional.isPresent()` in Java 11 or higher.,1,,`java.util` 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.util.ListFirstAndLast,"Replace `List.get(int)`, `add(int, Object)`, and `remove(int)` with `SequencedCollection` `*First` and `*Last` methods","Replace `list.get(0)` with `list.getFirst()`, `list.get(list.size() - 1)` with `list.getLast()`, and similar for `add(int, E)` and `remove(int)`.",1,,`java.util` 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.util.JavaUtilAPIs,Use modernized `java.util` APIs,Certain java util APIs have been introduced and are favored over previous APIs.,25,,`java.util` 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.util.SequencedCollection,Adopt `SequencedCollection`,"Replace older code patterns with `SequencedCollection` methods, as per https://openjdk.org/jeps/431.",7,,`java.util` 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.util.MigrateInflaterDeflaterToClose,Replace `Inflater` and `Deflater` `end()` calls with `close()`,"Replace `end()` method calls with `close()` method calls for `Inflater` and `Deflater` classes in Java 25+, as they now implement AutoCloseable.",3,,`java.util` 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.scala.migrate.UpgradeScala_2_12,Migrate to Scala 2.12.+,Upgrade the Scala version for compatibility with newer Java versions.,2,,,Migrate,Scala,,,,,, diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java new file mode 100644 index 0000000000..ede418593a --- /dev/null +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -0,0 +1,1442 @@ +/* + * 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; + +import org.junit.jupiter.api.Test; +import org.openrewrite.test.RewriteTest; +import org.openrewrite.test.RecipeSpec; + +import static org.openrewrite.java.Assertions.mavenProject; +import static org.openrewrite.maven.Assertions.pomXml; + +public class AddMockitoJavaAgentToMavenSurefirePluginTest implements RewriteTest { + + @Override + public void defaults(RecipeSpec spec) { + spec.recipe(new AddMockitoJavaAgentToMavenSurefirePlugin()); + } + + @Test + void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderMockitoVersion() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.3.13\n" + + " \n" + + " \n" + + " \n" + + " custom value\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.3.13\n" + + " \n" + + " \n" + + " \n" + + " custom value\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " some-property\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " foobar\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " some-property\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " foobar\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsMockitoAgentArgPreservingExistingArgLineArguments() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " foobar\n" + + " \n" + + " -Xmx256m\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " foobar\n" + + " \n" + + " \n" + + " -Xmx256m -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " jar\n" + + " test\n\n" + + " \n" + + " test-module1\n" + + " \n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + "", + spec -> spec.path("pom.xml") + ), + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test-module1\n" + + " ${revision}\n" + + " jar\n" + + " test-module1\n\n" + + " \n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " ../pom.xml\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test-module1\n" + + " ${revision}\n" + + " jar\n" + + " test-module1\n\n" + + " \n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " ../pom.xml\n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + spec -> spec.path("test-module1/pom.xml") + ) + ) + ); + } + + @Test + void addsMavenSurefireAndDependencyPluginsWhenAbsent() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " analyize\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " analyize\n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " foobar\n" + + " \n" + + " -Duser.language=en\n" + + " -Xmx256m\n" + + " -XX:MaxPermSize=256m\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " foobar\n" + + " \n" + + " -Duser.language=en\n" + + " -Xmx256m\n" + + " -XX:MaxPermSize=256m\n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " ${project.build.directory}/jacoco.exec\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void makesNoChangeWhenMockitoAgentFlagAlreadyExistsUsingSingleLineArgline() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " ${project.build.directory}/jacoco.exec\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void makesNoChangeWhenMockitoCoreDependencyIsNotOnClasspath() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " ${revision}\n" + + " jar\n" + + " test\n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " ${project.build.directory}/jacoco.exec\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "" + ) + ) + ); + } + + @Test + void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " jar\n" + + " test\n\n" + + " \n" + + " test-module1\n" + + " \n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " ${project.build.directory}/jacoco.exec\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + spec -> spec.path("pom.xml") + ), + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test-module1\n" + + " ${revision}\n" + + " jar\n" + + " test-module1\n\n" + + " \n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " ../pom.xml\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " \n" + + "", + spec -> spec.path("test-module1/pom.xml") + ) + ) + ); + } + + @Test + void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfiguration() { + rewriteRun( + mavenProject("test-project", + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " jar\n" + + " test\n\n" + + " \n" + + " test-module1\n" + + " \n\n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-parent\n" + + " 3.5.4\n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " ${project.build.directory}/jacoco.exec\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + spec -> spec.path("pom.xml") + ), + pomXml( + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test-module1\n" + + " ${revision}\n" + + " jar\n" + + " test-module1\n\n" + + " \n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " ../pom.xml\n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " \n" + + "", + "\n" + + "\n" + + "\n4.0.0\n" + + " org.sample\n" + + " test-module1\n" + + " ${revision}\n" + + " jar\n" + + " test-module1\n\n" + + " \n" + + " org.sample\n" + + " test\n" + + " 1.0\n" + + " ../pom.xml\n" + + " \n" + + " \n" + + " \n" + + " \n\n" + + " \n" + + " \n" + + " org.springframework.boot\n" + + " spring-boot-starter-test\n" + + " test\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-surefire-plugin\n" + + " \n" + + " \n" + + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" + + " \n" + + " \n" + + " \n" + + " org.apache.maven.plugins\n" + + " maven-dependency-plugin\n" + + " \n" + + " \n" + + " \n" + + " properties\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + spec -> spec.path("test-module1/pom.xml") + ) + ) + ); + } +} diff --git a/src/test/java/org/openrewrite/java/migrate/UpgradeToJava25Test.java b/src/test/java/org/openrewrite/java/migrate/UpgradeToJava25Test.java index f116ab9393..44d4b3a562 100644 --- a/src/test/java/org/openrewrite/java/migrate/UpgradeToJava25Test.java +++ b/src/test/java/org/openrewrite/java/migrate/UpgradeToJava25Test.java @@ -118,8 +118,7 @@ void upgradesMavenPluginsForJava25() { .containsPattern("maven-compiler-plugin\\s*3\\.15\\.") .containsPattern("maven-surefire-plugin\\s*3\\.5\\.") .containsPattern("maven-failsafe-plugin\\s*3\\.5\\.") - .contains("--add-opens java.base/java.lang=ALL-UNNAMED") - .contains("-Dnet.bytebuddy.experimental=true") + .contains("@{argLine} -javaagent:${org.mockito:mockito-core:jar}") .actual()) ) ) From 08770499d031f29e70d056b4bf6c9708e9e4acad Mon Sep 17 00:00:00 2001 From: "Hudson, Ryan" Date: Mon, 8 Jun 2026 15:08:30 -0400 Subject: [PATCH 02/13] Contributing AddMockitoJavaAgentToMavenSurefirePlugin recipe for better recipe alignment to Mockito recommendations. --- ...itoJavaAgentToMavenSurefirePluginTest.java | 2950 +++++++++-------- 1 file changed, 1535 insertions(+), 1415 deletions(-) diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java index ede418593a..fe3a191299 100644 --- a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -24,1419 +24,1539 @@ public class AddMockitoJavaAgentToMavenSurefirePluginTest implements RewriteTest { - @Override - public void defaults(RecipeSpec spec) { - spec.recipe(new AddMockitoJavaAgentToMavenSurefirePlugin()); - } - - @Test - void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderMockitoVersion() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.3.13\n" - + " \n" - + " \n" - + " \n" - + " custom value\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.3.13\n" - + " \n" - + " \n" - + " \n" - + " custom value\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " some-property\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " foobar\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " some-property\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " foobar\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsMockitoAgentArgPreservingExistingArgLineArguments() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " foobar\n" - + " \n" - + " -Xmx256m\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " foobar\n" - + " \n" - + " \n" - + " -Xmx256m -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " jar\n" - + " test\n\n" - + " \n" - + " test-module1\n" - + " \n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + "", - spec -> spec.path("pom.xml") - ), - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test-module1\n" - + " ${revision}\n" - + " jar\n" - + " test-module1\n\n" - + " \n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " ../pom.xml\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test-module1\n" - + " ${revision}\n" - + " jar\n" - + " test-module1\n\n" - + " \n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " ../pom.xml\n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - spec -> spec.path("test-module1/pom.xml") - ) - ) - ); - } - - @Test - void addsMavenSurefireAndDependencyPluginsWhenAbsent() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " analyize\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " analyize\n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " foobar\n" - + " \n" - + " -Duser.language=en\n" - + " -Xmx256m\n" - + " -XX:MaxPermSize=256m\n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " foobar\n" - + " \n" - + " -Duser.language=en\n" - + " -Xmx256m\n" - + " -XX:MaxPermSize=256m\n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " ${project.build.directory}/jacoco.exec\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void makesNoChangeWhenMockitoAgentFlagAlreadyExistsUsingSingleLineArgline() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " ${project.build.directory}/jacoco.exec\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void makesNoChangeWhenMockitoCoreDependencyIsNotOnClasspath() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " ${revision}\n" - + " jar\n" - + " test\n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " ${project.build.directory}/jacoco.exec\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "" - ) - ) - ); - } - - @Test - void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " jar\n" - + " test\n\n" - + " \n" - + " test-module1\n" - + " \n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " ${project.build.directory}/jacoco.exec\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - spec -> spec.path("pom.xml") - ), - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test-module1\n" - + " ${revision}\n" - + " jar\n" - + " test-module1\n\n" - + " \n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " ../pom.xml\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " \n" - + "", - spec -> spec.path("test-module1/pom.xml") - ) - ) - ); - } - - @Test - void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfiguration() { - rewriteRun( - mavenProject("test-project", - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " jar\n" - + " test\n\n" - + " \n" - + " test-module1\n" - + " \n\n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-parent\n" - + " 3.5.4\n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " ${project.build.directory}/jacoco.exec\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - spec -> spec.path("pom.xml") - ), - pomXml( - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test-module1\n" - + " ${revision}\n" - + " jar\n" - + " test-module1\n\n" - + " \n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " ../pom.xml\n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " \n" - + "", - "\n" - + "\n" - + "\n4.0.0\n" - + " org.sample\n" - + " test-module1\n" - + " ${revision}\n" - + " jar\n" - + " test-module1\n\n" - + " \n" - + " org.sample\n" - + " test\n" - + " 1.0\n" - + " ../pom.xml\n" - + " \n" - + " \n" - + " \n" - + " \n\n" - + " \n" - + " \n" - + " org.springframework.boot\n" - + " spring-boot-starter-test\n" - + " test\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-surefire-plugin\n" - + " \n" - + " \n" - + " @{argLine} -javaagent:${org.mockito:mockito-core:jar}\n" - + " \n" - + " \n" - + " \n" - + " org.apache.maven.plugins\n" - + " maven-dependency-plugin\n" - + " \n" - + " \n" - + " \n" - + " properties\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "", - spec -> spec.path("test-module1/pom.xml") - ) - ) - ); - } + @Override + public void defaults(RecipeSpec spec) { + spec.recipe(new AddMockitoJavaAgentToMavenSurefirePlugin()); + } + + @Test + void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + + """ + ) + ) + ); + } + + @Test + void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderMockitoVersion() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.3.13 + + + + custom value + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.3.13 + + + + custom value + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} + + + + + """ + ) + ) + ); + } + + @Test + void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + some-property + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + foobar + + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + some-property + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + foobar + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """ + ) + ) + ); + } + + @Test + void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """ + ) + ) + ); + } + + @Test + void addsMockitoAgentArgPreservingExistingArgLineArguments() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + foobar + + -Xmx256m + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + foobar + + + -Xmx256m -javaagent:${org.mockito:mockito-core:jar} + + + + + """ + ) + ) + ); + } + + @Test + void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + 1.0 + jar + test + + + test-module1 + + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + """, + spec -> spec.path("pom.xml") + ), + pomXml( + """ + + + + 4.0.0 + org.sample + test-module1 + ${revision} + jar + test-module1 + + + org.sample + test + 1.0 + ../pom.xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + """, + """ + + + + 4.0.0 + org.sample + test-module1 + ${revision} + jar + test-module1 + + + org.sample + test + 1.0 + ../pom.xml + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """, + spec -> spec.path("test-module1/pom.xml") + ) + ) + ); + } + + @Test + void addsMavenSurefireAndDependencyPluginsWhenAbsent() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """ + ) + ) + ); + } + + @Test + void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """ + ) + ) + ); + } + + @Test + void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + + analyize + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + + analyize + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + """ + ) + ) + ); + } + + @Test + void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + foobar + + -Duser.language=en + -Xmx256m + -XX:MaxPermSize=256m + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + foobar + + -Duser.language=en + -Xmx256m + -XX:MaxPermSize=256m + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + + """ + ) + ) + ); + } + + @Test + void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + ${project.build.directory}/jacoco.exec + + + + + + """ + ) + ) + ); + } + + @Test + void makesNoChangeWhenMockitoAgentFlagAlreadyExistsUsingSingleLineArgline() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + ${project.build.directory}/jacoco.exec + + + + + + """ + ) + ) + ); + } + + @Test + void makesNoChangeWhenMockitoCoreDependencyIsNotOnClasspath() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${project.build.directory}/jacoco.exec + + + + + + """ + ) + ) + ); + } + + @Test + void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + 1.0 + jar + test + + + test-module1 + + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + ${project.build.directory}/jacoco.exec + + + + + + + """, + spec -> spec.path("pom.xml") + ), + pomXml( + """ + + + + 4.0.0 + org.sample + test-module1 + ${revision} + jar + test-module1 + + + org.sample + test + 1.0 + ../pom.xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + """, + spec -> spec.path("test-module1/pom.xml") + ) + ) + ); + } + + @Test + void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfiguration() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + 1.0 + jar + test + + + test-module1 + + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${project.build.directory}/jacoco.exec + + + + + + + """, + spec -> spec.path("pom.xml") + ), + pomXml( + """ + + + + 4.0.0 + org.sample + test-module1 + ${revision} + jar + test-module1 + + + org.sample + test + 1.0 + ../pom.xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + """, + """ + + + + 4.0.0 + org.sample + test-module1 + ${revision} + jar + test-module1 + + + org.sample + test + 1.0 + ../pom.xml + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + + """, + spec -> spec.path("test-module1/pom.xml") + ) + ) + ); + } } From 8740cde395285bbf13d4359ffda1227074b1acb5 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 9 Jun 2026 16:25:45 +0200 Subject: [PATCH 03/13] Remove stale AddSurefireFailsafeArgLineForMockito entry from recipes.csv --- src/main/resources/META-INF/rewrite/recipes.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/META-INF/rewrite/recipes.csv b/src/main/resources/META-INF/rewrite/recipes.csv index 1e365c08e0..7de0bc783d 100644 --- a/src/main/resources/META-INF/rewrite/recipes.csv +++ b/src/main/resources/META-INF/rewrite/recipes.csv @@ -97,7 +97,6 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.S maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.MigrateZipErrorToZipException,Use `ZipException` instead of `ZipError`,Use `ZipException` instead of the deprecated `ZipError` in Java 9 or higher.,2,,,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.EnableLombokAnnotationProcessor,Enable Lombok annotation processor,With Java 23 the encapsulation of JDK internals made it necessary to configure annotation processors like Lombok explicitly. The change is valid for older versions as well.,3,,,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.UpgradePluginsForJava25,Upgrade plugins to Java 25 compatible versions,Updates plugins and dependencies to versions compatible with Java 25.,10,,,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.AddSurefireFailsafeArgLineForMockito,Add surefire `--add-opens` for Mockito/ByteBuddy,Adds `--add-opens` JVM arguments required by Mockito and ByteBuddy to the Maven Surefire and Failsafe plugin `argLine` configuration. Only applied when the project depends on Mockito.,2,,,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.UpgradeBuildToJava24,Upgrade build to Java 24 for Kotlin pre-2.3,"Kotlin versions before 2.3 only support up to Java 24. Applies only to modules that actually compile Kotlin (i.e. contain `.kt` source files), so transitive `kotlin-stdlib` dependencies do not trigger the cap.",169,,,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.UpgradeBuildToJava25,Upgrade build to Java 25 (non-Kotlin),"Upgrades build files to Java 25 for modules without Kotlin source files. This covers pure Java projects, including those that only pick up `kotlin-stdlib` transitively through another dependency.",179,,,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.UpgradeBuildToJava25ForKotlin,Upgrade build to Java 25 for Kotlin 2.3+,Upgrades build files to Java 25 for Kotlin modules already on Kotlin 2.3 or later.,179,,,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.,, From aa487fb22b0def910ff913f712bf8e26b611ec35 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 9 Jun 2026 19:24:54 +0200 Subject: [PATCH 04/13] Simplify AddMockitoJavaAgentToMavenSurefirePlugin: guard matchers before per-tag work Move getArgLineJavaAgentArgument() and buildConfigurationTag() inside the matched surefire branches in visitTag so they no longer run for every tag in the pom, and replace the throwaway new ArrayList<>() default with emptyList(). --- .../AddMockitoJavaAgentToMavenSurefirePlugin.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index 322bf4996c..815e73c971 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -38,10 +38,11 @@ import org.openrewrite.xml.tree.Content; import org.openrewrite.xml.tree.Xml; -import java.util.ArrayList; import java.util.List; import java.util.Optional; +import static java.util.Collections.emptyList; + public class AddMockitoJavaAgentToMavenSurefirePlugin extends Recipe { private static final XPathMatcher MAVEN_SUREFIRE_PLUGIN_MATCHER = new XPathMatcher( @@ -75,7 +76,7 @@ public TreeVisitor getVisitor() { private final String CONFIGURATION_TAG_TEMPLATE = "%s"; private String getArgLineJavaAgentArgument() { - String mockitoCoreVersion = getResolutionResult().getDependencies().getOrDefault(Scope.Test, new ArrayList<>()).stream() + String mockitoCoreVersion = getResolutionResult().getDependencies().getOrDefault(Scope.Test, emptyList()).stream() .filter(dependency -> dependency.getGroupId().equals("org.mockito") && dependency.getArtifactId() .equals("mockito-core")).findFirst().map(ResolvedDependency::getVersion).get(); @@ -127,14 +128,14 @@ public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) { @Override public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { Xml.Tag t = super.visitTag(tag, ctx); - String argLineJavaAgentParam = getArgLineJavaAgentArgument(); - Xml.Tag configurationTag = buildConfigurationTag(argLineJavaAgentParam, false); //noinspection unchecked final List tagContents = (List) t.getContent(); if (MAVEN_SUREFIRE_PLUGIN_MATCHER.matches(getCursor()) && !t.getChild("configuration").isPresent()) { - return autoFormat(t.withContent(ListUtils.concat(tagContents, configurationTag)), ctx); + return autoFormat(t.withContent(ListUtils.concat(tagContents, + buildConfigurationTag(getArgLineJavaAgentArgument(), false))), ctx); } else if (MAVEN_SUREFIRE_PLUGIN_CONFIGURATION_MATCHER.matches(getCursor())) { + String argLineJavaAgentParam = getArgLineJavaAgentArgument(); List argLineTagChildren = t.getChildren("argLine"); if (argLineTagChildren.size() == 1) { Xml.Tag argLineTag = argLineTagChildren.get(0); @@ -148,7 +149,7 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { } } else if(argLineTagChildren.isEmpty()) { return autoFormat(t.withContent( - ListUtils.concatAll(tagContents, configurationTag.getContent())), ctx); + ListUtils.concatAll(tagContents, buildConfigurationTag(argLineJavaAgentParam, false).getContent())), ctx); } } return t; From 86bafe6132793cedf369e5161c4caa809012ee71 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 9 Jun 2026 21:38:11 +0200 Subject: [PATCH 05/13] Use Lombok @Getter fields for recipe display name and description --- .../AddMockitoJavaAgentToMavenSurefirePlugin.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index 815e73c971..92bc2096ca 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -15,6 +15,7 @@ */ package org.openrewrite.java.migrate; +import lombok.Getter; import org.intellij.lang.annotations.Language; import org.openrewrite.ExecutionContext; import org.openrewrite.Preconditions; @@ -60,15 +61,11 @@ public class AddMockitoJavaAgentToMavenSurefirePlugin extends Recipe { @Language("xml") private static final String MAVEN_DEPENDENCY_PLUGIN_EXECUTION_TAG = ""+ MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL + ""; - @Override - public String getDisplayName() { - return "Add Mockito Java Agent to Maven Surefire Plugin"; - } + @Getter + final String displayName = "Add Mockito Java Agent to Maven Surefire Plugin"; - @Override - public String getDescription() { - return "Adds required configuration to specifically enable the Mockito/Bytebuddy Java agent in the Maven Surefire plugin for Java 21 compatibility."; - } + @Getter + final String description = "Adds required configuration to specifically enable the Mockito/Bytebuddy Java agent in the Maven Surefire plugin for Java 21 compatibility."; @Override public TreeVisitor getVisitor() { From a3609b93d08ed20bfb0bc95807a672f2cc1a8c37 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 9 Jun 2026 21:51:12 +0200 Subject: [PATCH 06/13] Match surefire plugin via isPluginTag to cover pluginManagement Replace the /project/build/plugins XPath matchers in visitTag with the framework MavenVisitor.isPluginTag(groupId, artifactId), which matches any plugin under a plugins element (//plugins/plugin) and therefore also covers surefire declarations in build/pluginManagement/plugins. Handle the argLine configuration entirely at the plugin-tag level. Add a test augmenting a surefire plugin declared in pluginManagement. --- ...MockitoJavaAgentToMavenSurefirePlugin.java | 57 +++++---- ...itoJavaAgentToMavenSurefirePluginTest.java | 115 ++++++++++++++++++ 2 files changed, 147 insertions(+), 25 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index 92bc2096ca..8c393695f4 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -46,11 +46,8 @@ public class AddMockitoJavaAgentToMavenSurefirePlugin extends Recipe { - private static final XPathMatcher MAVEN_SUREFIRE_PLUGIN_MATCHER = new XPathMatcher( - "/project/build/plugins/plugin[artifactId='maven-surefire-plugin']"); - - private static final XPathMatcher MAVEN_SUREFIRE_PLUGIN_CONFIGURATION_MATCHER = new XPathMatcher( - "/project/build/plugins/plugin[artifactId='maven-surefire-plugin']/configuration"); + private static final String MAVEN_PLUGINS_GROUP_ID = "org.apache.maven.plugins"; + private static final String MAVEN_SUREFIRE_PLUGIN_ARTIFACT_ID = "maven-surefire-plugin"; @Language("xpath") private static final String MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER = "/project/build/plugins/plugin[artifactId='maven-dependency-plugin']/executions/execution"; @@ -125,29 +122,39 @@ public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) { @Override public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { Xml.Tag t = super.visitTag(tag, ctx); + // `isPluginTag` matches any `plugin` under a `plugins` element, so this covers both + // `build/plugins` and `build/pluginManagement/plugins` declarations. + if (!isPluginTag(MAVEN_PLUGINS_GROUP_ID, MAVEN_SUREFIRE_PLUGIN_ARTIFACT_ID)) { + return t; + } + + String argLineJavaAgentParam = getArgLineJavaAgentArgument(); + //noinspection unchecked + List pluginContents = (List) t.getContent(); + Optional configuration = t.getChild("configuration"); + if (!configuration.isPresent()) { + return autoFormat(t.withContent(ListUtils.concat(pluginContents, + buildConfigurationTag(argLineJavaAgentParam, false))), ctx); + } + Xml.Tag config = configuration.get(); //noinspection unchecked - final List tagContents = (List) t.getContent(); - if (MAVEN_SUREFIRE_PLUGIN_MATCHER.matches(getCursor()) && !t.getChild("configuration").isPresent()) { - return autoFormat(t.withContent(ListUtils.concat(tagContents, - buildConfigurationTag(getArgLineJavaAgentArgument(), false))), ctx); - } else if (MAVEN_SUREFIRE_PLUGIN_CONFIGURATION_MATCHER.matches(getCursor())) { - String argLineJavaAgentParam = getArgLineJavaAgentArgument(); - List argLineTagChildren = t.getChildren("argLine"); - if (argLineTagChildren.size() == 1) { - Xml.Tag argLineTag = argLineTagChildren.get(0); - String existingArgLineValue = argLineTag.getValue().orElse("@{argLine}"); - - if (!existingArgLineValue.contains(argLineJavaAgentParam)) { - List nonArgLineTags = ListUtils.filter(tagContents, content -> content != argLineTag); - Xml.Tag configurationTagWithExistingArgParams = buildConfigurationTag(existingArgLineValue + " " + argLineJavaAgentParam, true); - return autoFormat(t.withContent( - ListUtils.concatAll(nonArgLineTags, configurationTagWithExistingArgParams.getContent())), ctx); - } - } else if(argLineTagChildren.isEmpty()) { - return autoFormat(t.withContent( - ListUtils.concatAll(tagContents, buildConfigurationTag(argLineJavaAgentParam, false).getContent())), ctx); + List configContents = (List) config.getContent(); + List argLineTagChildren = config.getChildren("argLine"); + if (argLineTagChildren.size() == 1) { + Xml.Tag argLineTag = argLineTagChildren.get(0); + String existingArgLineValue = argLineTag.getValue().orElse("@{argLine}"); + + if (!existingArgLineValue.contains(argLineJavaAgentParam)) { + List nonArgLineTags = ListUtils.filter(configContents, content -> content != argLineTag); + Xml.Tag mergedConfiguration = buildConfigurationTag(existingArgLineValue + " " + argLineJavaAgentParam, true); + Xml.Tag updatedConfig = config.withContent(ListUtils.concatAll(nonArgLineTags, mergedConfiguration.getContent())); + return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); } + } else if (argLineTagChildren.isEmpty()) { + Xml.Tag updatedConfig = config.withContent(ListUtils.concatAll(configContents, + buildConfigurationTag(argLineJavaAgentParam, false).getContent())); + return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); } return t; } diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java index fe3a191299..ce05f10817 100644 --- a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -1559,4 +1559,119 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur ) ); } + + @Test + void augmentsSurefirePluginDeclaredInPluginManagement() { + rewriteRun( + mavenProject("test-project", + pomXml( + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + """, + """ + + + + 4.0.0 + org.sample + test + ${revision} + jar + test + + + org.springframework.boot + spring-boot-starter-parent + 3.5.4 + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + + + + + + """ + ) + ) + ); + } } From 79daf716a50b5cfa493c95961e83a1e7d756213c Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 10:36:31 +0200 Subject: [PATCH 07/13] Refactor AppendChildTagToParentVisitor to take prebuilt matcher and tag --- ...MockitoJavaAgentToMavenSurefirePlugin.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index 8c393695f4..2ec27f06c0 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -16,6 +16,7 @@ package org.openrewrite.java.migrate; import lombok.Getter; +import lombok.RequiredArgsConstructor; import org.intellij.lang.annotations.Language; import org.openrewrite.ExecutionContext; import org.openrewrite.Preconditions; @@ -95,7 +96,9 @@ private void maybeAddMavenDependencyPluginWithPropertiesGoal() { } else if (mavenDependencyPlugin.get().getExecutions().stream().noneMatch(execution -> execution.getGoals() != null)) { doAfterVisit(new AddOrUpdateChildTag(MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER, "" + MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL + "", false).getVisitor()); } else if (mavenDependencyPlugin.get().getExecutions().stream().noneMatch(execution -> execution.getGoals() != null && execution.getGoals().contains("properties"))) { - doAfterVisit(new AppendChildTagToParentVisitor(MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER + "/goals", MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL)); + doAfterVisit(new AppendChildTagToParentVisitor( + new XPathMatcher(MAVEN_DEPENDENCY_PLUGIN_EXECUTION_MATCHER + "/goals"), + Xml.Tag.build(MAVEN_DEPENDENCY_PLUGIN_PROPERTIES_GOAL))); } } @@ -141,6 +144,11 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { //noinspection unchecked List configContents = (List) config.getContent(); List argLineTagChildren = config.getChildren("argLine"); + if (argLineTagChildren.isEmpty()) { + Xml.Tag updatedConfig = config.withContent(ListUtils.concatAll(configContents, + buildConfigurationTag(argLineJavaAgentParam, false).getContent())); + return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); + } if (argLineTagChildren.size() == 1) { Xml.Tag argLineTag = argLineTagChildren.get(0); String existingArgLineValue = argLineTag.getValue().orElse("@{argLine}"); @@ -151,24 +159,17 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { Xml.Tag updatedConfig = config.withContent(ListUtils.concatAll(nonArgLineTags, mergedConfiguration.getContent())); return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); } - } else if (argLineTagChildren.isEmpty()) { - Xml.Tag updatedConfig = config.withContent(ListUtils.concatAll(configContents, - buildConfigurationTag(argLineJavaAgentParam, false).getContent())); - return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); } return t; } }); } - public static class AppendChildTagToParentVisitor extends XmlIsoVisitor { + + @RequiredArgsConstructor + private static class AppendChildTagToParentVisitor extends XmlIsoVisitor { private final XPathMatcher parentXPathMatcher; private final Xml.Tag newChildTag; - public AppendChildTagToParentVisitor(String parentXPath, @Language("xml") String newChildTag) { - this.parentXPathMatcher = new XPathMatcher(parentXPath); - this.newChildTag = Xml.Tag.build(newChildTag); - } - @Override public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { if (parentXPathMatcher.matches(getCursor()) && !tag.print(getCursor()).contains(newChildTag.print(getCursor()))) { From b0e8449e5ed58a60461e41be560095aa9e1c7854 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 10:38:44 +0200 Subject: [PATCH 08/13] Use child tag matching instead of print in AppendChildTagToParentVisitor --- .../java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index 2ec27f06c0..db44fb6bea 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -172,7 +172,8 @@ private static class AppendChildTagToParentVisitor extends XmlIsoVisitor child.getValue().equals(newChildTag.getValue()))) { return autoFormat(AddToTagVisitor.addToTag(tag, newChildTag, getCursor()), ctx); } return super.visitTag(tag, ctx); From 75981998d781427829762e7f5aa31d48eaae0d81 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 11:43:03 +0200 Subject: [PATCH 09/13] Strip xml declaration and project attributes from test poms --- ...itoJavaAgentToMavenSurefirePluginTest.java | 186 ++++++------------ 1 file changed, 62 insertions(+), 124 deletions(-) diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java index ce05f10817..8711391089 100644 --- a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -35,10 +35,8 @@ void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -73,10 +71,8 @@ void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -136,10 +132,8 @@ void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderM mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -184,10 +178,8 @@ void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderM """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -249,10 +241,8 @@ void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -302,10 +292,8 @@ void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -368,10 +356,8 @@ void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -416,10 +402,8 @@ void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -478,10 +462,8 @@ void addsMockitoAgentArgPreservingExistingArgLineArguments() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -529,10 +511,8 @@ void addsMockitoAgentArgPreservingExistingArgLineArguments() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -594,10 +574,8 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test 1.0 @@ -620,10 +598,8 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { ), pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test-module1 ${revision} @@ -658,10 +634,8 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test-module1 ${revision} @@ -721,10 +695,8 @@ void addsMavenSurefireAndDependencyPluginsWhenAbsent() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -747,10 +719,8 @@ void addsMavenSurefireAndDependencyPluginsWhenAbsent() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -809,10 +779,8 @@ void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -858,10 +826,8 @@ void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -923,10 +889,8 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -975,10 +939,8 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1041,10 +1003,8 @@ void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1083,10 +1043,8 @@ void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1149,10 +1107,8 @@ void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1214,10 +1170,8 @@ void makesNoChangeWhenMockitoAgentFlagAlreadyExistsUsingSingleLineArgline() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1279,10 +1233,8 @@ void makesNoChangeWhenMockitoCoreDependencyIsNotOnClasspath() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1325,10 +1277,8 @@ void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test 1.0 @@ -1368,10 +1318,8 @@ void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() ), pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test-module1 ${revision} @@ -1417,10 +1365,8 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test 1.0 @@ -1469,10 +1415,8 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur ), pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test-module1 ${revision} @@ -1503,10 +1447,8 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur """, """ - - - - 4.0.0 + + 4.0.0 org.sample test-module1 ${revision} @@ -1566,10 +1508,8 @@ void augmentsSurefirePluginDeclaredInPluginManagement() { mavenProject("test-project", pomXml( """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} @@ -1615,10 +1555,8 @@ void augmentsSurefirePluginDeclaredInPluginManagement() { """, """ - - - - 4.0.0 + + 4.0.0 org.sample test ${revision} From 857a4de4475143b9da918b4085d1ad36c8ab78e7 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 11:45:02 +0200 Subject: [PATCH 10/13] Minimize test poms by removing packaging and name elements --- ...itoJavaAgentToMavenSurefirePluginTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java index 8711391089..fc68360ddf 100644 --- a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -40,8 +40,6 @@ void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { org.sample test ${revision} - jar - test org.springframework.boot @@ -76,8 +74,6 @@ void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { org.sample test ${revision} - jar - test org.springframework.boot @@ -137,8 +133,6 @@ void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderM org.sample test ${revision} - jar - test org.springframework.boot @@ -183,8 +177,6 @@ void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderM org.sample test ${revision} - jar - test org.springframework.boot @@ -246,8 +238,6 @@ void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { org.sample test ${revision} - jar - test org.springframework.boot @@ -297,8 +287,6 @@ void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { org.sample test ${revision} - jar - test org.springframework.boot @@ -361,8 +349,6 @@ void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { org.sample test ${revision} - jar - test org.springframework.boot @@ -407,8 +393,6 @@ void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { org.sample test ${revision} - jar - test org.springframework.boot @@ -467,8 +451,6 @@ void addsMockitoAgentArgPreservingExistingArgLineArguments() { org.sample test ${revision} - jar - test org.springframework.boot @@ -516,8 +498,6 @@ void addsMockitoAgentArgPreservingExistingArgLineArguments() { org.sample test ${revision} - jar - test org.springframework.boot @@ -579,8 +559,6 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { org.sample test 1.0 - jar - test test-module1 @@ -603,8 +581,6 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { org.sample test-module1 ${revision} - jar - test-module1 org.sample @@ -639,8 +615,6 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { org.sample test-module1 ${revision} - jar - test-module1 org.sample @@ -700,8 +674,6 @@ void addsMavenSurefireAndDependencyPluginsWhenAbsent() { org.sample test ${revision} - jar - test org.springframework.boot @@ -724,8 +696,6 @@ void addsMavenSurefireAndDependencyPluginsWhenAbsent() { org.sample test ${revision} - jar - test org.springframework.boot @@ -784,8 +754,6 @@ void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() org.sample test ${revision} - jar - test org.springframework.boot @@ -831,8 +799,6 @@ void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() org.sample test ${revision} - jar - test org.springframework.boot @@ -894,8 +860,6 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { org.sample test ${revision} - jar - test org.springframework.boot @@ -944,8 +908,6 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1008,8 +970,6 @@ void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1048,8 +1008,6 @@ void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1112,8 +1070,6 @@ void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1175,8 +1131,6 @@ void makesNoChangeWhenMockitoAgentFlagAlreadyExistsUsingSingleLineArgline() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1238,8 +1192,6 @@ void makesNoChangeWhenMockitoCoreDependencyIsNotOnClasspath() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1282,8 +1234,6 @@ void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() org.sample test 1.0 - jar - test test-module1 @@ -1323,8 +1273,6 @@ void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() org.sample test-module1 ${revision} - jar - test-module1 org.sample @@ -1370,8 +1318,6 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur org.sample test 1.0 - jar - test test-module1 @@ -1420,8 +1366,6 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur org.sample test-module1 ${revision} - jar - test-module1 org.sample @@ -1452,8 +1396,6 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur org.sample test-module1 ${revision} - jar - test-module1 org.sample @@ -1513,8 +1455,6 @@ void augmentsSurefirePluginDeclaredInPluginManagement() { org.sample test ${revision} - jar - test org.springframework.boot @@ -1560,8 +1500,6 @@ void augmentsSurefirePluginDeclaredInPluginManagement() { org.sample test ${revision} - jar - test org.springframework.boot From c101d0d509336f7f213fff8c6162b991ebee9372 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 11:51:01 +0200 Subject: [PATCH 11/13] End test text blocks on their own line for consistency --- ...itoJavaAgentToMavenSurefirePluginTest.java | 90 ++++++++++++------- 1 file changed, 60 insertions(+), 30 deletions(-) diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java index fc68360ddf..b1c1a636cd 100644 --- a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -67,7 +67,8 @@ void addsMockitoAgentArgAndPropertiesGoalToMavenPlugins() { - """, + + """, """ 4.0.0 @@ -170,7 +171,8 @@ void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderM - """, + + """, """ 4.0.0 @@ -221,7 +223,8 @@ void addsByteBuddyAgentArgWithSurefirePluginAndNoExistingConfigurationWithOlderM - """ + + """ ) ) ); @@ -280,7 +283,8 @@ void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { - """, + + """, """ 4.0.0 @@ -332,7 +336,8 @@ void addsMockitoAgentArgToExistingConfigurationWithNoArgLineTag() { - """ + + """ ) ) ); @@ -386,7 +391,8 @@ void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { - """, + + """, """ 4.0.0 @@ -434,7 +440,8 @@ void addsMockitoAgentArgToExistingArgLineTagWithNoValue() { - """ + + """ ) ) ); @@ -491,7 +498,8 @@ void addsMockitoAgentArgPreservingExistingArgLineArguments() { - """, + + """, """ 4.0.0 @@ -542,7 +550,8 @@ void addsMockitoAgentArgPreservingExistingArgLineArguments() { - """ + + """ ) ) ); @@ -571,7 +580,8 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { - """, + + """, spec -> spec.path("pom.xml") ), pomXml( @@ -608,7 +618,8 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { - """, + + """, """ 4.0.0 @@ -656,7 +667,8 @@ void onlyAddsConfigurationToPomWithMockitoInMultiModuleProject() { - """, + + """, spec -> spec.path("test-module1/pom.xml") ) ) @@ -689,7 +701,8 @@ void addsMavenSurefireAndDependencyPluginsWhenAbsent() { test - """, + + """, """ 4.0.0 @@ -737,7 +750,8 @@ void addsMavenSurefireAndDependencyPluginsWhenAbsent() { - """ + + """ ) ) ); @@ -792,7 +806,8 @@ void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() - """, + + """, """ 4.0.0 @@ -843,7 +858,8 @@ void addsGoalsTagWithPropertiesGoalToExistingMavenDependencyPluginWhenMissing() - """ + + """ ) ) ); @@ -901,7 +917,8 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { - """, + + """, """ 4.0.0 @@ -953,7 +970,8 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { - """ + + """ ) ) ); @@ -1001,7 +1019,8 @@ void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { - """, + + """, """ 4.0.0 @@ -1053,7 +1072,8 @@ void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { - """ + + """ ) ) ); @@ -1114,7 +1134,8 @@ void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { - """ + + """ ) ) ); @@ -1175,7 +1196,8 @@ void makesNoChangeWhenMockitoAgentFlagAlreadyExistsUsingSingleLineArgline() { - """ + + """ ) ) ); @@ -1217,7 +1239,8 @@ void makesNoChangeWhenMockitoCoreDependencyIsNotOnClasspath() { - """ + + """ ) ) ); @@ -1263,7 +1286,8 @@ void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() - """, + + """, spec -> spec.path("pom.xml") ), pomXml( @@ -1300,7 +1324,8 @@ void makesNoChangesWhenParentPomManagesSurefirePluginAndHasAgentConfiguration() - """, + + """, spec -> spec.path("test-module1/pom.xml") ) ) @@ -1356,7 +1381,8 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur - """, + + """, spec -> spec.path("pom.xml") ), pomXml( @@ -1389,7 +1415,8 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur - """, + + """, """ 4.0.0 @@ -1437,7 +1464,8 @@ void updatesIndividualPomsWhenParentPomManagesSurefirePluginWithoutAgentConfigur - """, + + """, spec -> spec.path("test-module1/pom.xml") ) ) @@ -1493,7 +1521,8 @@ void augmentsSurefirePluginDeclaredInPluginManagement() { - """, + + """, """ 4.0.0 @@ -1545,7 +1574,8 @@ void augmentsSurefirePluginDeclaredInPluginManagement() { - """ + + """ ) ) ); From 8961fa88df706f97a143c46d86717e9587809ee3 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 11:54:33 +0200 Subject: [PATCH 12/13] Document why surefire config is left untouched with multiple argLine tags --- .../migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index db44fb6bea..e42726a4a6 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -160,6 +160,11 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); } } + // Any remaining case needs no surefire change: either the single argLine already + // contains the agent, or there are multiple tags. Multiple tags are an + // ambiguous configuration, since surefire's argLine is single-valued and only the + // first tag is honored; appending another would be silently ignored, so we leave + // the configuration untouched rather than guess which argLine to augment. return t; } }); From 18ed2c74823f3627364e1732f53461138bba3267 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 10 Jun 2026 11:57:38 +0200 Subject: [PATCH 13/13] Remove test for invalid multiple-argLine configuration --- ...MockitoJavaAgentToMavenSurefirePlugin.java | 8 +- ...itoJavaAgentToMavenSurefirePluginTest.java | 102 ------------------ 2 files changed, 3 insertions(+), 107 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index e42726a4a6..824047375c 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -160,11 +160,9 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { return autoFormat(t.withContent(ListUtils.map(pluginContents, c -> c == config ? updatedConfig : c)), ctx); } } - // Any remaining case needs no surefire change: either the single argLine already - // contains the agent, or there are multiple tags. Multiple tags are an - // ambiguous configuration, since surefire's argLine is single-valued and only the - // first tag is honored; appending another would be silently ignored, so we leave - // the configuration untouched rather than guess which argLine to augment. + // No surefire change needed: the single argLine already contains the agent, or + // there are multiple tags (an invalid configuration, since surefire's + // argLine is single-valued) that we leave untouched. return t; } }); diff --git a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java index b1c1a636cd..26004a91cc 100644 --- a/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java +++ b/src/test/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePluginTest.java @@ -977,108 +977,6 @@ void addsPropertiesGoalToExistingGoalsSectionInMavenDependencyPlugin() { ); } - @Test - void addsArgLineAndPluginsButMakesNoAgentChangesIfMultipleArgLineTagsExist() { - rewriteRun( - mavenProject("test-project", - pomXml( - """ - - 4.0.0 - org.sample - test - ${revision} - - - org.springframework.boot - spring-boot-starter-parent - 3.5.4 - - - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - foobar - - -Duser.language=en - -Xmx256m - -XX:MaxPermSize=256m - - - - - - """, - """ - - 4.0.0 - org.sample - test - ${revision} - - - org.springframework.boot - spring-boot-starter-parent - 3.5.4 - - - - - - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - foobar - - -Duser.language=en - -Xmx256m - -XX:MaxPermSize=256m - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - properties - - - - - - - - """ - ) - ) - ); - } - @Test void makesNoChangeWhenMockitoAgentFlagAlreadyExists() { rewriteRun(