When building a project with dependencies not yet available in the local repository, I noticed that Maven 3.3.3 first downloads the dependency POMs sequentially and then proceeds with downloading the dependency JARs with up to 5 threads in parallel.
What's the reason for not using parallel downloads for the POMs also?
Is there an option to configure the number of parallel downloads of either POMs or JARs?
So the most likely cause of slow downloads for maven-metadata. xml files is that one of your proxy repositories has a very slow remote. This problem will be compounded if either of the above two settings is set too low.
When you run a Maven build, then Maven automatically downloads all the dependency jars into the local repository. It helps to avoid references to dependencies stored on remote machine every time a project is build. Maven local repository by default get created by Maven in %USER_HOME% directory.
In Maven, you can use Apache Maven Dependency Plugin, goal dependency:purge-local-repository to remove the project dependencies from the local repository, and re-download it again.
It's not possible with current version of Maven, 3.8.1.
OP has created an issue for this and a PR for it (this is the 3rd try for adding this feature) and it has been merged to Maven Resolver (a Maven library) in April 2019.
However in July 2019 it has been reverted so I don't know when will this land in a Maven release.
What about maven.artifact.threads config variable ?
https://maven.apache.org/guides/mini/guide-configuring-maven.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With