You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/02/11 12:20:32 UTC
svn commit: r908933 - in /maven/plugins/trunk/maven-gpg-plugin: ./
src/main/java/org/apache/maven/plugin/gpg/
Author: bentmann
Date: Thu Feb 11 11:20:27 2010
New Revision: 908933
URL: http://svn.apache.org/viewvc?rev=908933&view=rev
Log:
o Inherited from maven-plugins:17
o Cleaned up dependencies
Modified:
maven/plugins/trunk/maven-gpg-plugin/pom.xml
maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java
maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java
maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/SignAndDeployFileMojo.java
Modified: maven/plugins/trunk/maven-gpg-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-gpg-plugin/pom.xml?rev=908933&r1=908932&r2=908933&view=diff
==============================================================================
--- maven/plugins/trunk/maven-gpg-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-gpg-plugin/pom.xml Thu Feb 11 11:20:27 2010
@@ -25,7 +25,7 @@
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
- <version>16</version>
+ <version>17</version>
</parent>
<artifactId>maven-gpg-plugin</artifactId>
@@ -62,11 +62,6 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-settings</artifactId>
- <version>2.0.6</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0.6</version>
</dependency>
@@ -78,25 +73,19 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>1.4.8</version>
+ <version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.3</version>
- </dependency>
-
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.2</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
@@ -107,7 +96,7 @@
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
- <version>1.4</version>
+ <version>1.5</version>
<configuration>
<debug>true</debug>
<projectsDirectory>src/it</projectsDirectory>
Modified: maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java?rev=908933&r1=908932&r2=908933&view=diff
==============================================================================
--- maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java (original)
+++ maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java Thu Feb 11 11:20:27 2010
@@ -35,7 +35,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
-import org.apache.maven.settings.Settings;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.SelectorUtils;
@@ -87,7 +86,7 @@
private boolean useAgent;
/**
- * Skip doing the gpg signing
+ * Skip doing the gpg signing.
*
* @parameter expression="${gpg.skip}" default-value="false"
* @required
@@ -95,7 +94,7 @@
private boolean skip;
/**
- * A list of files to exclude from being signed. Can contain ant-style wildcards and double wildcards. The default
+ * A list of files to exclude from being signed. Can contain Ant-style wildcards and double wildcards. The default
* excludes are <code>**/*.md5 **/*.sha1 **/*.asc</code>.
*
* @parameter
@@ -139,11 +138,10 @@
private ArtifactHandlerManager artifactHandlerManager;
/**
- * @parameter default-value="${settings}"
- * @required
+ * @parameter default-value="${settings.interactiveMode}"
* @readonly
*/
- protected Settings settings;
+ private boolean interactive;
private GpgSigner signer = new GpgSigner();
@@ -177,7 +175,7 @@
if ( !useAgent && null == pass )
{
- if ( !settings.isInteractiveMode() )
+ if ( !interactive )
{
throw new MojoExecutionException( "Cannot obtain passphrase in batch mode" );
}
@@ -195,7 +193,7 @@
// What we need to generateSignatureForArtifact here
// ----------------------------------------------------------------------------
- signer.setInteractive( settings.isInteractiveMode() );
+ signer.setInteractive( interactive );
signer.setKeyName( keyname );
signer.setUseAgent( useAgent );
signer.setOutputDirectory( outputDirectory );
Modified: maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java?rev=908933&r1=908932&r2=908933&view=diff
==============================================================================
--- maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java (original)
+++ maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java Thu Feb 11 11:20:27 2010
@@ -26,9 +26,9 @@
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.apache.commons.lang.SystemUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.Os;
import org.codehaus.plexus.util.cli.CommandLineException;
import org.codehaus.plexus.util.cli.CommandLineUtils;
import org.codehaus.plexus.util.cli.Commandline;
@@ -53,10 +53,6 @@
private File homeDir;
- public GpgSigner()
- {
- }
-
public void setInteractive( boolean b )
{
isInteractive = b;
@@ -137,7 +133,7 @@
Commandline cmd = new Commandline();
- cmd.setExecutable( "gpg" + ( SystemUtils.IS_OS_WINDOWS ? ".exe" : "" ) );
+ cmd.setExecutable( "gpg" + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? ".exe" : "" ) );
if ( homeDir != null )
{
Modified: maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/SignAndDeployFileMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/SignAndDeployFileMojo.java?rev=908933&r1=908932&r2=908933&view=diff
==============================================================================
--- maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/SignAndDeployFileMojo.java (original)
+++ maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/SignAndDeployFileMojo.java Thu Feb 11 11:20:27 2010
@@ -37,7 +37,6 @@
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.deploy.DeployFileMojo;
-import org.apache.maven.settings.Settings;
/**
* Signs artifacts and installs the artifact in the remote repository.
@@ -91,11 +90,10 @@
private File ascDirectory;
/**
- * @parameter default-value="${settings}"
- * @required
+ * @parameter default-value="${settings.interactiveMode}"
* @readonly
*/
- protected Settings settings;
+ private boolean interactive;
/**
* Maven ArtifactHandlerManager
@@ -251,7 +249,7 @@
copyToParent();
ArtifactDeployer deployer = getDeployer();
- signer.setInteractive( settings.isInteractiveMode() );
+ signer.setInteractive( interactive );
signer.setKeyName( keyname );
signer.setUseAgent( useAgent );
signer.setOutputDirectory( ascDirectory );
@@ -332,7 +330,7 @@
pass = passphrase;
if ( !useAgent && null == pass )
{
- if ( !settings.isInteractiveMode() )
+ if ( !interactive )
{
throw new MojoExecutionException( "Cannot obtain passphrase in batch mode" );
}