You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamás Cservenák (JIRA)" <ji...@codehaus.org> on 2013/09/12 11:43:52 UTC

[jira] (WAGON-381) Both Maven 2 and 3 fail to retrieve a that is larger than Integer.MAX_VALUE

    [ https://jira.codehaus.org/browse/WAGON-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=332719#comment-332719 ] 

Tamás Cservenák commented on WAGON-381:
---------------------------------------

I was able to reproduce this with Wagon 2.4 (used in _all released Mavens since 3.0.5 and 3.1.x line_, even today's master uses Wagon 2.4). Also, I was able to test and verify it's fixed in Wagon 2.5-SNAPSHOT.

Setup:
Created 3G file, put it under my local Nexus (built from master). Using {{curl -IL ...}} verified that Nexus emits correct headers, especially that {{Content-Length}} header is correct:

{noformat}
[cstamas@Zaphod nexus-perftest]$ curl -IL http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat
HTTP/1.1 200 OK
Date: Thu, 12 Sep 2013 09:29:11 GMT
Set-Cookie: rememberMe=deleteMe; Path=/nexus; Max-Age=0; Expires=Wed, 11-Sep-2013 09:29:11 GMT
Server: Nexus/2.7.0-SNAPSHOT
Accept-Ranges: bytes
ETag: "{SHA1{6e7f6dca8def40df0b21f58e11c1a41c3e000285}}"
Content-Type: application/octet-stream
Last-Modified: Thu, 12 Sep 2013 09:15:14 GMT
Content-Length: 3221225472
X-Content-Type-Options: nosniff

[cstamas@Zaphod nexus-perftest]$ 
{noformat}

Then, I took "vanilla" Maven 3.0.4 (that should be plagued with this issue, and is the first to use non-lightweight Wagon for HTTP) and built a sample project, noticed following lines in console proving the existence of bug:

{noformat}
...
Downloading: http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat
...
[WARNING] Checksum validation failed, no checksums available from the repository for http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat
Downloaded: http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat (2097152 KB at 38750.0 KB/sec)
...
{noformat}

Notice the file size Maven 3.0.4 reported, _it's not 3G_. Verified in local repo, only 2G were downloaded, file was incomplete.

Then, I locally built Wagon 2.5-SNAPSHOT (from 574561f6d5d1721813c2ec8902aed9e28022854b), then built Maven from master (from 02d12423060361d5444817083c64adf276c3953e) where I bumped Wagon version to 2.5-SNAPSHOT, nuked local repository and rerun the sample project build:

{noformat}
...
Downloading: http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat
[WARNING] Checksum validation failed, no checksums available from the repository for http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat
Downloaded: http://localhost:8081/nexus/content/groups/public/org/test/test/1.0/test-1.0-data.dat (3145728 KB at 86418.7 KB/sec)
...
{noformat}

Notice, how the reported file size is correct. Also, verified in local storage by comparing size and using {{openssl sha1}} that the file is complete and correctly downloaded (no corruption of any kinds happened), the hashes matched.

Also, please not that all Maven versions since 3.0.5 release (even 3.1.0 and 3.1.1 and even current master of Maven) all of them use Wagon 2.4, hence testing with latest Maven builds would not help, as all of those use Wagon 2.4, unless you used a branch with upped Wagon version, which in Henry's case is not true, it's a build from master branch
https://github.com/apache/maven/commit/ac64dd6bb6096e8dbd54e3520208e5737fb1c804

In case of Ben, it's a Jenkins build, probably another master branch build.

Hence, I consider the bug fixed, and am closing this issue. Please reopen, if you find some concerns not addressed.

Hene
                
> Both Maven 2 and 3 fail to retrieve a <dependency> that is larger than Integer.MAX_VALUE
> ----------------------------------------------------------------------------------------
>
>                 Key: WAGON-381
>                 URL: https://jira.codehaus.org/browse/WAGON-381
>             Project: Maven Wagon
>          Issue Type: Bug
>          Components: wagon-http
>    Affects Versions: 2.2
>            Reporter: Evgeny Goldin
>            Assignee: Olivier Lamy
>             Fix For: 2.5
>
>         Attachments: 1.png, 2.png
>
>
> We have a *{{*.tar}}* file stored in corporate Maven repository, its size is *{{2.5Gb}}*. Trying to bring it with Maven (both 2 and 3) causes file of *{{2147483647}}* size to be downloaded to local maven repo, which is exactly 2<sup>31</sup>-1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira