Apache Maven reproducible builds

Apache 2.0

Configure a Maven project for reproducible builds: pin dependency and plugin versions, set project.build.outputTimestamp, set explicit UTF-8 source encoding, and upgrade core plugins to versions that honor the output timestamp.

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

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 plugin versions
  3. Upgrade Maven plugin version org.apache.maven.plugins:maven-*-plugin:latest.release
  4. Add Maven project property project.build.sourceEncoding=UTF-8
  5. Add Maven project property project.reporting.outputEncoding=UTF-8
  6. Add project.build.outputTimestamp for reproducible builds