Maven deploy hangs while downloading maven_metadata.xml if it exists already Maven deploy hangs while downloading maven_metadata.xml if it exists already xml xml

Maven deploy hangs while downloading maven_metadata.xml if it exists already


With OS/X 10.9.3 and Maven 3.2.3, I had the same issue.

It seems to be the wagon plugin which is broken when downloading the files during the deploy.

I solved it by switching the wagon connector to "Maven Wagon SSH External" in order to use the system ssh command.

Below my POM.xml modification :

        <extension>            <groupId>org.apache.maven.wagon</groupId>            <artifactId>wagon-ssh</artifactId>            <version>2.6</version>        </extension>

switched to :

        <extension>            <groupId>org.apache.maven.wagon</groupId>            <artifactId>wagon-ssh-external</artifactId>            <version>2.6</version>        </extension>

And replaced

    scp://myuser@myhost.com

By

    scpexe://myuser@myhost.com

into url tags :

    <repository>        ...        <url>scpexe://myuser@myhost.com</url>        ...    </repository>


I have managed to fix this by swapping all references of scp to sftp in my pom.xml. The advantage of this solution is it does not require any additional configuration. See http://jira.codehaus.org/browse/MNG-5605 for more information.


This appears to be some obscure bug I was unable to find a reference to in Maven 3.0.5 (default in debian testing). Installing Maven 3.1.1 fixed this issue.