[plexus-containers1.5] 11/14: Sort the components in the components.xml files generated by the metadata plugin

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Feb 12 17:47:59 GMT 2016


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

ebourg-guest pushed a commit to branch master
in repository plexus-containers1.5.

commit d52166036bdf404e10864473b1a44243c1bcb699
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Feb 12 14:21:34 2016 +0100

    Sort the components in the components.xml files generated by the metadata plugin
---
 debian/changelog                              |  3 +++
 debian/patches/03-reproducible-metadata.patch | 18 ++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 22 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8d5bd85..71ddf52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ plexus-containers1.5 (1.6-2) UNRELEASED; urgency=medium
 
   * Team upload.
   * Build with maven-debian-helper
+  * Sort the components in the components.xml files generated by the metadata
+    plugin. This should improve the reproducibility of the packages affected
+    by the random_order_in_plexus_comonents_xml issue.
   * Moved the artifact to distinct packages to optimize the dependencies
   * No longer build plexus-component-javadoc (never used)
   * Removed the unused -doc package
diff --git a/debian/patches/03-reproducible-metadata.patch b/debian/patches/03-reproducible-metadata.patch
new file mode 100644
index 0000000..483a88e
--- /dev/null
+++ b/debian/patches/03-reproducible-metadata.patch
@@ -0,0 +1,18 @@
+Description: Sort the components to make the metadata reproducible
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/DefaultMetadataGenerator.java
++++ b/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/DefaultMetadataGenerator.java
+@@ -82,6 +82,12 @@
+             }
+         }
+ 
++        Collections.sort(descriptors, new java.util.Comparator<ComponentDescriptor>() {
++            public int compare(ComponentDescriptor d1, ComponentDescriptor d2) {
++                return d1.getHumanReadableKey().compareTo(d2.getHumanReadableKey());
++            }
++        });
++
+         List<File> componentDescriptors = new ArrayList<File>();        
+         
+         //
diff --git a/debian/patches/series b/debian/patches/series
index 41d3eb3..ce7f954 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 02-qdox-compatibility.patch
+03-reproducible-metadata.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/plexus-containers1.5.git



More information about the pkg-java-commits mailing list