maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hohl, Gerrit" <g.h...@aurenz.de>
Subject site-deploy using wagon-ssh: User input needed
Date Thu, 12 Jun 2014 08:34:02 GMT
Hello everyone, :)

 

this is my first post in this mailing list, so I hope I doing everything
right.

 

I'm using Maven 3.0.4, having a Jenkins build server running on Windows
and a Web Server running on Ubuntu 14.04 LTS. I decided to use SSH for
deploying the site to the server.

 

My local settings.xml looks like this:

 

<settings>

                <servers>

                               <server>

                                               <id>marketplace</id>

                                               <username><!-- The
username --></username>

                                               <password><!-- The
plain-text password  --></password>

                               </server>

                </servers>

</settings>

 

My pom.xml looks like this:

 

<build>

                <pluginManagement>

                               <plugins>

                                               <plugin>

 
<groupId>org.apache.maven.plugins</groupId>

 
<artifactId>maven-site-plugin</artifactId>

 
<version>3.3</version>

 
<configuration>

 
<locales>en</locales>

 
</configuration>

 
<dependencies>

 
<dependency>

 
<groupId>org.apache.maven.wagon</groupId>

 
<artifactId>wagon-ssh</artifactId>

 
<version>2.6</version>

 
</dependency>

 
</dependencies>

                                               </plugin>

                               </plugins>

                </pluginManagement>

                <plugins>

                               <plugin>

 
<groupId>org.apache.maven.plugins</groupId>

 
<artifactId>maven-site-plugin</artifactId>

                               </plugin>

                </plugins>

</build>

<distributionManagement>

                <site>

                               <id>marketplace</id>

                               <url>scp://[Address of the web
server]/var/www/html/test-project/</url>

                </site>

</distributionManagement>

 

If I start Maven locally using the "site-deploy" goal, Maven will show
the following in my Eclipse:

 

[INFO] --- maven-site-plugin:3.3:deploy (default-deploy) @ test-project
---

The authenticity of host '[Adresse des Web Servers]' can't be
established.

RSA key fingerprint is [RSA Fingerprint].

Are you sure you want to continue connecting? (yes/no):

 

But if I run this on Jenkins I don't have the possibility to enter
something. So I need a solution where I don't need an user input.

I came across the solution in the Internet:

 

<settings>

                <servers>

                               <server>

                                               <id>marketplace</id>

                                               <username><!-- The
username --></username>

                                               <password><!-- The
plain-text password  --></password>

                                               <configuration>

 
<knownHostsProvider
implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnown
HostProvider">

 
<hostKeyChecking>no</hostKeyChecking>

 
</knownHostsProvider>

                                               </configuration>

                               </server>

                </servers>

</settings>

 

But now I get the following error:

 

[INFO] --- maven-site-plugin:3.3:deploy (default-deploy) @ test-project
---

[INFO]
------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 9.105s

[INFO] Finished at: Thu Jun 12 09:48:18 CEST 2014

[INFO] Final Memory: 30M/505M

[INFO]
------------------------------------------------------------------------

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.3:deploy (default-deploy)
on project test-project: Unable to configure Wagon: 'scp': While
configuring wagon for 'marketplace': 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]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.

[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

 

That is odd. The class NullKnownHostProvider is part of the
wagon-ssh-common, the class name as well as the package name are okay.
wagon-ssh depends on wagon-ssh-common, so it should be available. I even
added wagon-ssh-common to the <dependencies> element of the
maven-site-plugin. But the result was still the same.

 

Can anyone give me a hint what I did wrong?

 

Regards,

Gerrit

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message