Maven dependency timeout settings

前端 未结 1 1988
野趣味
野趣味 2021-01-04 12:53

Maven reports timeout exception while downloading dependencies, as it\'s default time out is 60000, but in my case I need to increase because ( The environment where I am wo

相关标签:
1条回答
  • 2021-01-04 13:06

    According to this Maven guide there's a new way to set up timeouts. I changed my ~/settings.xml that now reads like that...

    <server>
      <id>central</id>
      <configuration>
        <httpConfiguration>
          <all>
            <connectionTimeout>120000</connectionTimeout>
            <readTimeout>120000</readTimeout>
          </all>
        </httpConfiguration>
      </configuration>
    </server>
    

    It seems to work in my case. I tried with an unexisting repository and it seems to fail far quicker than before, when I set both timeouts to 5000. Can you give it a try ?

    0 讨论(0)
提交回复
热议问题