How to mirror the gradle services for internal distributions

Hi,

regarding What happens when services.gradle.org does down?
is there a way, and if which ones to set up a mirror of services.gradle.org?
And yes, a transparent web proxy would be a solution, but I think more at s.th. like a artifactory.

Goals to archive:

~childNo͡.de

1 Like

We do this with Nexus. Nexus has a raw (proxy) repository type. The generic type should be similar in Artifactory. Prior to the raw type existing, we used the Maven repository type and just disabled the metadata features. Either should work.

We have one repository for /distributions and another for /distributions-snapshots, not services as a whole. The end result is we see each Gradle version cached with metrics like any other artifact.

ok, seems to I’m to stupid for nexus … how can you add a raw type, there is a mandatory type selection maven, nuGet, … adding a proxy with maven type, disabled remote indices but nothing happens on downloading via nexus … just connection pends endless?!

You must be running Nexus 2.x. The raw (proxy) type was added in Nexus 3. Here’s what worked for us before we upgraded (I recreated the settings locally just now):

Visited here in a browser: http://localhost:8081/nexus/content/repositories/gradle-distributions/gradle-4.0-bin.zip

The connection will spin until Nexus completes the download and caches it. Afterwards, it shows up on the index:

If you’re not sure it’s really working, type a really bad url, like http://localhost:8081/nexus/content/repositories/gradle-distributions/blah.zip

You should get an immediate error like:

3 Likes