MPSITE-18 : Document sshdeploy
Patch from Geoffrey De Smet git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@327744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -16,18 +16,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project name="Maven Site Generation Plugin">
|
||||
|
||||
<title>Maven Site Generation Plugin</title>
|
||||
|
||||
<body>
|
||||
<links>
|
||||
<item name="Maven" href="http://maven.apache.org/"/>
|
||||
</links>
|
||||
<menu name="Overview">
|
||||
<item name="Properties" href="/properties.html" />
|
||||
<item name="Goals" href="/goals.html" />
|
||||
<item name="Properties" href="/properties.html"/>
|
||||
<item name="Goals" href="/goals.html"/>
|
||||
<item name="Site deployment" href="/site-deployment.html"/>
|
||||
</menu>
|
||||
</body>
|
||||
</project>
|
||||
|
||||
114
site/xdocs/site-deployment.xml
Normal file
114
site/xdocs/site-deployment.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<document>
|
||||
<properties>
|
||||
<author>Dion Gillard</author>
|
||||
<author email="ge0ffrey_AT_users_DOT_sourceforge_DOT_net">Geoffrey De Smet</author>
|
||||
<title>Site deployment</title>
|
||||
</properties>
|
||||
<body>
|
||||
<section name="General">
|
||||
<p>
|
||||
After having generating a website locally, you can deploy it to a webserver.
|
||||
Before starting, make sure the POM properties <code>siteAddress</code> and
|
||||
<code>siteDirectory</code> are set correctly.
|
||||
If you are allowed to access the source of other projects build with Maven
|
||||
from the same webserver, take a look at their settings.
|
||||
</p>
|
||||
</section>
|
||||
<section name="SSH (Secure Shell)">
|
||||
<subsection name="Introduction">
|
||||
<p>
|
||||
SSH is a secure protocol which can be used to deploy the website.
|
||||
It is based on the private-public key paradigm.
|
||||
From a private key a public key can be generated, but not the other way around.
|
||||
A private key should be kept safe, but its public key can be shared with anyone.
|
||||
They are used for:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Encryption: The sender encrypts data with the receiver's public key
|
||||
and the receiver decrypts it with his private key.
|
||||
</li>
|
||||
<li>
|
||||
Authentication: The sender signs data with his private key
|
||||
and the receiver authenticates it with the sender's public key.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
There are several private-public key algorithms, such as RSA.
|
||||
</p>
|
||||
</subsection>
|
||||
<subsection name="SSH client">
|
||||
<p>
|
||||
Maven currently does not contain an SSH client, so you need to install one yourself.
|
||||
Many Linux distributions come with <a href="http://www.openssh.org/">OpenSSH</a>.
|
||||
Windows users can use <a href="http://www.cygwin.com/">Cygwin</a> with the optional
|
||||
installation of OpenSSH. Other SSH clients can be found on the net.
|
||||
</p>
|
||||
<p>
|
||||
Afterwards set the <code>maven.ssh.executable</code> property properly.
|
||||
When using OpenSSH through Cygwin, remember to call all maven goals that require SSH
|
||||
from the Cygwin command line.
|
||||
</p>
|
||||
</subsection>
|
||||
<subsection name="Authentication configuration">
|
||||
<p>
|
||||
Encryption is mostly done behind the scenes, but authentication requires some work.
|
||||
If your local username doesn't match with your remote username,
|
||||
use the <code>maven.username</code> property to set the correct SSH username.
|
||||
</p>
|
||||
<p>
|
||||
If your administrator doesn't supply you with the private key,
|
||||
you can generate one with most SSH clients.
|
||||
For example to generate an RSA key pair with OpenSSH:
|
||||
</p>
|
||||
<source>ssh-keygen -t rsa</source>
|
||||
<p>
|
||||
It asks for a passphrase, which is a long password.
|
||||
</p>
|
||||
<p>
|
||||
To be able to authenticate you, the remote server needs to have your public key stored.
|
||||
The manner on getting it there depends on your organization's security policy.
|
||||
In some cases the server administrator adds it manually,
|
||||
in other cases you can upload it through a web interface (for example on SourceForge).
|
||||
</p>
|
||||
</subsection>
|
||||
<subsection name="Using the ssh deploy goal">
|
||||
<p>
|
||||
If your private key requires a passphrase,
|
||||
simply calling the <code>site:sshdeploy</code> goal will cause Maven to hang.
|
||||
Instead you need to authenticate to the SSH agent before calling Maven.
|
||||
For example, with the filename being <code>id_rsa</code>
|
||||
in the directory <code>~/.ssh</code> using OpenSSH:
|
||||
</p>
|
||||
<source>
|
||||
ssh-agent bash
|
||||
ssh-add ~/.ssh/id_rsa
|
||||
cd PROJECT_DIRECTORY
|
||||
maven site:sshdeploy
|
||||
</source>
|
||||
<p>
|
||||
Note that you need to build the site first.
|
||||
</p>
|
||||
</subsection>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
Reference in New Issue
Block a user