This is an automated email from the ASF dual-hosted git repository. veithen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
The following commit(s) were added to refs/heads/master by this push: new 29c5b77d99 Support reproducible builds in the AAR/MAR plugins 29c5b77d99 is described below commit 29c5b77d998761f17358c89d6da0fee98e8aa6d8 Author: Andreas Veithen <andreas.veit...@gmail.com> AuthorDate: Sun Jul 17 19:36:05 2022 +0000 Support reproducible builds in the AAR/MAR plugins --- .../src/main/java/org/apache/axis2/maven2/aar/AarMojo.java | 7 +++++++ .../src/main/java/org/apache/axis2/maven2/mar/MarMojo.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarMojo.java b/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarMojo.java index 54ff343c58..ea216a21be 100644 --- a/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarMojo.java +++ b/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarMojo.java @@ -74,6 +74,12 @@ public class AarMojo extends AbstractAarMojo { @Parameter private MavenArchiveConfiguration archive = new MavenArchiveConfiguration(); + /** + * Timestamp for reproducible output archive entries. + */ + @Parameter(defaultValue = "${project.build.outputTimestamp}") + private String outputTimestamp; + /** * Classifier to add to the artifact generated. If given, the artifact will be an attachment * instead. @@ -130,6 +136,7 @@ public class AarMojo extends AbstractAarMojo { MavenArchiver archiver = new MavenArchiver(); archiver.setArchiver(jarArchiver); archiver.setOutputFile(aarFile); + archiver.configureReproducibleBuild(outputTimestamp); jarArchiver.addDirectory(aarDirectory); // create archive diff --git a/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/MarMojo.java b/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/MarMojo.java index b207066edf..05e707321b 100644 --- a/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/MarMojo.java +++ b/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/MarMojo.java @@ -75,6 +75,12 @@ public class MarMojo extends AbstractMarMojo @Parameter private MavenArchiveConfiguration archive = new MavenArchiveConfiguration(); + /** + * Timestamp for reproducible output archive entries. + */ + @Parameter(defaultValue = "${project.build.outputTimestamp}") + private String outputTimestamp; + /** * Classifier to add to the artifact generated. If given, the artifact will be an attachment instead. */ @@ -134,6 +140,7 @@ public class MarMojo extends AbstractMarMojo MavenArchiver archiver = new MavenArchiver(); archiver.setArchiver( jarArchiver ); archiver.setOutputFile( marFile ); + archiver.configureReproducibleBuild( outputTimestamp ); jarArchiver.addDirectory( marDirectory ); // create archive