-
Bug
-
Resolution: Fixed
-
Major
-
None
MavenEmbedder uses wagon-http-lightweight that is not thread-safe (http://jira.codehaus.org/browse/WAGON-346)
in combination with Maven3 Aether that, by default, parallelize metadata and artifacts resolution on 5 threads
This can introduce authentication failure and broken builds when the job uses settings with multiple secured snapshot repositories
A workaround is to force Aether to NOT parallelize resolution using -Dmaven.artifact.threads=1 -Daether.metadataResolver.threads=1
A better solution is to switch to a safer wagon implementation for http(s) protocol, either wagon-http (ASF, based on apache httpclient) or wagon-ahc (sonatype, EPL)