Apache Maven best practices

Apache 2.0

Applies best practices to Maven POMs.

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

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. Add explicit dependency versions
  2. Add explicit groupId to Maven plugins
  3. Add explicit plugin versions
  4. Dependencies should not have system scope
  5. Drop prefixless expressions in POM
  6. Order POM elements
  7. Remove duplicate Maven dependencies
  8. Remove duplicate plugin declarations
  9. Remove redundant explicit dependency and plugin versions
  10. Remove redundant properties
  11. Dependency management dependencies should have a version
  12. Modernize obsolete Maven poms
  13. Migrate to maven-dependency-plugin goal resolve-sources
  14. Update SCM with Git origin