How to fix or workaround wagon bug?
Asked Answered
F

1

0

Bug https://issues.apache.org/jira/browse/MDEPLOY-177 has been hitting me for many month. When maven tries to download artifacts it will stall with a message saying it is downloading

x+1 of x B

e.g.

1007/1006 B  

and then it hangs. Robert Scholte tried to help on this quite a few times but so far to no avail. In my multiplatform environment I every once in a while see the bug creeping up be it in an Eclipse environment or directly on Mac OSX macports or just recently with Ubuntu 14.04 LTS.

How could i get rid of this problem for good?

These are suggestions I know of so far:

  1. to replace the wagon version
  2. to use wagon-ssh directly
  3. to use a more current mvn version in the first place.
  4. select a different wagon-provider

For each of these I do not have a clue how to do these things.

**for #1: replace the wagon version **

E.g. Robert Scholte wrote: "Wolfgang Fahl, could you narrow it down to the version of the ssh-wagon since when this issue starts? You can do it by downloading that jar and put it in apache-maven-3.2.3/lib/ext"

But where would that location be in e.g. Eclipse / MacPorts / Ubuntu?

This is what I have on the Ubuntu 14.04 LTS machine:

muf@capri:/usr/share/maven/lib$ ls -l | grep wagon
lrwxrwxrwx 1 root root 37 Oct 30  2013 aether-connector-wagon.jar -> ../../java/aether-connector-wagon.jar
lrwxrwxrwx 1 root root 29 Oct 30  2013 wagon-file.jar -> ../../java/wagon-file-2.x.jar
lrwxrwxrwx 1 root root 36 Oct 30  2013 wagon-http-shaded.jar -> ../../java/wagon-http-shaded-2.x.jar
lrwxrwxrwx 1 root root 37 Oct 30  2013 wagon-provider-api.jar -> ../../java/wagon-provider-api-2.x.jar

in /usr/share/java there are:

muf@capri:/usr/share/java$ ls -l wagon-ssh*
lrwxrwxrwx 1 root root    13 Apr 24  2012 wagon-ssh-1.0.jar -> wagon-ssh.jar
lrwxrwxrwx 1 root root    17 Nov  1  2013 wagon-ssh-2.x-2.5.jar -> wagon-ssh-2.x.jar
-rw-r--r-- 1 root root 24033 Nov  1  2013 wagon-ssh-2.x.jar
lrwxrwxrwx 1 root root    20 Apr 24  2012 wagon-ssh-common-1.0.jar -> wagon-ssh-common.jar
lrwxrwxrwx 1 root root    24 Nov  1  2013 wagon-ssh-common-2.x-2.5.jar -> wagon-ssh-common-2.x.jar
-rw-r--r-- 1 root root 20532 Nov  1  2013 wagon-ssh-common-2.x.jar
-rw-r--r-- 1 root root 21913 Apr 24  2012 wagon-ssh-common.jar
lrwxrwxrwx 1 root root    25 Apr 24  2012 wagon-ssh-common-test-1.0.jar -> wagon-ssh-common-test.jar
-rw-r--r-- 1 root root  6131 Apr 24  2012 wagon-ssh-common-test.jar
lrwxrwxrwx 1 root root    22 Apr 24  2012 wagon-ssh-external-1.0.jar -> wagon-ssh-external.jar
lrwxrwxrwx 1 root root    26 Nov  1  2013 wagon-ssh-external-2.x-2.5.jar -> wagon-ssh-external-2.x.jar
-rw-r--r-- 1 root root  9953 Nov  1  2013 wagon-ssh-external-2.x.jar
-rw-r--r-- 1 root root  9718 Apr 24  2012 wagon-ssh-external.jar
-rw-r--r-- 1 root root 23603 Apr 24  2012 wagon-ssh.jar

for #2: I didn't find instructions for this so far.

for #3:

For the obvious "more current mvn" I'd have to know which maven ships with a wagon that does not have the bug any more. Up to 3.3.1 the bug was there e.g. on Mac OS X.

for #4: https://maven.apache.org/guides/mini/guide-wagon-providers.html has instructions on changing the provider - it does not say how you change the version of a provider

So far downgrading to mvn 3.0.5 had worked. But unfortunately in Ubuntu 14.04 LTS that is just the version that e.g. works on Macports - but there it does not!

Freestanding answered 24/10, 2015 at 13:33 Comment(3)
See the last comments on the JIRA issue you are referencing too..Thyrotoxicosis
Just copy the new version of wagon into the /lib folder of your maven installation and of course remove the older one before...Thyrotoxicosis
Thank you for the feedback. I am in a multi-platform environment where I install with e.g. apt-get or macports. see #33718055 for the current state of affairs.Freestanding
F
0

specifying wagon-ssh 2.10 in the master pom.xml fixes the issue. 2.7 was broken 2.9 might be broken.

  <extensions>
    <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>2.10</version>
    </extension>
  </extensions>
</build>
Freestanding answered 24/10, 2015 at 16:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.