Quantcast
Channel: Planet Apache
Viewing all articles
Browse latest Browse all 9364

Olivier Lamy: Maven Download time Improvement

$
0
0
While working a bit on wagon (the api used in Apache Maven to download/upload artifacts), I wanted to reduce the http(s) connection creation number (see WAGON-348).
The current embedded http wagon in Maven Core is the lightweight one based on standard java libraries, this means http(s) connection are created for each download requests. As you know this socket creation can be time and resources consuming.
So as we are working on wagon 2.0 version, I have added a connection pooling mechanism in the wagon http (which is now based on Apache Http Client).
To prevent some classloading issues, the wagon jar to used is a shaded one.
You can test that now (with a maven 3.x version) with adding the jar in $M2_HOME/lib/ext/ :

wget -O wagon-http-2.0-SNAPSHOT-shaded.jar "https://repository.apache.org/content/groups/snapshots-group/org/apache/maven/wagon/wagon-http/2.0-SNAPSHOT/wagon-http-2.0-20110917.172345-31-shaded.jar"
&& cp wagon-http-2.0-SNAPSHOT-shaded.jar $M2_HOME/lib/ext/


Test build available here : http://people.apache.org/~olamy/maven/.

So a little improvement, don't be afraid you still will have time to drink one or two coffee when building a maven project :-).
Note download time will be improved if you use more than one repositories and especially https repositories.

Vote here if you want to have this in next maven core release : http://jira.codehaus.org/browse/MNG-5175.

And all feedbacks will be appreciate :-) (even if it's an issue :-) )

Have Fun !
--
Olivier

Apache Maven, Maven, Apache are trademarks of The Apache Software Foundation.



Viewing all articles
Browse latest Browse all 9364

Trending Articles