Skip to main content

Parent POM upgrade

io.moderne.devcenter.ParentPomUpgrade

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

Recipe source

GitHub, Issue Tracker, Maven Central

This recipe is available under the Moderne Source Available License.

Options

TypeNameDescriptionExample
StringcardNameThe display name of the DevCenter cardUpgrade internal Parent POM
StringgroupIdPatternGroup identifier used to match POM parents.org.springframework.boot
StringartifactIdPatternArtifact identifier used to match POM parents.spring-boot-parent
StringversionThe target version of the upgrade. Specify the version out to the desired patch version.3.4.5
StringupgradeRecipeOptional. The recipe to use to upgrade.com.acme.UpgradeInternalParentPom

Usage

This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly (unless you are running them via the Moderne CLI). To activate this recipe you must create a new recipe which fills in the required parameters. In your rewrite.yml create a new recipe with a unique name. For example: com.yourorg.ParentPomUpgradeExample. Here's how you can define and customize such a recipe within your rewrite.yml:

rewrite.yml
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.ParentPomUpgradeExample
displayName: Parent POM upgrade example
recipeList:
- io.moderne.devcenter.ParentPomUpgrade:
cardName: Upgrade internal Parent POM
groupIdPattern: org.springframework.boot
artifactIdPattern: spring-boot-parent
version: 3.4.5
upgradeRecipe: com.acme.UpgradeInternalParentPom

Now that com.yourorg.ParentPomUpgradeExample has been defined, activate it and take a dependency on io.moderne.recipe:rewrite-devcenter:1.4.2 in your build file:

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

rewrite {
activeRecipe("com.yourorg.ParentPomUpgradeExample")
setExportDatatables(true)
}

repositories {
mavenCentral()
}

dependencies {
rewrite("io.moderne.recipe:rewrite-devcenter:1.4.2")
}
  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

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.

Contributors

Bryce Tompkins, Jonathan Schnéider, Tim te Beek