[maven-plugin-tools] 01/02: Removed the date from the plugin descriptor to make the build reproducible

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed May 6 18:01:03 UTC 2015


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

ebourg-guest pushed a commit to annotated tag debian/3.3-2
in repository maven-plugin-tools.

commit f1540c9d96b1e6b8c7dd5e6b71523f92f513a5c6
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Wed May 6 19:20:10 2015 +0200

    Removed the date from the plugin descriptor to make the build reproducible
---
 debian/changelog                                   |  7 ++++++
 .../04-reproducible-plugin-descriptor.patch        | 27 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 35 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6dd4a0d..0593f66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+maven-plugin-tools (3.3-2) UNRELEASED; urgency=medium
+
+  * Removed the date from the plugin descriptor to make the build reproducible
+    (Closes: #784265)
+
+ -- Reiner Herrmann <reiner at reiner-h.de>  Wed, 06 May 2015 19:18:36 +0200
+
 maven-plugin-tools (3.3-1) experimental; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/04-reproducible-plugin-descriptor.patch b/debian/patches/04-reproducible-plugin-descriptor.patch
new file mode 100644
index 0000000..c675411
--- /dev/null
+++ b/debian/patches/04-reproducible-plugin-descriptor.patch
@@ -0,0 +1,27 @@
+Author: Reiner Herrmann <reiner at reiner-h.de>
+Description: Don't include the date in xml files
+ Embedding the current date will result in unreproducible files.
+
+Index: maven-plugin-tools-3.3/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
+===================================================================
+--- maven-plugin-tools-3.3.orig/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
++++ maven-plugin-tools-3.3/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
+@@ -24,8 +24,6 @@ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.io.OutputStreamWriter;
+ import java.io.Writer;
+-import java.text.SimpleDateFormat;
+-import java.util.Date;
+ import java.util.LinkedHashMap;
+ import java.util.LinkedHashSet;
+ import java.util.List;
+@@ -132,8 +130,7 @@ public class PluginDescriptorGenerator
+ 
+             XMLWriter w = new PrettyPrintXMLWriter( writer, encoding, null );
+ 
+-            w.writeMarkup( "\n<!-- Generated by maven-plugin-tools " + getVersion() + " on " + new SimpleDateFormat(
+-                "yyyy-MM-dd" ).format( new Date() ) + " -->\n\n" );
++            w.writeMarkup( "\n<!-- Generated by maven-plugin-tools " + getVersion() + " -->\n\n" );
+ 
+             w.startElement( "plugin" );
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 2d00408..eac1ecc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 01-maven2-api-compatibility.patch
 02-plexus-archiver1-compatibility.patch
 03-plexus-utils2-compatibility.patch
+04-reproducible-plugin-descriptor.patch

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



More information about the pkg-java-commits mailing list