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>
|
<pomVersion>3</pomVersion>
|
||||||
<id>maven-artifact-plugin</id>
|
<id>maven-artifact-plugin</id>
|
||||||
<name>Maven Artifact Plugin</name>
|
<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>
|
<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>
|
<shortDescription>Tools to manage artifacts and deployment</shortDescription>
|
||||||
<versions>
|
<versions>
|
||||||
|
|||||||
@ -115,7 +115,9 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
|
|||||||
throws MavenException
|
throws MavenException
|
||||||
{
|
{
|
||||||
Boolean gpgSkip = Boolean.valueOf( (String) project.getContext().getVariable( "maven.artifact.gpg.skip" ) );
|
Boolean gpgSkip = Boolean.valueOf( (String) project.getContext().getVariable( "maven.artifact.gpg.skip" ) );
|
||||||
String gpgPassphrase;
|
String gpgPassphrase = null;
|
||||||
|
if ( !gpgSkip.booleanValue() )
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
gpgPassphrase = getPassphrase( project );
|
gpgPassphrase = getPassphrase( project );
|
||||||
@ -124,6 +126,7 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
|
|||||||
{
|
{
|
||||||
throw new MavenException( "Error while retreiving the passphrase for gpg", e );
|
throw new MavenException( "Error while retreiving the passphrase for gpg", e );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
String gpgKeyname = (String) project.getContext().getVariable( "maven.artifact.gpg.keyname" );
|
String gpgKeyname = (String) project.getContext().getVariable( "maven.artifact.gpg.keyname" );
|
||||||
Boolean gpgUseagent =
|
Boolean gpgUseagent =
|
||||||
Boolean.valueOf( (String) project.getContext().getVariable( "maven.artifact.gpg.useagent" ) );
|
Boolean.valueOf( (String) project.getContext().getVariable( "maven.artifact.gpg.useagent" ) );
|
||||||
@ -143,13 +146,17 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
|
|||||||
{
|
{
|
||||||
File pomFile = PomRewriter.getRewrittenPom( project );
|
File pomFile = PomRewriter.getRewrittenPom( project );
|
||||||
if ( !gpgSkip.booleanValue() )
|
if ( !gpgSkip.booleanValue() )
|
||||||
|
{
|
||||||
generateSignatureForArtifact( pomFile, gpgPassphrase, gpgUseagent.booleanValue(), gpgKeyname );
|
generateSignatureForArtifact( pomFile, gpgPassphrase, gpgUseagent.booleanValue(), gpgKeyname );
|
||||||
|
}
|
||||||
this.doDeploy( pomFile, project, artifactId, DefaultArtifactDeployer.POM_ARTIFACT_TYPE_HANDLER, version,
|
this.doDeploy( pomFile, project, artifactId, DefaultArtifactDeployer.POM_ARTIFACT_TYPE_HANDLER, version,
|
||||||
DefaultArtifactDeployer.POM_TYPE, gpgSkip.booleanValue(), gpgPassphrase,
|
DefaultArtifactDeployer.POM_TYPE, gpgSkip.booleanValue(), gpgPassphrase,
|
||||||
gpgUseagent.booleanValue(), gpgKeyname );
|
gpgUseagent.booleanValue(), gpgKeyname );
|
||||||
}
|
}
|
||||||
if ( !gpgSkip.booleanValue() )
|
if ( !gpgSkip.booleanValue() )
|
||||||
|
{
|
||||||
generateSignatureForArtifact( file, gpgPassphrase, gpgUseagent.booleanValue(), gpgKeyname );
|
generateSignatureForArtifact( file, gpgPassphrase, gpgUseagent.booleanValue(), gpgKeyname );
|
||||||
|
}
|
||||||
this.doDeploy( file, project, artifactId, handler, version, type, gpgSkip.booleanValue(), gpgPassphrase,
|
this.doDeploy( file, project, artifactId, handler, version, type, gpgSkip.booleanValue(), gpgPassphrase,
|
||||||
gpgUseagent.booleanValue(), gpgKeyname );
|
gpgUseagent.booleanValue(), gpgKeyname );
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,9 @@
|
|||||||
<author email="vmassol@apache.org">Vincent Massol</author>
|
<author email="vmassol@apache.org">Vincent Massol</author>
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<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">
|
<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="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>
|
<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