Increase timeout for gradle to get maven dependency

I am trying to get the jar dependency on Maven through resolving the gradle grails 3.1.5 dependency . How do I increase the timeout required to get a maven dependency? Of course, I saw that it took longer to load the dependency. But how can I configure gradle to wait longer to load the dependency

+13
maven grails gradle
source share
1 answer

The function was added to Gradle here: https://github.com/gradle/gradle/pull/3041

You can increase the wait time with 2 properties:

 ./gradlew build -Dhttp.socketTimeout=60000 -Dhttp.connectionTimeout=60000 

As Sue C commented, if you are using Gradle 4.10.2 or later, use the following properties :

./gradlew build -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.http.connectionTimeout=60000

+15
source share

All Articles