Tuesday, February 26, 2013

No connector available to access repository - FIXED! - Maven Wagon

When you try to deploy artifacts to Sonatype using maven 3, If you encounter the following error, you probably have not configured Maven Wagon properly  

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.444s
[INFO] Finished at: Tue Feb 26 06:37:48 IST 2013
[INFO] Final Memory: 10M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7
:deploy (default-deploy) on project test-core: Failed to deploy artifacts/metad
ata: No connector available to access repository xxx-maven2-repository (scp://x
xxx/maven2/) of type default using the available factories WagonRepositoryConne
ctorFactory -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swi
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please re
ad the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecution

To fix this issue 
  • Add wagon extensions to your pom.
  • Add distribution management segment to your pom.
            <name>Xxx Maven2 Repository</name>
            <name>Xxx Maven2 Snapshot Repository</name>
Not it works !
For more info on using extensions refer: http://maven.apache.org/guides/mini/guide-using-extensions.html


  1. This post solved my problem and saved me a lot of time. Thank you for posting this very clear fix.

  2. It works from command line, but when I use the eclipse plugin (eclipse kepler) I get this error
    9/26/13, 6:13:01 PM GMT-03:00: [WARN] Could not transfer metadata xxx/maven-metadata.xml from/to xxx.net (scp://xxx:22/usr/site/opt/maven2-repo): Cannot connect. Reason: timeout: socket is not established Could not transfer metadata xxx:2.0.13-SNAPSHOT/maven-metadata.xml from/to xxx.net (scp://xxx:22/usr/site/opt/maven2-repo): Cannot connect. Reason: timeout: socket is not established
    running from command line I used apache-maven-3.1.0
    running from eclipse I set my external installation but eclipse says that it will use embedded installation to resolve dependencies. (embedded is 3.0.4)

    1. Have you find any solution ?
      I am also facing same issue

  3. Thanks for the post ....saved my hours..

  4. Great post. Tried it with Maven 3.2.1 but then the mvn release:perfrom is not finishing. With Maven 3.0.4 no problem.