reproducablebuild-maven-plugin Maven Mojo

Apache Maven Mojo for setting or clearing the new project.build.outputTimestamp property

License

License

Apache License, Version 2.0
Categories

Categories

Maven Build Tools
GroupId

GroupId

com.theoryinpractise
ArtifactId

ArtifactId

reproducible-maven-plugin
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

reproducablebuild-maven-plugin Maven Mojo
Apache Maven Mojo for setting or clearing the new project.build.outputTimestamp property
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/talios/reproducible-maven-plugin

Download reproducible-maven-plugin

How to add to project

<plugin>
    <groupId>com.theoryinpractise</groupId>
    <artifactId>reproducible-maven-plugin</artifactId>
    <version>1.0.1</version>
</plugin>

Dependencies

compile (5)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0
org.jdom : jdom2 jar 2.0.6
org.apache.maven : maven-plugin-api jar 3.6.2
org.apache.maven : maven-core jar 3.6.2
com.google.errorprone : error_prone_annotations jar 2.3.3

Project Modules

There are no modules declared in this project.

Reproducible Plugin for Apache Maven (obsolete)

A simple Apache Maven plugin to provide some tests for the new reproducible build features of Apache Maven and its related plugins.

This plugin is designed to be run as part of both the preparationGoals and completionGoals element of the Maven Release Plugin.

When applied, any pom in the current maven session will be rewritten to include the new project.build.outputTimestamp property that is looked for by supported plugins:

  <properties>
    <project.build.outputTimestamp>2019-11-09T05:12:36Z</project.build.outputTimestamp>
  </properties>

Notice that the value of the project.build.outputTimestamp property injected is "now", then NOT reproducible: DO NOT EXPECT THIS PLUGIN TO MAKE YOUR BUILD REPRODUCIBLE. This plugin was only useful in 2019'Q3 to make early tests.

Nowadays:

  1. add explicitely the project.build.outputTimestamp property to your reactor parent POM with your value of choice: the value is reproducible as it is simply written in the pom.xml,
  2. let maven-release-plugin 3.0.0-M1 (see MRELEASE-1029) update the value of the timestamp during the release while it's doing other pom.xml updates, to get a project.build.outputTimestamp value that meet release expectations while remaining reproducible (simply written in pom.xml)

Configuration

    <plugin>
      <groupId>com.theoryinpractise</groupId>
      <artifactId>reproducible-maven-plugin</artifactId>
      <version>1.0.1</version>
    </plugin>

    <plugin>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.5.3</version>
      <configuration>
        <preparationGoals>clean com.theoryinpractise:reproducible-maven-plugin:apply install
  </preparationGoals>
        <completionGoals>com.theoryinpractise:reproducible-maven-plugin:clear</completionGoals>
        <goals>deploy</goals>
      </configuration>
    </plugin>

Changes

  • 1.0.1

    • Initial Release
  • 2020Q1: mark this test plugin as obsolete, as it does not make build reproducible and is replaced by maven-release-plugin 3.0.0-M1 (see MRELEASE-1029)

Versions

Version
1.0.1