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.<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-gpg-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin>
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.
Astounding post, proceeded and bookmarked your site. I can hardly wait to peruse more from you.
ReplyDeleteSkip Hire Dublin