[maven-archiver] 01/02: Format the date in pom.properties with the UTC timezone

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon May 11 15:53:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository maven-archiver.

commit c3d413ed420dae94146a555a7d668d12dd1bd22a
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon May 11 16:12:44 2015 +0200

    Format the date in pom.properties with the UTC timezone
---
 debian/changelog                                                   | 7 +++++++
 .../02-use-changelog-date-as-pom.properties-timestamp.patch        | 7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 02204df..0b32af1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+maven-archiver (2.6-2) UNRELEASED; urgency=medium
+
+  * Format the date in pom.properties with the UTC timezone to make
+    the builds reproducible.
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Mon, 11 May 2015 16:10:11 +0200
+
 maven-archiver (2.6-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/02-use-changelog-date-as-pom.properties-timestamp.patch b/debian/patches/02-use-changelog-date-as-pom.properties-timestamp.patch
index 1ef8c18..d3f2cf0 100644
--- a/debian/patches/02-use-changelog-date-as-pom.properties-timestamp.patch
+++ b/debian/patches/02-use-changelog-date-as-pom.properties-timestamp.patch
@@ -24,10 +24,11 @@ Bug-Debian: https://bugs.debian.org/775010
  
 --- /dev/null
 +++ b/src/main/java/org/apache/maven/archiver/TimestampedProperties.java
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,48 @@
 +package org.apache.maven.archiver;
 +
 +import java.io.*;
++import java.text.*;
 +import java.util.*;
 +import java.util.regex.*;
 +
@@ -54,8 +55,10 @@ Bug-Debian: https://bugs.debian.org/775010
 +        super.store(buffer, comments);
 +
 +        // Replace the date on the second line of the file
++        SimpleDateFormat fmt = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
++        fmt.setTimeZone(TimeZone.getTimeZone("UTC"));
 +        String[] lines = buffer.toString().split(Pattern.quote(System.getProperty("line.separator")));
-+        lines[1] = "#" + date.toString();
++        lines[1] = "#" + fmt.format(date);
 +
 +        // write the file
 +        BufferedWriter writer = new BufferedWriter(out);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-archiver.git



More information about the pkg-java-commits mailing list