title: Maven deploy snapshot with scp throws NoSuchElementException
body: <p>I want to be able to deploy a snapshot of a maven project on a nexus repository using scp. 
  Here's the current configuration of my pom.xml for interesting parts:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;distributionManagement&gt;
      &lt;snapshotRepository&gt;
        &lt;id&gt;gforge.inria.fr-snapshot&lt;/id&gt;
        &lt;name&gt;inria-snapshots&lt;/name&gt;
        &lt;url&gt;scp://scm.gforge.inria.fr/home/groups/spoon/htdocs/repositories/snapshots&lt;/url&gt;
      &lt;/snapshotRepository&gt;
      &lt;site&gt;
        &lt;id&gt;gforge.inria.fr-site&lt;/id&gt;
        &lt;name&gt;inria&lt;/name&gt;
        &lt;url&gt;scp://scm.gforge.inria.fr/home/groups/spoon/htdocs/mvnsites/spoon-core&lt;/url&gt;
      &lt;/site&gt;
    &lt;/distributionManagement&gt;
    [...]
  &lt;extensions&gt;
        &lt;extension&gt;
          &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt;
           &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt;
        &lt;/extension&gt;
      &lt;/extensions&gt;
    &lt;/build&gt;
  </code></pre>
  
  <p>The entire pom.xml is available <a href="https://github.com/INRIA/spoon/blob/master/pom.xml" rel="nofollow noreferrer">there</a>.</p>
  
  <p>We are using pair of keys to authenticate to our repository, so I enter the following in <code>~/.m2/settings.xml</code>: </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;server&gt;
    &lt;id&gt;gforge.inria.fr-snapshot&lt;/id&gt;
    &lt;username&gt;XXXX&lt;/username&gt;
    &lt;privateKey&gt;/path/to/the/private/key&lt;/privateKey&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>And when I launch the <code>mvn clean deploy</code> I obtain the following error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy (injected-nexus-deploy) on project spoon-core: Failed to deploy artifacts/metadata: Cannot access scp://scm.gforge.inria.fr/home/groups/spoon/htdocs/repositories/snapshots with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access scp://scm.gforge.inria.fr/home/groups/spoon/htdocs/repositories/snapshots using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
  [ERROR] role: org.apache.maven.wagon.Wagon
  [ERROR] roleHint: scp
  </code></pre>
  
  <p>Executing with debugging option show me the following stacktrace:</p>
  
  <pre><code>java.util.NoSuchElementException
        role: org.apache.maven.wagon.Wagon
    roleHint: scp
  org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
        role: org.apache.maven.wagon.Wagon
    roleHint: scp
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
      at org.eclipse.aether.internal.transport.wagon.PlexusWagonProvider.lookup(PlexusWagonProvider.java:58)
      at org.eclipse.aether.transport.wagon.WagonTransporter.lookupWagon(WagonTransporter.java:271)
      at org.eclipse.aether.transport.wagon.WagonTransporter.&lt;init&gt;(WagonTransporter.java:115)
      at org.eclipse.aether.transport.wagon.WagonTransporterFactory.newInstance(WagonTransporterFactory.java:127)
      at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector.&lt;init&gt;(BasicRepositoryConnector.java:115)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
      at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:265)
  </code></pre>
  
  <p>For information, I'm using Maven 3.3.9, and Java 8 (I tested with openjdk and oracle JDK, with the same result).</p>
  
  <p>I know my pom.xml setup should work: it worked for months on a virtual machine. Sadly I did not setup that VM and we lost it recently without any backup. I don't have any information on the java or maven version it was on this machine. </p>
  
  <p>This VM was used through a jenkins Job to do <code>mvn deploy</code> periodically and you could have a look on the different logs of this job there: <a href="https://ci.inria.fr/sos/job/Spoon-Snapshot-Deployer/" rel="nofollow noreferrer">https://ci.inria.fr/sos/job/Spoon-Snapshot-Deployer/</a>. Before July the 28th it worked well, the logs showing my error are since August the 2nd. </p>