Cannot resolve artifacts for custom plugin published to the Plugin Portal


(Google Cloud Tools for Java Team) #1

Hi, I am having trouble using a plugin published to the Gradle Plugin Portal. Specifically, the plugin is published at https://plugins.gradle.org/plugin/com.google.cloud.tools.jib.

I published the plugin by adding id 'com.gradle.plugin-publish' version '0.9.10' to the plugins of the build.gradle and running ./gradlew publishPlugins:

> Task :publishPlugins 
Publishing plugin com.google.cloud.tools.jib version 0.1.0
Publishing artifact build/libs/jib-gradle-plugin-0.1.0.jar
Publishing artifact build/libs/jib-gradle-plugin-0.1.0-sources.jar
Publishing artifact build/libs/jib-gradle-plugin-0.1.0-javadoc.jar
Activating plugin com.google.cloud.tools.jib version 0.1.0

The plugin shows up on the Gradle Plugin Portal (https://plugins.gradle.org/plugin/com.google.cloud.tools.jib), but when I try to use the plugin in another project by adding id 'com.google.cloud.tools.jib' version '0.1.0' to the plugins of the build.gradle, Gradle fails to configure with:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'data'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find jib-gradle-plugin.jar (gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:0.1.0).
     Searched in the following locations:
         https://plugins.gradle.org/m2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/0.1.0/jib-gradle-plugin-0.1.0.jar

It looks like https://repo.jfrog.org/artifactory/libs-release-bintray/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/0.1.0/ is empty.

Thanks for your help.


(Eric Wendelin) #2

Hmm, that URL (https://plugins.gradle.org/m2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/0.1.0/jib-gradle-plugin-0.1.0.jar) resolves correctly for me, including if I add this to a build.gradle file:

plugins {
  id "com.google.cloud.tools.jib" version "0.1.0"
}

Note that this plugin seems to have been uploaded to the Gradle Plugin Portal, and is not synced from Bintray.

Do you have any pluginManagement {} configuration or HTTP firewall restrictions that would prevent https://plugins.gradle.org/m2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/0.1.0/jib-gradle-plugin-0.1.0.jar which redirects to https://plugins-artifacts.gradle.org/gradle.plugin.com.google.cloud.tools/jib-gradle-plugin/0.1.0/03fc6c2c589f22e94d988d5a7cb86ca5aaa4bd83c9b40d7e5a3a1a7e0cddc577/jib-gradle-plugin-0.1.0.jar which is stored on S3 from being resolved?

[EDIT]: I tested this with Gradle 4.6. Which version of Gradle are you using?


(Google Cloud Tools for Java Team) #3

Hey Eric,

Thanks for replying. It looks like it is working now as you mentioned. Perhaps it just took some time to propagate?

Thanks.


(Eric Wendelin) #4

You’re welcome. I’m sorry it did not work as you expected. There should only be any delay if it’s a completely new plugin.

I’m very happy to see your plugins on the Plugin Portal — thank you!


(Google Cloud Tools for Java Team) #5

Thanks for the clarification!