Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) #495

Open
subhabm opened this issue Aug 20, 2020 · 4 comments · May be fixed by #500
Open

Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) #495

subhabm opened this issue Aug 20, 2020 · 4 comments · May be fixed by #500

Comments

@subhabm
Copy link

subhabm commented Aug 20, 2020

I just cloned the project to mvn clean install
At first I had to change maven-compiler-plugin source and target from 1.6 to 1.7 as 1.6 is no longer supported.
Now I am getting the exception while trying to install.

Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project metadata-extractor: Exit code: 2 ->

@9037568
Copy link

9037568 commented Sep 20, 2020

Think I'm seeing the same. Building on Win 10 I get this exception:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project metadata-extractor: Unable to execute gpg command: Error while executing process. Cannot run program "gpg.exe": CreateProcess error=2, The system cannot find the file specified -> [Help 1]

I was able to fix the build by commenting out lines 180-193 in pom.xml.

@Nadahar
Copy link
Contributor

Nadahar commented Sep 20, 2020

The gpg plugin should probably be put in a Maven profile, so that it would only run if said profile was explicitly invoked.

Example:

mvn package -Psign

9037568 added a commit to 9037568/metadata-extractor that referenced this issue Sep 21, 2020
Put the gpg plugin into a profile named 'sign', so that it only runs
when invoked.

e.g. `mvn package -Psign`

Fixes drewnoakes#495.
@9037568 9037568 linked a pull request Sep 21, 2020 that will close this issue
@9037568
Copy link

9037568 commented Sep 21, 2020

Thanks, @Nadahar . I've attempted your suggestion.

@Nadahar
Copy link
Contributor

Nadahar commented Sep 21, 2020

I guess @drewnoakes will have to actually test if the signing is working as intended with this PR. It looks sound to me at a glance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants