Author: ltheussl Date: Wed May 16 02:30:20 2007 New Revision: 538499 URL: http://svn.apache.org/viewvc?view=rev&rev=538499 Log: PR: MPARTIFACT-76 Don't ask for passphrase if maven.artifact.gpg.skip=true.
Modified: maven/maven-1/plugins/trunk/artifact/project.xml maven/maven-1/plugins/trunk/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml Modified: maven/maven-1/plugins/trunk/artifact/project.xml URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/artifact/project.xml?view=diff&rev=538499&r1=538498&r2=538499 ============================================================================== --- maven/maven-1/plugins/trunk/artifact/project.xml (original) +++ maven/maven-1/plugins/trunk/artifact/project.xml Wed May 16 02:30:20 2007 @@ -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> Modified: maven/maven-1/plugins/trunk/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java?view=diff&rev=538499&r1=538498&r2=538499 ============================================================================== --- maven/maven-1/plugins/trunk/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java (original) +++ maven/maven-1/plugins/trunk/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java Wed May 16 02:30:20 2007 @@ -115,14 +115,17 @@ throws MavenException { Boolean gpgSkip = Boolean.valueOf( (String) project.getContext().getVariable( "maven.artifact.gpg.skip" ) ); - String gpgPassphrase; - try - { - gpgPassphrase = getPassphrase( project ); - } - catch ( IOException e ) + String gpgPassphrase = null; + if ( !gpgSkip.booleanValue() ) { - 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 @@ { 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 ); Modified: maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml?view=diff&rev=538499&r1=538498&r2=538499 ============================================================================== --- maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml (original) +++ maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml Wed May 16 02:30:20 2007 @@ -25,6 +25,9 @@ <author email="[EMAIL PROTECTED]">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>