Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin

I am trying to build from Druid 0.15.1 source and when I run this command

mvn clean install -Papache-release,dist,rat -DskipTest

``

I get the the following error:

[INFO] maven-gpg-plugin:1.6:sign (sign-release-artifacts) @ druid ** —**

gpg: no default secret key: No secret key

gpg: signing failed: No secret key

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary for Druid 0.15.2-incubating-SNAPSHOT:

[INFO]

[INFO] Druid … FAILURE [ 7.003 s]

[INFO] druid-core … SKIPPED

[INFO] druid-hll … SKIPPED

[INFO] extendedset … SKIPPED

[INFO] druid-processing … SKIPPED

[INFO] druid-aws-common … SKIPPED

[INFO] druid-gcp-common … SKIPPED

[INFO] druid-console … SKIPPED

[INFO] druid-server … SKIPPED

[INFO] druid-examples … SKIPPED

[INFO] druid-indexing-hadoop … SKIPPED

[INFO] druid-indexing-service … SKIPPED

[INFO] druid-sql … SKIPPED

[INFO] druid-services … SKIPPED

[INFO] druid-s3-extensions … SKIPPED

[INFO] druid-datasketches … SKIPPED

[INFO] druid-histogram … SKIPPED

[INFO] mysql-metadata-storage … SKIPPED

[INFO] druid-kafka-indexing-service … SKIPPED

[INFO] druid-basic-security … SKIPPED

[INFO] druid-lookups-cached-global … SKIPPED

[INFO] simple-client-sslcontext … SKIPPED

[INFO] druid-integration-tests … SKIPPED

[INFO] druid-benchmarks … SKIPPED

[INFO] druid-avro-extensions … SKIPPED

[INFO] druid-bloom-filter … SKIPPED

[INFO] druid-kerberos … SKIPPED

[INFO] druid-hdfs-storage … SKIPPED

[INFO] druid-stats … SKIPPED

[INFO] druid-kafka-eight … SKIPPED

[INFO] druid-kafka-extraction-namespace … SKIPPED

[INFO] druid-kinesis-indexing-service … SKIPPED

[INFO] druid-orc-extensions … SKIPPED

[INFO] druid-parquet-extensions … SKIPPED

[INFO] postgresql-metadata-storage … SKIPPED

[INFO] druid-protobuf-extensions … SKIPPED

[INFO] druid-lookups-cached-single … SKIPPED

[INFO] druid-ec2-extensions … SKIPPED

[INFO] druid-google-extensions … SKIPPED

[INFO] druid-influx-extensions … SKIPPED

[INFO] druid-azure-extensions … SKIPPED

[INFO] druid-cassandra-storage … SKIPPED

[INFO] druid-rocketmq … SKIPPED

[INFO] druid-cloudfiles-extensions … SKIPPED

[INFO] graphite-emitter … SKIPPED

[INFO] druid-kafka-eight-simple-consumer … SKIPPED

[INFO] druid-rabbitmq … SKIPPED

[INFO] druid-distinctcount … SKIPPED

[INFO] statsd-emitter … SKIPPED

[INFO] druid-time-min-max … SKIPPED

[INFO] druid-virtual-columns … SKIPPED

[INFO] druid-thrift-extensions … SKIPPED

[INFO] ambari-metrics-emitter … SKIPPED

[INFO] sqlserver-metadata-storage … SKIPPED

[INFO] kafka-emitter … SKIPPED

[INFO] druid-redis-cache … SKIPPED

[INFO] druid-opentsdb-emitter … SKIPPED

[INFO] materialized-view-maintenance … SKIPPED

[INFO] materialized-view-selection … SKIPPED

[INFO] druid-momentsketch … SKIPPED

[INFO] druid-moving-average-query … SKIPPED

[INFO] distribution … SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 7.422 s

[INFO] Finished at: 2020-03-26T12:59:37-05:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-release-artifacts) on project druid: Exit code: 2 -> [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/MojoExecutionException

``

You might need to import keys from here : https://dist.apache.org/repos/dist/release/incubator/druid/KEYS

And, if you just want to build artifacts, you could also do mvn clean install -Pdist -Dtar

Hello Surekha,

I imported the keys(gpg --import KEYS.txt) from the link. I can also confirm it using gpg --list-keys. I still get the same error when I try to run mvn clean install -Papache-release,dist,rat -DskipTests. Can you help me out here please. Thanks

Hi Tanmay,

Are you still getting

gpg: no default secret key: No secret key gpg: signing failed: No secret key

or some other error message?

If you don’t care about the signed keys, you could skip this by adding these flags
-Dgpg.skip -Darguments=-Dgpg.skip

You can find more info here : https://www.apache.org/dev/openpgp.html

Hope this helps

Surekha

Hi Surekha,

Yes getting the same error. Will check open pgp surely. thanks.