Continue to next maven repo after expected failure

Hi,

We have two servers (S1 and S2) that mirror certain maven repos (they both serve the same purpose). Each one is only accessible from a subnet/cluster (C1 and C2). Our configuration simply lists them in order:

        maven {
            name = "S1"
            url = "https://our-s1"
            // ...
        }
        maven {
            name = "S2"
            url = "https://our-s2"
            // ...
        }        

This seems to fail because machines in cluster C2 can’t access S1, which is the first repo to resolve.
I have tried reducing the timeouts:

-Dorg.gradle.internal.http.socketTimeout=2000 -Dorg.gradle.internal.http.connectionTimeout=2000

But still, C2’s builds are interrupted due to S1 not being accessible.

Is there a way to configure this in gradle, or do we need to do some outside configuration, such as DNS resolution, env configuration or similar?

I haven’t found any solution in gradle, but perhaps I am missing some configuration options.

Thanks,
Raul.