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

1.6.0 not available in plugins.gradle.org/m2 #15

Closed
bezda opened this issue Aug 17, 2018 · 8 comments
Closed

1.6.0 not available in plugins.gradle.org/m2 #15

bezda opened this issue Aug 17, 2018 · 8 comments

Comments

@bezda
Copy link

bezda commented Aug 17, 2018

The version 1.6.0 of the plugin is not accessible

https://plugins.gradle.org/m2/gradle/plugin/com/google/gradle/osdetector-gradle-plugin/1.6.0/

osdetector-gradle-plugin-1.6.0.jar

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>
gradle.plugin.com.google.gradle/osdetector-gradle-plugin/1.6.0/e074d3daa0ca0e5a0c6e2c98fcd9da6645ac520c8d091612ae58bdcde65d0585/osdetector-gradle-plugin-1.6.0.jar
</Key>
<RequestId>3C8CE86E331C7F5E</RequestId>
<HostId>
4KAux3R5OCNzgq4rDdQPaU6tU9amZxTb07yxbCtddy0wnL7XGbWItn5hCbq51oh5
</HostId>
</Error>
@tiainen
Copy link

tiainen commented Sep 20, 2018

I can confirm this. It is not possible to apply the plugin with a plugins {} block using version 1.6.0. This results in the following build failure:

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find gradle.plugin.com.google.gradle:osdetector-gradle-plugin:1.6.0.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/gradle/plugin/com/google/gradle/osdetector-gradle-plugin/1.6.0/osdetector-gradle-plugin-1.6.0.pom
       - https://plugins.gradle.org/m2/gradle/plugin/com/google/gradle/osdetector-gradle-plugin/1.6.0/osdetector-gradle-plugin-1.6.0.jar
     Required by:
         project : > com.google.osdetector:com.google.osdetector.gradle.plugin:1.6.0

@normano
Copy link

normano commented Oct 17, 2018

Resolved it putting this in settings.gradle

pluginManagement {
  repositories {
    mavenCentral()
    gradlePluginPortal()
  }

  resolutionStrategy {
    eachPlugin {

      if(requested.id.namespace == 'com.google' && requested.id.name == 'osdetector') {
        useModule 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
      }
    }
  }
}

@aalmiray
Copy link

aalmiray commented Dec 6, 2018

Please refer to https://docs.gradle.org/current/userguide/java_gradle_plugin.html and configure the java-gradle-plugin plugin in this build. The problem is caused by missing metadata that this plugin can generate.

@brunoborges
Copy link

Hey @zhangkun83, any chance to get this fixed?

@zhangkun83
Copy link
Collaborator

Checked the jar files of 1.4.0 and 1.6.0, didn't find anything different in their metadata. I added java-gradle-plugin and built a jar, and resulted in the same metadata.

Found related issue on the forum:
https://discuss.gradle.org/t/error-nosuchkey-for-plugin-https-plugins-gradle-org-m2-org-standardout-gradle-eclipseconfig-1-1-1/29338

Although I doubt this issue is due to the build file, I will add java-gradle-plugin to the build file and do a new release.

@aalmiray
Copy link

The missing metadata is not supposed to be located inside the plugin JAR file but rather as a separate POM file that’s published alongside said JAR. This additional POM is generated by the java-gradle-plugin and published by the the plugin-publish plugin, like the plugin development guide explains.

@zhangkun83
Copy link
Collaborator

I have released 1.6.1. I successfully downloaded files under

https://plugins.gradle.org/m2/gradle/plugin/com/google/gradle/osdetector-gradle-plugin/1.6.1/

Looks like the issue is resolved. Please reopen it if it's not the case.

@aalmiray
Copy link

Thank you very much for looking at this issue and providing a fix! ! :-)

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

6 participants