How can I increase the number of http(s) connections a maven build will use to download and upload Artifacts from the repository (Artifactory or similar).
I have seen this page: https://maven.apache.org/guides/mini/guide-http-settings.html
But it does not say what is the parameter and syntax to set it.
I am using Apache Maven 3.6.0
according to Maven documentation 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 following switch option to change default value:
-Dmaven.artifact.threads
for example :
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
There is options for maven:
maven.artifact.threads for configuring parallel artifacst resolution
You can use it as is described on site: https://maven.apache.org/guides/mini/guide-configuring-maven.html
You can also add this properties to your settings.xml so will be affected for all builds:
<settings>
    <profiles>
        <profile>
            <id>props</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <maven.artifact.threads>10</maven.artifact.threads>
            </properties>
        </profile>
    </profiles>
</settings>
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