# Gradle publish-plugin fails if the artifacts are signed

**URL:** <https://discuss.gradle.org/t/gradle-publish-plugin-fails-if-the-artifacts-are-signed/9197>\
**Category:** Bugs\
**Tags:** gradle-3285, issue-acknowledged\
**Created:** [April 18, 2015, 11:41pm UTC](https://discuss.gradle.org/t/gradle-publish-plugin-fails-if-the-artifacts-are-signed/9197 "2015-04-18T23:41:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uglyog](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/uglyog/32/2249_2.png) [@uglyog](https://discuss.gradle.org/u/uglyog)\
**Post date:** [April 18, 2015, 11:41pm UTC](https://discuss.gradle.org/t/gradle-publish-plugin-fails-if-the-artifacts-are-signed/9197/1 "2015-04-18T23:41:44Z")

</div>

Gradle publish-plugin fails to publish if the artefacts in the project are signed. The signing plugin generates GPG signatures for all artefacts with an asc extension, which causes the publish plugin to fail.

It would be preferable to issue a warning and ignore any unknown artefacts instead of failing, so that plugins can still be published to the plugin portal.

error message:

```
* What went wrong:
Execution failed for task ':pact-jvm-provider-gradle_2.11:publishPlugins'.
    > Unknown artifact type with extension "asc" and classifier ""
You can only upload normal jars, sources jars, javadoc jars and groovydoc jars
to the plugin portal at this time.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':pact-jvm-provider-gradle_2.11:publishPlugins'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
...
Caused by: java.lang.IllegalArgumentException: Unknown artifact type with extension "asc" and classifier ""
You can only upload normal jars, sources jars, javadoc jars and groovydoc jars
to the plugin portal at this time. 
    at com.gradle.publish.PublishTask.addAndHashArtifact(PublishTask.java:188)
    at com.gradle.publish.PublishTask.addAndHashArtifact(PublishTask.java:175)
    at com.gradle.publish.PublishTask.collectArtifacts(PublishTask.java:235)
    at com.gradle.publish.PublishTask.publish(PublishTask.java:66)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
```

---

<div class="post-metadata">

**Author:** ![tomd](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/tomd/32/1973_2.png) [@tomd](https://discuss.gradle.org/u/tomd)\
**Post date:** [April 20, 2015, 1:47am UTC](https://discuss.gradle.org/t/gradle-publish-plugin-fails-if-the-artifacts-are-signed/9197/2 "2015-04-20T01:47:56Z")

</div>

Yes, we need to fix this one way or the other. Raised as [GRADLE-3285](https://issues.gradle.org/browse/GRADLE-3285). Thanks for the report!

---

<div class="post-metadata">

**Author:** ![jaredsburrows](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jaredsburrows/32/9019_2.png) [@jaredsburrows](https://discuss.gradle.org/u/jaredsburrows)\
**Post date:** [June 25, 2016, 2:53am UTC](https://discuss.gradle.org/t/gradle-publish-plugin-fails-if-the-artifacts-are-signed/9197/3 "2016-06-25T02:53:22Z")

</div>

I would really like to get this plugin: [https://github.com/KeepSafe/dexcount-gradle-plugin](https://github.com/KeepSafe/dexcount-gradle-plugin) uploaded to the plugins repo. What is the status of this bug?

---

<div class="post-metadata">

**Author:** ![uglyog](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/uglyog/32/2249_2.png) [@uglyog](https://discuss.gradle.org/u/uglyog)\
**Post date:** [June 25, 2016, 4:24am UTC](https://discuss.gradle.org/t/gradle-publish-plugin-fails-if-the-artifacts-are-signed/9197/4 "2016-06-25T04:24:00Z")

</div>

This works now for me, even with the raised defect still marked as open. Not sure if it was fixed or a later gradle version made the condition go away.
