You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/09/21 15:58:12 UTC

[maven-source-plugin] branch MSOURCES-120 updated: use source-date-epoch property as default value

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

hboutemy pushed a commit to branch MSOURCES-120
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git


The following commit(s) were added to refs/heads/MSOURCES-120 by this push:
     new 71848d3  use source-date-epoch property as default value
71848d3 is described below

commit 71848d320bc5d6415e0d19e118f096a66af3f71e
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Sep 21 17:58:08 2019 +0200

    use source-date-epoch property as default value
---
 src/it/reproducible/pom.xml                                           | 4 +---
 .../java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java   | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/it/reproducible/pom.xml b/src/it/reproducible/pom.xml
index 13a6af9..572e292 100644
--- a/src/it/reproducible/pom.xml
+++ b/src/it/reproducible/pom.xml
@@ -31,6 +31,7 @@
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <source-date-epoch>1566419331</source-date-epoch>
   </properties>
 
   <build>
@@ -39,9 +40,6 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
         <version>@project.version@</version>
-        <configuration>
-          <source-date-epoch>1566419331</source-date-epoch>
-        </configuration>
       </plugin>
       <plugin>
         <artifactId>maven-deploy-plugin</artifactId>
diff --git a/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java b/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
index f15e43b..94ca4fb 100644
--- a/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
@@ -203,7 +203,7 @@ public abstract class AbstractSourceJarMojo
      *
      * @since 3.1.1
      */
-    @Parameter( name = "source-date-epoch" )
+    @Parameter( name = "source-date-epoch", defaultValue = "${source-date-epoch}" )
     private int sourceDateEpoch;
 
     // ----------------------------------------------------------------------