Upgrade to Maven model version 4.1.0

Apache 2.0

Upgrades Maven POMs from model version 4.0.0 to 4.1.0, enabling new Maven 4 features like <subprojects>, bom packaging, and automatic version inference. This recipe updates the <modelVersion> element, xmlns namespace, and xsi:schemaLocation from 4.0.0 to 4.1.0.

org.openrewrite.maven.UpgradeToModelVersion410
mod run . --recipe=org.openrewrite.maven.UpgradeToModelVersion410

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

Recipe list

It runs these recipes, in this order.

  1. Change XML tag value
  2. Change XML attribute
  3. Change XML attribute