How can I adjust timeout for mvn mirror on dependency:resolve — Error transferring file: Read timed out

假装没事ソ 提交于 2019-12-10 15:27:04

问题


Does anyone know how to control the timeout settings for a mirror in the maven settings file or in the dependency plugin?

I see that I can modify timeout settings for a server but not a repository or a mirror.

Problem

Since upgrading nexus oss from 1.8.0 to 2.3x and moving to a VM I'm seeing intermittent problems with timeouts and nothing useful in the nexus debug log alas. I figure I have two options: improve nexus server performance or configure maven settings to wait longer for artifacts.

I don't see much to do with my server so I'm looking into the maven side.

Maven Error on Dependency Resolve

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project foo: 

from/to snapshots (http://mycorp.com/nexus/content/repositories/snapshots): Error transferring file: Read timed out -> [Help 1]

Please let me know if you know to configure maven's wagon etc. to relax its timeout.


回答1:


Try a simple http get to see what performance you get outside of Maven first. Might be a proxy issue or so.

Wagon is the name of the component doing HTTP transport in Maven and you can find some more info and config tips at http://maven.apache.org/guides/mini/guide-http-settings.html



来源:https://stackoverflow.com/questions/15837790/how-can-i-adjust-timeout-for-mvn-mirror-on-dependencyresolve-error-transferr

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