PR: MPARTIFACT-76
Don't ask for passphrase if maven.artifact.gpg.skip=true. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@538499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7622152699
commit
dd4327ce78
@ -23,7 +23,7 @@
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-artifact-plugin</id>
|
||||
<name>Maven Artifact Plugin</name>
|
||||
<currentVersion>1.9</currentVersion>
|
||||
<currentVersion>1.9.1-SNAPSHOT</currentVersion>
|
||||
<description>Tools to manage artifacts and deployment. *WARNING*: This version of the artifact-plugin requires Maven 1.1. People using Maven 1.0 should NOT use this version of the plugin.</description>
|
||||
<shortDescription>Tools to manage artifacts and deployment</shortDescription>
|
||||
<versions>
|
||||
|
||||
@ -115,14 +115,17 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
|
||||
throws MavenException
|
||||
{
|
||||
Boolean gpgSkip = Boolean.valueOf( (String) project.getContext().getVariable( "maven.artifact.gpg.skip" ) );
|
||||
String gpgPassphrase;
|
||||
try
|
||||
String gpgPassphrase = null;
|
||||
if ( !gpgSkip.booleanValue() )
|
||||
{
|
||||
gpgPassphrase = getPassphrase( project );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenException( "Error while retreiving the passphrase for gpg", e );
|
||||
try
|
||||
{
|
||||
gpgPassphrase = getPassphrase( project );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenException( "Error while retreiving the passphrase for gpg", e );
|
||||
}
|
||||
}
|
||||
String gpgKeyname = (String) project.getContext().getVariable( "maven.artifact.gpg.keyname" );
|
||||
Boolean gpgUseagent =
|
||||
@ -143,13 +146,17 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
|
||||
{
|
||||
File pomFile = PomRewriter.getRewrittenPom( project );
|
||||
if ( !gpgSkip.booleanValue() )
|
||||
{
|
||||
generateSignatureForArtifact( pomFile, gpgPassphrase, gpgUseagent.booleanValue(), gpgKeyname );
|
||||
}
|
||||
this.doDeploy( pomFile, project, artifactId, DefaultArtifactDeployer.POM_ARTIFACT_TYPE_HANDLER, version,
|
||||
DefaultArtifactDeployer.POM_TYPE, gpgSkip.booleanValue(), gpgPassphrase,
|
||||
gpgUseagent.booleanValue(), gpgKeyname );
|
||||
}
|
||||
if ( !gpgSkip.booleanValue() )
|
||||
{
|
||||
generateSignatureForArtifact( file, gpgPassphrase, gpgUseagent.booleanValue(), gpgKeyname );
|
||||
}
|
||||
this.doDeploy( file, project, artifactId, handler, version, type, gpgSkip.booleanValue(), gpgPassphrase,
|
||||
gpgUseagent.booleanValue(), gpgKeyname );
|
||||
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
<author email="vmassol@apache.org">Vincent Massol</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.9.1-SNAPSHOT" date="in SVN">
|
||||
<action dev="ltheussl" type="fix" issue="MPARTIFACT-76">artifact:deploy always asks for passphrase (even if maven.artifact.gpg.skip=true).</action>
|
||||
</release>
|
||||
<release version="1.9" date="2007-05-07" description="Requires Maven 1.1">
|
||||
<action dev="aheritier" type="add" issue="MPARTIFACT-75">Allow to sign artifacts to deploy. Refer to properties documentation to know how to activate it.</action>
|
||||
<action dev="aheritier" type="update" issue="MAVEN-1755">Upgrade maven-model to version 3.0.2 and use stax reader/parser for the pom to allow to use relative entities.</action>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user