blob: 903f73f39f76b437728263d921c8d797c9f889e1 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<!--
$Revision: 1296463 $ $Date: 2012-03-02 21:08:10 +0000 (Fri, 02 Mar 2012) $
-->
<document>
<properties>
<title>Apache Maven Gpg Signfiles Mojo: Overview</title>
<author email="dev@maven.apache.org">Apache Maven Documentation Team</author>
</properties>
<body>
<section name="Apache Maven Gpg Signfiles Plugin">
<p>
This is a <a href="http://maven.apache.org/">Maven 2.x</a> Plugin which is designed
to be used in release profiles for packages such as source and binary archives.
</p>
<p>
It is an extension of the standard
<a href="http://maven.apache.org/plugins/maven-gpg-plugin/">Apache Maven Gpg Plugin</a> that can generate signatures for
any specified files (not just ones that are attached to the project).
It is hoped that the functionality will eventually be added to the Maven plugin,
at which point this plugin will become redundant.
</p>
<p>
Note: the signing is done using the same code as Maven Gpg Plugin 1.4; the same properties
and configuration items are supported. In addition, this plugin supports includes/excludes,
see below.
</p>
<p>
As with the Maven Gpg Plugin, it is assumed that the user has installed and configured GnuPG or GnuPG2
on their system.
</p>
</section>
<section name="Plugin Goals">
<p>
Available Goals:
<ul>
<li>gpgsignfiles:signfiles - generate gpg signatures of specified files</li>
<li>gpgsignfiles:help - display the plugin help as per help:describe</li>
</ul>
</p>
</section>
<section name="Trying out the plugin">
<p>
Configure the plugin in the <code>&lt;build&gt;</code> section of the <code>pom.xml</code>
<source><![CDATA[
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpgsignfiles-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
<configuration>
<includes>
<include>target/releases/*.zip</include>
<include>target/releases/*.tar.gz</include>
</includes>
<excludes> <!-- Optional -->
<exclude>target/release/README*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>signfiles</goal>
</goals>
<!-- must run after assembly and before deploy -->
<phase>verify</phase>
</execution>
</executions>
</plugin>
]]></source>
</p>
<p>
The list of files to process can also be specified on the command line:
<pre>
mvn gpgsignfiles:signfiles -Dmaven.gpg.files={comma-separated list of files}
</pre>
Note that the configuration items (apart from includes/excludes) are also supported as
properties with the prefix "maven.gpg.".
</p>
</section>
</body>
</document>