My Azure Pipeline build fails with the following errror:
Failed to collect dependencies at
org.apache.commons:commons-lang3:jar:3.8.1: Failed to read artifact
descriptor for org.apache.commons:commons-lang3:jar:3.8.1: Could not
transfer artifact org.apache.commons:commons-lang3:pom:3.8.1 from/to
SDC_MvnRepo
(https://pkgs.dev.azure.com/XXX/XXX/_packaging/SDC_MvnRepo/maven/v1):
Transfer failed for
https://pkgs.dev.azure.com/XXX/XXX/_packaging/SDC_MvnRepo/maven/v1/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom:
Connection reset -> [Help 1]
However if I copy and paste the url for the pom it downloads fine to my local machine.
Pipeline is being built by Project Collection Service Accounts. I have added it as a Contributor to the feed. Build still fails with the same message:
2
Answers
Had to add -Dhttps.protocols=TLSv1.2 to my maven command in the Azure Pipeline build. Logs really didn't indicate the true issue
According to the error message, it seems that the current service account doesn’t have the permission to cache the packages from org.apache.commons to your local feed.
Please make sure, the service account has the write permission to cache the packages to your Azure feed. Basically, please check the role settings for your service account, at least set the
contributor
role inSDC_MvnRepo
feed.By default Maven’s local repository is configured to be
${user.home}/.m2/repository
.