Uploaded image for project: 'Maven JAR Plugin'
  1. Maven JAR Plugin
  2. MJAR-241

Jar package does not have a size in ZipEntry

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.6, 3.0.2
    • Fix Version/s: 3.1.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 7
      Maven 3.3.9

      Description

      Since version 2.5, jars output by the maven-jar-plugin do not have a size that Java's standard ZipEntry class can read. Version 2.4, however, outputs a jar with sizes that works just fine.

      Testing included versions 2.4, 2.5, 2.6, and 3.0.2 - only version 2.4 outputs a jar with sizes according to ZipEntry. All configuration was kept constant; only the version was altered between each test.

      Sample code is below:

      ZipInputStream zis = new ZipInputStream(new FileInputStream(jarFile));
      ZipEntry entry = zis.getNextEntry();
      System.out.println(entry.getSize());
      

      Output is -1 for versions 2.5+ and a correct >0 size for version 2.4.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                khmarbaise Karl Heinz Marbaise
                Reporter:
                klemmons Kaitlyn Lemmons
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: