Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish jib-gradle plugin on jcenter/mavenCentral #1004

Closed
danielpetisme opened this issue Sep 18, 2018 · 4 comments
Closed

Publish jib-gradle plugin on jcenter/mavenCentral #1004

danielpetisme opened this issue Sep 18, 2018 · 4 comments

Comments

@danielpetisme
Copy link

Description of the issue:
I'm trying to integrate jib into the vertx-gradle-plugin and when gradle tries to resolve jib-gradle-plugin as a dependency (not as a plugin) it fails to find the component in jcenter/mavenCentral (the common repos used for java dependencies).

The plugin seems only hosted on gradlePluginPortal().

I'm currently trying a workaround to programatically add the gradlePluginPortal() to the user build in order to properly resolve but it IMHO it looks bad.

Expected behavior:
The jib-gradle-plugin should be available in the common repos (BTW, the jib-maven-plugin is already present in jcenter() - https://bintray.com/bintray/jcenter/com.google.cloud.tools%3Ajib-maven-plugin)

Steps to reproduce:
Create a Gradle project and add jib-gradle-plugin as a dependency

jib-gradle-plugin Configuration:

repositories {
  jcenter()
  mavenCentral()
}

version = '0.0.1-SNAPSHOT'
group = 'com.acme'

dependencies {
...
  implementation 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:0.9.10'
...
}

Log output:

Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:0.9.10.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/google/cloud/tools/jib/com.google.cloud.tools.jib.gradle.plugin/0.9.10/com.google.cloud.tools.jib.gradle.plugin-0.9.10.pom
       - https://jcenter.bintray.com/com/google/cloud/tools/jib/com.google.cloud.tools.jib.gradle.plugin/0.9.10/com.google.cloud.tools.jib.gradle.plugin-0.9.10.jar
       - https://repo.maven.apache.org/maven2/com/google/cloud/tools/jib/com.google.cloud.tools.jib.gradle.plugin/0.9.10/com.google.cloud.tools.jib.gradle.plugin-0.9.10.pom
       - https://repo.maven.apache.org/maven2/com/google/cloud/tools/jib/com.google.cloud.tools.jib.gradle.plugin/0.9.10/com.google.cloud.tools.jib.gradle.plugin-0.9.10.jar     
     Required by:
         project :

Additional Information:

@coollog
Copy link
Contributor

coollog commented Sep 20, 2018

Hi @danielpetisme, thanks for reporting this issue. Would adding the Gradle Plugin repo as a Maven repository work for your case?

repositories {
  maven {
    url "https://plugins.gradle.org/m2/"
  }
}

@loosebazooka

@coollog coollog added this to the v0.10.0 milestone Sep 20, 2018
@danielpetisme
Copy link
Author

hum... Looks live https://plugins.gradle.org/m2/ tries to fallback to jcenter (and fail)
I'm not sure of the difference between gradlePluginPortal() and maven { url "https://plugins.gradle.org/m2/" }

Do you have any clue?

@coollog
Copy link
Contributor

coollog commented Sep 24, 2018

Hmm, this might just be because using the Gradle plugin as a source code dependency is not a supported use case. We are currently actively working on building out Jib Core as a library, so once that is ready, we will publish it to Maven Central and you can use it as a library for the vertx-gradle-plugin. It will also be much easier to use since it will have a much more polished API than what you'll get by just depending on jib-gradle-plugin. The original issue is at #337 and the tracking project is https://github.com/GoogleContainerTools/jib/projects/7.

@coollog coollog modified the milestones: v0.10.0, v0.11.0 Sep 24, 2018
@coollog
Copy link
Contributor

coollog commented Nov 9, 2018

Hi @danielpetisme , we have released an initial alpha version of Jib Core. Let us know if it suits your use case.

@coollog coollog closed this as completed Nov 9, 2018
@chanseokoh chanseokoh removed this from the v1.1.0 milestone Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants