Tim's idea could workŠ however, I could say that a shorter term fix might help (if you aren't already on maven 3.0.4)
--snip-- With 3.0.4, the default wagon http(s) is now the HttpClient based on Apache Http Client 4.1.2 <http://hc.apache.org/httpcomponents-client-ga>. There is now a http connection pooling to prevent reopening http(s) to remote server for each requests. This pool feature is configurable with some parameters [4]. This new defaut wagon comes with some default configuration: * http(s) connection pool: default to 20. * readTimeout: default to 1800000ms (~30 minutes) (see section Read time out below) * default Preemptive Authentication. --/snip-- Taken from http://maven.apache.org/guides/mini/guide-http-settings.html I do see a couple of obstacles to Tim's ideas. Most of them are related to bad practices which are regularly evangelized as good ideasŠ like using variables for version names (I am looking at you Atlassian [http://blogs.atlassian.com/2010/09/bamboo_jira_release_management_plugin_p art_2/]). Another snippet (I didn't read this before this discussion thread and it enlightened me) --snip-- Maven Wagon HTTPThis project is an implementation of Wagon provider for HTTP access. It uses Apache HttpComponents client <http://hc.apache.org/httpcomponents-client-ga/> as lower level layer. It enables Maven to use remote repositories stored in HTTP servers. FeaturesPrior to version 2.0, a pooled http connection manager is used. The pooled feature is enabled by default, you can configure it trough the following system properties : * maven.wagon.http.pool = true/false (default true), enable/disable the pooled mechanism. * maven.wagon.httpconnectionManager.maxPerRoute = integer (default : 20), maximum number of http(s) connection per destination. * maven.wagon.httpconnectionManager.maxTotal = integer (default 40), maximum number of htp(s) connection. * maven.wagon.http.ssl.easy = true/false (default true), enable/disable use of easy ssl check for user generated certificates. * maven.wagon.http.ssl.allowall = true/false (default true), enable/disable match of the server's X.509 certificate. If disable, a browser like check will be used. * maven.wagon.http.ssl.ignore.validity.dates = true/false (default true), ignore issue with certifactes dates. * maven.wagon.rto=time in ms (default 1800000) read time out. --/snip-- Taken from http://maven.apache.org/wagon/wagon-providers/wagon-http/index.html AlsoŠ You could start your day out with mvn dependency:go-offline -- and then add --offline for subsequent compilations throughout the day. Thanks, Roy Lyons Senior Configuration Engineer On 10/11/12 4:01 AM, "Martin Höller" <[email protected]> wrote: >On 11 Okt 2012, Wang, Simon wrote: > >> Hi, Barrie, >> That's really helpful! >> >> Even I have local cache, it also takes about 2 mins to resolve >>dependencies. >> Also it seems maven still will talk with remote maven server even I >>have local cache. > >You could try "mvn -o" and see if this helps. > >And maybe this blog post of Tim O'Brien might be of interest: >http://www.sonatype.com/people/2012/08/download-it-all-at-once-a-maven-ide >a/ > >hth, >- martin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
