File: 03-reproducible-metadata.patch

package info (click to toggle)
plexus-containers1.5 1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,196 kB
  • ctags: 3,534
  • sloc: java: 20,611; xml: 2,116; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 764 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Sort the components to make the metadata reproducible
Author: Emmanuel Bourg <ebourg@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>();        
         
         //