Uploaded image for project: 'Maven Remote Resources Plugin (Moved to GitHub Issues)'
  1. Maven Remote Resources Plugin (Moved to GitHub Issues)
  2. MRRESOURCES-150

Ensure reproducible order in bundle goal output META-INF/maven/remote-resources.xml

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • None

    Description

      see https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/ratis/ratis-3.1.2.diffoscope for https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/ratis/README.md

      ├── META-INF/maven/remote-resources.xml
      │ ├── META-INF/maven/remote-resources.xml
      │ │┄ Ordering differences only
      │ │ @@ -1,8 +1,8 @@
      │ │  <?xml version="1.0" encoding="utf-8"?>
      │ │  <remoteResourcesBundle xmlns="http://maven.apache.org/remote-resources/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/remote-resources/1.1.0 https://maven.apache.org/xsd/remote-resources-1.1.0.xsd">
      │ │    <remoteResources>
      │ │ -    <remoteResource>META-INF/LICENSE.vm</remoteResource>
      │ │      <remoteResource>META-INF/NOTICE.vm</remoteResource>
      │ │ +    <remoteResource>META-INF/LICENSE.vm</remoteResource>
      │ │    </remoteResources>
      │ │    <sourceEncoding>UTF-8</sourceEncoding>
      │ │  </remoteResourcesBundle>
      

      remote-resources:bundle creates output that may not be reproducible.

              DirectoryScanner scanner = new DirectoryScanner();
      
              scanner.setBasedir(resourcesDirectory);
              if (includes != null && includes.length != 0) {
                  scanner.setIncludes(includes);
              } else {
                  scanner.setIncludes(DEFAULT_INCLUDES);
              }
      
              if (excludes != null && excludes.length != 0) {
                  scanner.setExcludes(excludes);
              }
      
              scanner.addDefaultExcludes();
              scanner.scan();
      

      DirectoryScanner uses java.io.File.list(), which does not guarantee order.

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: