Replace deprecated lifecycle phases

Apache 2.0

Maven 4 deprecated all pre-* and post-* lifecycle phases in favor of the before: and after: syntax. This recipe updates plugin phase declarations to use the new syntax, including pre-clean → before:clean, pre-site → before:site, pre-integration-test → before:integration-test, and their post-* equivalents.

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

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 tag value
  3. Change XML tag value
  4. Change XML tag value
  5. Change XML tag value
  6. Change XML tag value