Upgrade Maven parent project version

Apache 2.0

Set the parent pom version number according to a version selector or to a specific version number. Dependency management and properties inherited from the old parent version that the new version no longer provides are retained, but only what the project uses: a managed version is copied in only for a dependency that this pom or one of its modules declares without a version, and a property only when the pom references it. Removes redundant dependency versions already managed by the new parent.

org.openrewrite.maven.UpgradeParentVersion

Required

The first part of a dependency coordinate 'org.springframework.boot:spring-boot-parent:VERSION'.

The second part of a dependency coordinate 'org.springframework.boot:spring-boot-parent:VERSION'.

An exact version number or node-style semver selector used to select the version number.

Optional

Allows version selection to be extended beyond the original Node Semver semantics. So for example,Setting 'version' to "25-29" can be paired with a metadata pattern of "-jre" to select Guava 29.0-jre

onlyExternalBoolean

Only upgrade <parent> if external to the project, i.e. it has an empty <relativePath>. Defaults to false.

mod run . --recipe=org.openrewrite.maven.UpgradeParentVersion \ -P groupId=org.springframework.boot \ -P artifactId=spring-boot-parent \ -P newVersion=29.X

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.