Increase timeout for gradle to get a maven dependency

你说的曾经没有我的故事 提交于 2020-04-07 14:49:57

问题


I am tring to get a jar dependency from Maven via the grails 3.1.5 gradle dependency Resolution . How do I increase timeout that gradle takes to get a maven dependency. Sure I have seen that the dependency takes quiet a longer time to be downloaded. But how can I configure gradle to wait longer in order to download the dependency


回答1:


The feature was added in Gradle here: https://github.com/gradle/gradle/pull/3041

You can increase the timeout with 2 properties:

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

As commented by Sue C, If you are using gradle 4.10.2 or later version use following properties:

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



来源:https://stackoverflow.com/questions/37156568/increase-timeout-for-gradle-to-get-a-maven-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!