scala-ide/scala-refactoring

scala-refactoring asks for my gpg passphrase when building locally

huitseeker opened this issue · 1 comments

Building with the command :

 ./build-all.sh -e -X -P scala-2.10.x clean install       

I get :

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-gpg-plugin:1.4:sign (sign-artifacts) @ org.scala-refactoring ---
[DEBUG] org.apache.maven.plugins:maven-gpg-plugin:jar:1.4:
[DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-project:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-settings:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-profile:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
[DEBUG]          org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-artifact:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-model:jar:2.0.6:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-gpg-plugin:1.4
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-gpg-plugin:1.4
[DEBUG]   Imported:  < project>org.scala-refactoring:org.scala-refactoring:0.6.1-SNAPSHOT
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-gpg-plugin:1.4
[DEBUG]   Included: org.apache.maven.plugins:maven-gpg-plugin:jar:1.4
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.6
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-gpg-plugin:1.4:sign from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-gpg-plugin:1.4, parent: sun.misc.Launcher$AppClassLoader@6d6f0472]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-gpg-plugin:1.4:sign' with basic configurator -->
[DEBUG]   (f) ascDirectory = /home/huitseeker/Scala/scala-refactoring/target/gpg
[DEBUG]   (f) defaultKeyring = true
[DEBUG]   (f) interactive = true
[DEBUG]   (f) project = MavenProject: org.scala-refactoring:org.scala-refactoring:0.6.1-SNAPSHOT @ /home/huitseeker/Scala/scala-refactoring/pom.xml
[DEBUG]   (f) skip = false
[DEBUG]   (f) useAgent = false
[DEBUG] -- end configuration --
[DEBUG] Extension realms for project org.sonatype.oss:oss-parent:pom:7: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
GPG Passphrase:

This is because, IIUC, maven includes the gpg plugin as a top plugin, which makes it sign artifacts from scala-refactoring by default. Please wrap the plugin configuration in a profile, so that only specific profiles require the signature. Default, local publishing shouldn't be signed, if only because it hinders automation. See the related flamewar re: requiring signatures on publish-local for sbt.

Good idea, I've added a profile that enabled signing.