Is it possible to speed up maven artifacts downloading?

I know its an old question, but stumbled here from Google. I already had proxy in place, just needed to speed up with concurrent downloads. You can using mvn option:

-Dmaven.artifact.threads=30

Source: https://maven.apache.org/guides/mini/guide-configuring-maven.html

Configuring Parallel Artifact Resolution
By default, Maven 2.1.0+ will download up to 5 artifacts (from different groups) at once. To change the size of the thread pool, start Maven using -Dmaven.artifact.threads. For example, to only download single artifacts at a time:

mvn -Dmaven.artifact.threads=1 verify
You may wish to set this option permanently, in which case you can use the MAVEN_OPTS environment variable. For example:

export MAVEN_OPTS=-Dmaven.artifact.threads=3

Use a local repository manager/mirror/proxy. All downloads will then go against this instead against the public repositories on the internet. The most popular ones are:

  • Archiva: http://archiva.apache.org/
  • Artifactory: http://www.jfrog.org/
  • Nexus: http://www.sonatype.org/nexus/

They are fairly easy to install and set up and provide a lot of value. Most of them have free versions as well. Just use an old development box to get started and move to a real server once you want to broaden the scope and make it available to more people.

Tags:

Java

Maven