Monday, April 18, 2016

In some cases if you are using gpg plugin to sign your artifacts you might get the following error and the build will fail.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project testng-parser: Exit code: 2

If you get the above error there are few ways to skip artifact signing and carryout your build.

Method 1 : Editing your POM

You can disable the gbp plugin from the POM or skip the signing of artifacts. Refer the following.


Method 2 : Disabling at runtime

You can also disable gpg signing at runtime by running the mvn build with following parameter.

mvn clean install -Dgpg.skip

Or as

mvn clean install -Dgpg.skip=true

So that's it, please drop a comment if you have any questions.


Post a Comment

Subscribe to RSS Feed Follow me on Twitter!