git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@329999 13f79535-47bb-0310-9956-ffa450edef68
115 lines
4.6 KiB
XML
115 lines
4.6 KiB
XML
<?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>
|
|
<title>Site deployment</title>
|
|
<author email="dion_AT_multitask_DOT_com_DOT_au">Dion Gillard</author>
|
|
<author email="ge0ffrey_AT_users_DOT_sourceforge_DOT_net">Geoffrey De Smet</author>
|
|
</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>
|