Thanks Stephen, that got me past the gpg signing problem. I still think the
cmd-line properties should be propagated though :-)
Now I'm getting a 400-Bad Request error when maven tries to download
something from the Sonatype parent when I do the release. Has anyone seen
this error? Since all of the reports/site plugin ran successfully on the
snapshot, does it matter if I just disable them for the release goal?
[INFO] <<< maven-plugin-plugin:3.2:report (report:report) @
idfc-proguard-maven-plugin <<<
[INFO] Parent project loaded from repository:
org.sonatype.oss:oss-parent:pom:7
Downloading:
https://oss.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/os
s/oss-parent/7/oss-parent-7-site_en.xml
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 31.175s
[INFO] Finished at: Thu Jul 18 10:16:19 EDT 2013
[INFO] Final Memory: 31M/75M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on
project idfc-proguard-maven-plugin: SiteToolException: The site descriptor
cannot be resolved from the repository: ArtifactResolutionException: Unable
to locate site descriptor: Could not transfer artifact
org.sonatype.oss:oss-parent:xml:site_en:7 from/to oss.sonatype.org
(https://oss.sonatype.org/service/local/staging/deploy/maven2/): Failed to
transfer file:
https://oss.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/os
s/oss-parent/7/oss-parent-7-site_en.xml. Return code is: 400 ,
ReasonPhrase:Bad Request.
[ERROR] org.sonatype.oss:oss-parent:xml:7
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] oss.sonatype.org
(https://oss.sonatype.org/service/local/staging/deploy/maven2/,
releases=true, snapshots=true),
[ERROR] sonatype-nexus-snapshots
(https://oss.sonatype.org/content/repositories/snapshots, releases=false,
snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true,
snapshots=false)
[ERROR] -> [Help 1]
-----Original Message-----
From: Stephen Connolly [mailto:[email protected]]
Sent: Thursday, July 18, 2013 7:10 AM
To: Maven Users List
Subject: Re: executing release:prepare with release-sign-artifacts
I have the following <profile> in my ~/.m2/settings.xml
<profile>
<id>sonatype-oss-release</id>
<properties>
<gpg.passphrase><!-- I am not going top copy & paste this
bit--></gpg.passphrase>
<gpg.keyname>[email protected]</gpg.keyname>
</properties>
</profile>
That means that any time I make a release which has the sonatype-oss-parent
as its parent, then it gets signed with my personal key.
For other projects which need a different key, I get them to use a different
profile for releasing and I then have that different key get selected.
I do worry about the passphrase being in clear text... but as my GPG keys
for signing are on a USB stick and not permanently connected to the machine
it seems an acceptable trade-off from my PoV
On 17 July 2013 23:02, Richard Sand <[email protected]> wrote:
> Hi all,
>
> Trying to move this obfuscation plugin along. I have the snapshot in
> the OSS Sonatype snapshot repository now:
>
>
> https://oss.sonatype.org/content/repositories/snapshots/com/idfconnect
> /devto ols/idfc-proguard-maven-plugin/0.8.0-SNAPSHOT/
>
> Now I'm trying to release 0.8.0, however when I run maven
> release:prepare, I'm getting an exception when it gets to the sign
artifacts goal.
>
> The problem seems to be caused by the fact that "release:prepare"
> forks a separate maven invocation, but isn't passing along the
> command-line java properties into that forked invocation.
>
> When I call "maven deploy", I am passing in the password to my pgp.
> Maven deploy works perfect, and puts the result SNAPSHOT artifact onto
OSS:
>
> mvn -DperformRelease=true -Dgpg.passphrase=***** -B -X -e -U
> -Dmaven.test.skip=true -s "C:\Documents and
> Settings\rsand\.m2\settings.xml"
> clean deploy
>
> But when I call "maven release:prepare" with the same arguments, the
> forked maven execution fails because it cannot prompt for the gpg
passphrase:
>
> mvn -DperformRelease=true -Dgpg.passphrase=***** -B -X -e -U
> -Dmaven.test.skip=true -s "C:\Documents and
> Settings\rsand\.m2\settings.xml"
> release:prepare
>
> You can see the regular output below. The debug mode output is much
> larger and shows all of the invocation properties.
>
> [INFO] --- maven-release-plugin:2.0:prepare (default-cli) @
> idfc-proguard-maven-plugin --- [INFO] Resuming release from phase
> 'run-preparation-goals'
> [INFO] Executing goals 'clean verify'...
> [INFO] [INFO] Scanning for projects...
> [INFO] [INFO]
>
> [INFO] [INFO]
> ----------------------------------------------------------------------
> -- [INFO] [INFO] Building IDFC ProGuard Maven Plugin 0.8.0-SNAPSHOT
> [INFO] [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] [INFO]
> [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @
> idfc-proguard-maven-plugin --- [INFO] [INFO] Deleting
> D:\dev\workspace\IDFC ProGuard Maven Plugin\target [INFO] [INFO]
> [INFO] [INFO] --- maven-plugin-plugin:3.2:helpmojo (help-goal) @
> idfc-proguard-maven-plugin --- [INFO] [INFO] Using 'UTF-8' encoding to
> read mojo metadata.
> [INFO] [INFO] Applying mojo extractor for language: java-annotations
> [INFO] [INFO] Mojo extractor for language: java-annotations found 0
> mojo descriptors.
> [INFO] [INFO] Applying mojo extractor for language: java [INFO] [INFO]
> Mojo extractor for language: java found 0 mojo descriptors.
> [INFO] [INFO] Applying mojo extractor for language: bsh [INFO] [INFO]
> Mojo extractor for language: bsh found 0 mojo descriptors.
> [INFO] [INFO]
> [INFO] [INFO] --- maven-plugin-plugin:3.2:descriptor
> (default-descriptor) @ idfc-proguard-maven-plugin --- [INFO] [INFO]
> Using 'UTF-8' encoding to read mojo metadata.
> [INFO] [INFO] Applying mojo extractor for language: java-annotations
> [INFO] [INFO] Mojo extractor for language: java-annotations found 0
> mojo descriptors.
> [INFO] [INFO] Applying mojo extractor for language: java [INFO] [INFO]
> Mojo extractor for language: java found 0 mojo descriptors.
> [INFO] [INFO] Applying mojo extractor for language: bsh [INFO] [INFO]
> Mojo extractor for language: bsh found 0 mojo descriptors.
> [INFO] [INFO]
> [INFO] [INFO] --- maven-resources-plugin:2.5:resources
> (default-resources) @ idfc-proguard-maven-plugin --- [INFO] [debug]
> execute contextualize [INFO] [INFO] Using 'UTF-8' encoding to copy
> filtered resources.
> [INFO] [INFO] skip non existing resourceDirectory
> D:\dev\workspace\IDFC ProGuard Maven Plugin\src\main\resources [INFO]
> [INFO] [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile
> (default-compile) @ idfc-proguard-maven-plugin --- [INFO] [INFO]
> Compiling 2 source files to D:\dev\workspace\IDFC ProGuard Maven
> Plugin\target\classes [INFO] [INFO] [INFO] [INFO] ---
> maven-plugin-plugin:3.2:descriptor (mojo-descriptor) @
> idfc-proguard-maven-plugin --- [INFO] [INFO] Using 'UTF-8' encoding to
> read mojo metadata.
> [INFO] [INFO] Applying mojo extractor for language: java-annotations
> [INFO] [INFO] Mojo extractor for language: java-annotations found 2
> mojo descriptors.
> [INFO] [INFO] Applying mojo extractor for language: java [INFO] [INFO]
> Mojo extractor for language: java found 0 mojo descriptors.
> [INFO] [INFO] Applying mojo extractor for language: bsh [INFO] [INFO]
> Mojo extractor for language: bsh found 0 mojo descriptors.
> [INFO] [INFO]
> [INFO] [INFO] --- maven-resources-plugin:2.5:testResources
> (default-testResources) @ idfc-proguard-maven-plugin --- [INFO]
> [debug] execute contextualize [INFO] [INFO] Using 'UTF-8' encoding to
> copy filtered resources.
> [INFO] [INFO] skip non existing resourceDirectory
> D:\dev\workspace\IDFC ProGuard Maven Plugin\src\test\resources [INFO]
> [INFO] [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile
> (default-testCompile) @ idfc-proguard-maven-plugin --- [INFO] [INFO]
> Nothing to compile - all classes are up to date [INFO] [INFO] [INFO]
> [INFO] --- maven-surefire-plugin:2.10:test (default-test) @
> idfc-proguard-maven-plugin --- [INFO] [INFO] No tests to run.
> [INFO] [INFO] Surefire report directory: D:\dev\workspace\IDFC
> ProGuard Maven Plugin\target\surefire-reports [INFO] [INFO]
> -------------------------------------------------------
> [INFO] T E S T S
> [INFO] -------------------------------------------------------
> [INFO]
> [INFO] Results :
> [INFO]
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO]
> [INFO] [INFO] [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @
> idfc-proguard-maven-plugin --- [INFO] [INFO] Building jar:
> D:\dev\workspace\IDFC ProGuard Maven
> Plugin\target\idfc-proguard-maven-plugin-0.8.0-SNAPSHOT.jar
> [INFO] [INFO]
> [INFO] [INFO] --- maven-plugin-plugin:3.2:addPluginArtifactMetadata
> (default-addPluginArtifactMetadata) @ idfc-proguard-maven-plugin ---
> [INFO] [INFO] [INFO] [INFO] --- maven-gpg-plugin:1.1:sign
> (sign-artifacts) @ idfc-proguard-maven-plugin --- [INFO] [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] [INFO] BUILD FAILURE
> [INFO] [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] [INFO] Total time: 2.984s
> [INFO] [INFO] Finished at: Wed Jul 17 17:57:58 EDT 2013 [INFO] [INFO]
> Final Memory: 13M/32M [INFO] [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-gpg-plugin:1.1:sign (sign-artifacts) on
> project idfc-proguard-maven-plugin: Cannot obtain passphrase in batch
> mode
> -> [Help 1]
> [INFO] [ERROR]
> [INFO] [ERROR] To see the full stack trace of the errors, re-run Maven
> with the -e switch.
> [INFO] [ERROR] Re-run Maven using the -X switch to enable full debug
> logging.
> [INFO] [ERROR]
> [INFO] [ERROR] For more information about the errors and possible
> solutions, please read the following articles:
> [INFO] [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] BUILD FAILURE
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Total time: 4.891s
> [INFO] Finished at: Wed Jul 17 17:57:58 EDT 2013 [INFO] Final Memory:
> 8M/19M [INFO]
> ----------------------------------------------------------------------
> --
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-release-plugin:2.0:prepare
> (default-cli) on project idfc-proguard-maven-plugin: Maven execution
failed, exit code: '1'
> -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with
> the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionExceptio
> n
>
>
> Thanks for any help!
>
> -Richard
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]