Skip to main content

Plan a Java version migration

org.openrewrite.java.migrate.search.PlanJavaMigration

Study the set of Java versions and associated tools in use across many repositories.

Recipe source

GitHub, Issue Tracker, Maven Central

This recipe is available under the Moderne Source Available License.

Usage

This recipe has no required configuration options. It can be activated by adding a dependency on org.openrewrite.recipe:rewrite-migrate-java in your build file or by running a shell command (in which case no build changes are needed):

  1. Add the following to your build.gradle file:
build.gradle
plugins {
id("org.openrewrite.rewrite") version("7.5.0")
}

rewrite {
activeRecipe("org.openrewrite.java.migrate.search.PlanJavaMigration")
setExportDatatables(true)
}

repositories {
mavenCentral()
}

dependencies {
rewrite("org.openrewrite.recipe:rewrite-migrate-java:3.8.0")
}
  1. Run gradle rewriteRun to run the recipe.

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

Java version migration plan

org.openrewrite.java.migrate.table.JavaVersionMigrationPlan

A per-repository view of the current state of Java versions and associated build tools

Column NameDescription
Has JavaWhether this is a Java repository at all.
Source compatibilityThe source compatibility of the source file.
Major version source compatibilityThe major version.
Target compatibilityThe target compatibility or --release version of the source file.
Gradle versionThe version of Gradle in use, if any.
Has Gradle buildWhether a build.gradle file exists in the repository.
Maven versionThe version of Maven in use, if any.
Has Maven pomWhether a pom.xml file exists in the repository.