You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/01/04 21:26:57 UTC

[maven-apache-parent] branch master updated: [MPOM-255] Enforce local property "project.build.outputTimestamp" for reproducible builds

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-apache-parent.git


The following commit(s) were added to refs/heads/master by this push:
     new 908aae1  [MPOM-255] Enforce local property "project.build.outputTimestamp" for reproducible builds
908aae1 is described below

commit 908aae1ded542409f5e09f72d334701b71430f10
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sun Jan 3 13:11:12 2021 +0100

    [MPOM-255] Enforce local property "project.build.outputTimestamp" for reproducible builds
    
    This closes #30
---
 pom.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c7bf800..d0ee211 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,7 +92,9 @@ under the License.
     <maven.compiler.target>1.7</maven.compiler.target>
     <surefire.version>2.22.2</surefire.version>
     <assembly.tarLongFileMode>posix</assembly.tarLongFileMode>
+    <!-- set this property for all derived projects:
     <project.build.outputTimestamp>2020-01-22T15:10:38Z</project.build.outputTimestamp>
+    -->
   </properties>
 
   <repositories>
@@ -321,7 +323,7 @@ under the License.
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
           <execution>
-            <id>enforce-maven-version</id>
+            <id>enforce-maven-version-and-timestamp-property</id>
             <goals>
               <goal>enforce</goal>
             </goals>
@@ -330,6 +332,10 @@ under the License.
                 <requireMavenVersion>
                   <version>3.1.1</version>
                 </requireMavenVersion>
+                <requireProperty>
+                  <property>project.build.outputTimestamp</property>
+                  <message>The property "project.build.outputTimestamp" must be set on the reactor's root pom.xml to make the build reproducible. Further information at "https://maven.apache.org/guides/mini/guide-reproducible-builds.html".</message>
+                </requireProperty>
               </rules>
             </configuration>
           </execution>