Could not resolve com.terrafolio:gradle-jenkins-plugin:1.+'

Hi,

I am trying to configure the Jenkins Job in Gradle build. But I am unable to access the Gradle-Jenkins-Plugin. I am Getting the Following error. Please Help.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘Demo_Job’.
    Could not resolve all dependencies for configuration ‘:classpath’.

    Could not resolve com.terrafolio:gradle-jenkins-plugin:1.+.
    Required by:
    :Demo_Job:unspecified
    Could not resolve com.terrafolio:gradle-jenkins-plugin:1.+.
    Failed to list versions for com.terrafolio:gradle-jenkins-plugin.
    Unable to load Maven meta-data from https://plugins.gradle.org/m2/
    com/terrafolio/gradle-jenkins-plugin/maven-metadata.xml.
    Could not GET ‘https://plugins.gradle.org/m2/com/terrafolio/gra
    dle-jenkins-plugin/maven-metadata.xml’.
    peer not authenticated

Hi @SabareeshSS

Would you mind just trying again? I tried accessing https://plugins.gradle.org/m2/com/terrafolio/gradle-jenkins-plugin/maven-metadata.xml and for me it works. Hopefully it was intermittent.

Hi @arve_knudsen arve_knudsen, The link is not accessibe!!

Are you on a company network? It sounds like you might be blocked from accessing the URL at your location.

The link posted by arve_knudsen works fine for me as well.

Hi @SabareeshSS
I also tried this out and the link also seems to be working here. The ‘peer not authenticated’ part in the output seems suspiciously linked to some sort of SSL issue (which again might be linked to you being on a company network as @jjustinc mentions). To be able to debug further I suppose I would try to curl/download the file manually on the network you experience the issue.

In general, I would say that it is probably not a good idea to use dynamic versions (1.+), unless you need to test the bleeding edge use case.
Use the latest version (1.3.1 at the time of writing) which you always can find here: https://plugins.gradle.org/plugin/com.terrafolio.jenkins

There’s also a known issue related to maven-metadata.xml because the plugin portal does not currently support them which makes the portal redirect to bintray where the latest version is 1.2.3 not 1.3.1.

Hopefully sometime in the future this will be resolved, but, again, I would recommend that you do not use dynamic versions at all.

Yes I am in company network and the webpage is not loaded turned out to be ERR_Tunnel_Connection_Failed. I am still looking for a work around.

Thanks a lot for your suggestions, which are very valid and helpful for me. If you found any solutions to resolve please help. Because not only this plugin i tried with Cargo, jacoco plugins resulted in same error.

It’s almost impossible for us to diagnose a problem that you’re experiencing trying access a URL from inside your company network that is working fine outside of it. You should seek support for why you can’t access these URLs and how to address it from your company’s IT support.