You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mickael leduque <mi...@gmail.com> on 2011/09/05 12:00:36 UTC

Using StrictHostKeyChecking=false with maven3

Hello,

I'm trying to use wagon-ssh with StrictHostKeyChecking set to false with
maven 3 (non interactive upload).

All answers to the same question seem to advise to  do something like

<server>
  <id>deploy.host</id>
  <configuration>
    <knownHostsProviderimplementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider">

      <hostKeyChecking>no</hostKeyChecking>
    </knownHostsProvider>
  </configuration>
</server>

Anyway, something seems to have broken with maven3 :

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.0:deploy (default-deploy) on
project csFmkParent: Unable to configure Wagon: 'scp': While configuring
wagon for 'ServeurDoc': Unable to apply wagon configuration.
ClassNotFoundException: Class name which was explicitly given in
configuration using 'implementation' attribute:
'org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider'
cannot be loaded -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-site-plugin:3.0:deploy (default-deploy)
on project csFmkParent: Unable to configure Wagon: 'scp'
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    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:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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:290)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to
configure Wagon: 'scp'
    at
org.apache.maven.plugins.site.AbstractDeployMojo.deploy(AbstractDeployMojo.java:272)
    at
org.apache.maven.plugins.site.AbstractDeployMojo.deployTo(AbstractDeployMojo.java:257)
    at
org.apache.maven.plugins.site.AbstractDeployMojo.execute(AbstractDeployMojo.java:165)
    at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: org.apache.maven.wagon.TransferFailedException: While configuring
wagon for 'ServeurDoc': Unable to apply wagon configuration.
    at
org.apache.maven.plugins.site.AbstractDeployMojo.configureWagon(AbstractDeployMojo.java:696)
    at
org.apache.maven.plugins.site.AbstractDeployMojo.deploy(AbstractDeployMojo.java:268)
    ... 23 more
Caused by:
org.codehaus.plexus.component.configurator.ComponentConfigurationException:
ClassNotFoundException: Class name which was explicitly given in
configuration using 'implementation' attribute:
'org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider'
cannot be loaded
    at
org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.getClassForImplementationHint(AbstractConfigurationConverter.java:70)
    at
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:80)
    at
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:278)
    at
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:151)
    at
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
    at
org.codehaus.plexus.component.configurator.AbstractComponentConfigurator.configureComponent(AbstractComponentConfigurator.java:66)
    at
org.codehaus.plexus.component.configurator.AbstractComponentConfigurator.configureComponent(AbstractComponentConfigurator.java:59)
    at
org.apache.maven.plugins.site.AbstractDeployMojo.configureWagon(AbstractDeployMojo.java:687)
    ... 24 more
Caused by: java.lang.ClassNotFoundException:
org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider
    at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
    at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
    at
org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.getClassForImplementationHint(AbstractConfigurationConverter.java:61)
    ... 31 more
[ERROR]
[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


I can"t find an existing issue about this (thought it is mentioned in the
last comment for MSITE-546). Am I right this is an issue with maven 3 ?