Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-849

archiver sorts META-INF/MANIFEST.MF before META-INF/ in ZIP header

    XMLWordPrintableJSON

Details

    Description

      I found a small bug in maven archiver: META-INF/ is added to the ZIP after
      META-INF/MANIFEST.MF, while gradle always puts the dir before any files
      in that dir (which I think makes sense). Here is a diff of the same library built with maven and gradle to illustrate this:

      $ diffoscope target/jtorctl-0.3.1-SNAPSHOT.jar build/libs/jtorctl-0.4-3-g27c6980.jar
      --- target/jtorctl-0.3.1-SNAPSHOT.jar
      +++ build/libs/jtorctl-0.4-3-g27c6980.jar
      ├── zipinfo /dev/stdin
      │ @@ -1,22 +1,22 @@
      │ -Zip file size: 26915 bytes, number of entries: 20
      │ +Zip file size: 26925 bytes, number of entries: 20
      │ +drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/
      │  -rw-r--r--  2.0 unx       25 b- defN 80-Feb-01 00:00 META-INF/MANIFEST.MF
      │ -drwxr-xr-x  2.0 unx        0 b- stor 80-Feb-01 00:00 META-INF/
      │ -drwxr-xr-x  2.0 unx        0 b- stor 80-Feb-01 00:00 net/
      │ -drwxr-xr-x  2.0 unx        0 b- stor 80-Feb-01 00:00 net/freehaven/
      │ -drwxr-xr-x  2.0 unx        0 b- stor 80-Feb-01 00:00 net/freehaven/tor/
      │ -drwxr-xr-x  2.0 unx        0 b- stor 80-Feb-01 00:00 net/freehaven/tor/control/
      │ +drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 net/
      │ +drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 net/freehaven/
      │ +drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 net/freehaven/tor/
      │ +drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/
      │  -rw-r--r--  2.0 unx     2933 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/Bytes.class
      │  -rw-r--r--  2.0 unx      650 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/ConfigEntry.class
      │  -rw-r--r--  2.0 unx      485 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/EventHandler.class
      │  -rw-r--r--  2.0 unx     3621 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/EventListener.class
      │  -rw-r--r--  2.0 unx     1448 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/NullEventHandler.class
      │  -rw-r--r--  2.0 unx     2507 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/PasswordDigest.class
      │  -rw-r--r--  2.0 unx      197 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/RawEventListener.class
      │  -rw-r--r--  2.0 unx     9741 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlCommands.class
      │  -rw-r--r--  2.0 unx      962 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlConnection$ControlParseThread.class
      │  -rw-r--r--  2.0 unx      662 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlConnection$ReplyLine.class
      │  -rw-r--r--  2.0 unx     1403 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlConnection$Waiter.class
      │  -rw-r--r--  2.0 unx    27243 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlConnection.class
      │  -rw-r--r--  2.0 unx     1299 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlError.class
      │  -rw-r--r--  2.0 unx      461 b- defN 80-Feb-01 00:00 net/freehaven/tor/control/TorControlSyntaxError.class
      │ -20 files, 53637 bytes uncompressed, 23781 bytes compressed:  55.7%
      │ +20 files, 53637 bytes uncompressed, 23791 bytes compressed:  55.6%
      ├── zipnote {}
      │ @@ -1,11 +1,11 @@
      │ -Filename: META-INF/MANIFEST.MF
      │ +Filename: META-INF/
      │  Comment:
      │
      │ -Filename: META-INF/
      │ +Filename: META-INF/MANIFEST.MF
      │  Comment:
      │
      │  Filename: net/
      │  Comment:
      │
      │  Filename: net/freehaven/
      │  Comment:
      ├── filetype from file(1)
      │ @@ -1 +1 @@
      │ -Zip archive data, at least v2.0 to extract
      │ +Zip archive data, at least v1.0 to extract
      

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              eighthave Hans-Christoph Steiner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: