7

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.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135

1 Answers1

3

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

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123
  • It is an intermittent problem. So, that would work and maven dependency would work later on as well. It makes it somewhat difficult to test/fix – Peter Kahn Apr 05 '13 at 20:00
  • If it intermittent you need to figure out what goes wrong at the time. Probably a network or load problem. – Manfred Moser Apr 06 '13 at 01:59
  • Thanks. Do you know of anyway to adjust the timeout? I tried but there's no evidence of the change taking effect in the effective-pom or when running mvn using -X – Peter Kahn Apr 12 '13 at 00:47
  • Updated the answer .. maybe that helps – Manfred Moser Apr 12 '13 at 04:14
  • Excellent, that does help. I've been looking at settings reference which was the wrong direction. I haven't done much with the wagon so I guess this is my chance to dive deep. Thanks – Peter Kahn Apr 13 '13 at 22:03
  • 1
    Looking at that link, it says that "With Wagon 2.0 and Apache Maven 3.0.4, a default timeout of 30 minutes comes by default." Was your file really not downloaded after 30 minutes? I'm getting a Read Time Out error after only a few minutes. – Kevin Meredith Jun 19 '13 at 20:37