Hu Jincheng,
the information should be available here:
https://maven.apache.org/guides/mini/guide-reproducible-builds.html
However I would suggest to add another configuration to the build:
<!-- Make the release-plugin use the new reproducible build plugin
extension -->
<profile>
<id>apache-release</id>
<build>
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>reproducible-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>clean
com.theoryinpractise:reproducible-maven-plugin:apply install</preparationGoals>
<completionGoals>com.theoryinpractise:reproducible-maven-plugin:clear</completionGoals>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</build>
</profile>
With this configuration the project.build.outputTimestamp property is added to
the main pom as part of the release process and removed after that.
So in general the build would not produce a reproducible build for SNAPSHOT
versions, but reproducible builds for RELEASE versions and it wouldn't add
additional steps for the release manager.
Hope that's enough information for you folks. If not, just ask.
Chris
Am 09.01.20, 11:04 schrieb "jincheng sun" <[email protected]>:
+1 to upgrade the version.
BTW: add the link [1] which more detail about `Reproducible Builds` that
Chris mentioned.
Best,
Jincheng
[1] http://maven.apache.org/pom/asf/
Christofer Dutz <[email protected]> 于2020年1月9日周四 下午4:50写道:
> Hi all,
>
> the maven team just released version 22 of the apache parent.
> I would strongly suggest you update to this version. Not only because
> Apache in general likes projects to release using the latest apache
parent.
> The main reason I think this is great is that with this you should
> automatically be creating reproducible builds when releasing.
>
> Chris
>