[
https://jira.codehaus.org/browse/WAGON-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=338622#comment-338622
]
Elliot Metsger commented on WAGON-393:
--------------------------------------
This is major problem, because you cannot support both Maven 2 and Maven 3
builds if you use SCP to deploy releases. Here's why:
When using Maven 3.1.1 to deploy to a clean repository (no artifacts from your
project have yet been deployed locally or remotely) using 'scp', you get this
exception:
{code}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on
project dcs-registry-parent: Failed to deploy artifacts/metadata: No connector
available to access repository dc.public.snapshots
(scp://maven.dataconservancy.org/data/maven-dc/public/snapshots/) of type
default using the available factories WagonRepositoryConnectorFactory -> [Help
1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on
project dcs-registry-parent: Failed to deploy artifacts/metadata: No connector
available to access repository dc.public.snapshots
(scp://maven.dataconservancy.org/data/maven-dc/public/snapshots/) of type
default using the available factories WagonRepositoryConnectorFactory
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy
artifacts/metadata: No connector available to access repository
dc.public.snapshots
(scp://maven.dataconservancy.org/data/maven-dc/public/snapshots/) of type
default using the available factories WagonRepositoryConnectorFactory
at
org.apache.maven.plugin.deploy.DeployMojo.deployProject(DeployMojo.java:282)
at
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:169)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException:
Failed to deploy artifacts/metadata: No connector available to access
repository dc.public.snapshots
(scp://maven.dataconservancy.org/data/maven-dc/public/snapshots/) of type
default using the available factories WagonRepositoryConnectorFactory
at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
at
org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:171)
at
org.apache.maven.plugin.deploy.DeployMojo.deployProject(DeployMojo.java:240)
... 22 more
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy
artifacts/metadata: No connector available to access repository
dc.public.snapshots
(scp://maven.dataconservancy.org/data/maven-dc/public/snapshots/) of type
default using the available factories WagonRepositoryConnectorFactory
at
org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:292)
at
org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:268)
at
org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
... 24 more
Caused by: org.eclipse.aether.transfer.NoRepositoryConnectorException: No
connector available to access repository dc.public.snapshots
(scp://maven.dataconservancy.org/data/maven-dc/public/snapshots/) of type
default using the available factories WagonRepositoryConnectorFactory
at
org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:193)
at
org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:288)
... 27 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{code}
To fix this error, you have to add a build extension:
{code}
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.5</version>
</extension>
</extensions>
</build>
{code}
The problem is that this extension is incompatible with Maven 2.2.1:
{code}
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to initialise extensions
Component descriptor role: 'com.jcraft.jsch.UIKeyboardInteractive',
implementation: 'org.apache.maven.wagon.providers.ss
h.jsch.interactive.PrompterUIKeyboardInteractive', role hint: 'default' has a
hint, but there are other implementations
that don't
{code}
One option would be to use a combination of the maven build helper plugin and
profiles to only add the <extension> when using Maven 3.1.1, but profiles don't
allow you to modify the build extensions.
> Maven 2.2.1 fails to build when build extension uses Wagon provider > 2.2
> -------------------------------------------------------------------------
>
> Key: WAGON-393
> URL: https://jira.codehaus.org/browse/WAGON-393
> Project: Maven Wagon
> Issue Type: Bug
> Components: wagon-ssh
> Reporter: Michael Osipov
> Priority: Critical
>
> I use the wagon-maven-plugin to upload files to SF.net. Since Maven 3 does
> not have SFTP support built-in I have declared this:
> {code}
> <extensions>
> <extension>
> <groupId>org.apache.maven.wagon</groupId>
> <artifactId>wagon-ssh</artifactId>
> <version>2.4</version>
> </extension>
> </extensions>
> {code}
> Runs fine with Maven 3 but when running with Maven 2.2.1 it says:
> {noformat}
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Unable to initialise extensions
> Component descriptor role: 'com.jcraft.jsch.UIKeyboardInteractive',
> implementation: 'org.apache.maven.wagon.providers.ss
> h.jsch.interactive.PrompterUIKeyboardInteractive', role hint: 'default' has a
> hint, but there are other implementations
> that don't
> {noformat}
> I went down all versions to 2.2 and it worked. So there must something wrong
> from 2.2 to 2.3.
> A demo project is available.
--
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