Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

site-deploy using wagon-ssh: User input needed

$
0
0
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]

Viewing all articles
Browse latest Browse all 5648

Trending Articles