Skip to main content

Library upgrade

io.moderne.devcenter.LibraryUpgrade

Determine the current state of a repository relative to a desired library upgrade.

Recipe source

GitHub: LibraryUpgrade.java, Issue Tracker, Maven Central

This recipe is available under the Moderne Source Available License.

Options

TypeNameDescriptionExample
StringcardNameThe display name of the DevCenter card.Move to Spring Boot 4.0
StringgroupIdPatternGroup glob pattern used to match dependencies.com.fasterxml.jackson.module
StringartifactIdPatternArtifact glob pattern used to match dependencies.jackson-module-*
StringversionThe target version of the upgrade. Specify the version out to the desired patch version.3.4.1
StringupgradeRecipeOptional. The recipe to use to upgrade.io.moderne.java.spring.boot3.UpgradeSpringBoot_3_5

Used by

This recipe is used as part of the following composite recipes:

Usage

This recipe has required configuration parameters and can only be run by users of Moderne. To run this recipe, you will need to provide the Moderne CLI run command with the required options. Or, if you'd like to create a declarative recipe, please see the below example of a rewrite.yml file:

rewrite.yml
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.LibraryUpgradeExample
displayName: Library upgrade example
recipeList:
- io.moderne.devcenter.LibraryUpgrade:
cardName: Move to Spring Boot 4.0
groupIdPattern: com.fasterxml.jackson.module
artifactIdPattern: jackson-module-*
version: 3.4.1
upgradeRecipe: io.moderne.java.spring.boot3.UpgradeSpringBoot_3_5

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe LibraryUpgrade --recipe-option "cardName=Move to Spring Boot 4.0" --recipe-option "groupIdPattern=com.fasterxml.jackson.module" --recipe-option "artifactIdPattern=jackson-module-*" --recipe-option "version=3.4.1" --recipe-option "upgradeRecipe=io.moderne.java.spring.boot3.UpgradeSpringBoot_3_5"

If the recipe is not available locally, then you can install it using:

mod config recipes jar install io.moderne.recipe:rewrite-devcenter:1.16.0

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

Upgrades and migrations

io.moderne.devcenter.table.UpgradesAndMigrations

Progress towards organizational objectives on library or language migrations and upgrades.

Column NameDescription
CardThe display name of the DevCenter card
OrdinalThe ordinal position of this value relative to other values.
ValueThe display value of the current state of this repository.
Minimum versionThe minimum matching version that is currently in use.