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

maven, maven-wagon-plugin, nexus, sonatype, timeout

Solution

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

Problem

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.

Original source