Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-384

Maven fails to download artifacts larger than 2 GB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.5
    • wagon-provider-api
    • None
    • This issue is not dependent on the operating system and hardware.
    • Patch

    Description

      If a Maven build includes a dependency for an artifact that is larger than 2 GB in size, the download of the artifact during the build terminates at 2 GB and the following error is reported by Maven:

      [WARNING] Checksum validation failed, expected 5b0fafa21f2b3e9c4e3b7ef3c5306f82bcb9fc85 but is e9ef494d39de097b9a02531993688ceebdce39e1

      Maven repeats the download a second time with the same error result, then build fails.

      The failure is caused when the transfer method in AbstractWagon.java receives maxSize parameter, which is an integer, set to Integer.MAX_VALUE, rather than the actual size of the artifact. This value is then decremented to zero, which causes the download to terminate prematurely. The attached file (AbstractWagon.java) contains changes in the transfer method that use the value Integer.MAX_VALUE as a trigger that causes the routine to ignore the maxSize parameter's value and download the artifact until an EOF is detected, regardless of its size.

      Attachments

        1. AbstractWagon.java
          28 kB
          William Bernardet
        2. AbstractWagon.java
          29 kB
          Robert Baker

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              rsbaker56 Robert Baker
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: