My Azure DevOps pipeline failed today when it was performing a Maven build command: mvn clean install
I didn't change anything to the pipeline and it is still working fine at today 3.00am, below is the Maven steps from the .yml file
It seems Azure DevOps failed to connect to the repository, please advise
- powershell: |
$env:MAVEN_HOME = "$(Agent.TempDirectory)\maven\apache-maven"
$env:PATH = "$env:MAVEN_HOME\bin;$env:PATH"
Write-Host ">>> Run Maven Build"
mvn clean install "-Dmaven.repo.local=$(Pipeline.Workspace)\.m2"
displayName: 'Build Project with mvn clean install'
The error message initially:
[ERROR] Failed to execute goal on project spd: Could not resolve dependencies for project spd:spd:pom:1.0: Failed to collect dependencies at org.apache.wss4j:wss4j-ws-security-common:jar:4.0.0 -> org.opensaml:opensaml-saml-impl:jar:5.1.3: Failed to read artifact descriptor for org.opensaml:opensaml-saml-impl:jar:5.1.3: Could not transfer artifact org.opensaml:opensaml-saml-impl:pom:5.1.3 from/to B_shibboleth (https://build.shibboleth.net/nexus/content/groups/public): Transfer failed for https://build.shibboleth.net/nexus/content/groups/public/org/opensaml/opensaml-saml-impl/5.1.3/opensaml-saml-impl-5.1.3.pom: Connect to build.shibboleth.net:443 [build.shibboleth.net/3.213.250.186] failed: Connection timed out: connect -> [Help 1]
After re-triggering a few times:
[ERROR] Failed to execute goal on project spd: Could not resolve dependencies for project spd:spd:pom:1.0: Failed to collect dependencies at org.apache.wss4j:wss4j-ws-security-common:jar:4.0.0 -> org.opensaml:opensaml-saml-impl:jar:5.1.3: Failed to read artifact descriptor for org.opensaml:opensaml-saml-impl:jar:5.1.3: Could not transfer artifact org.opensaml:opensaml-saml-impl:pom:5.1.3 from/to B_shibboleth (https://build.shibboleth.net/nexus/content/groups/public): Authorization failed for https://build.shibboleth.net/nexus/content/groups/public/org/opensaml/opensaml-saml-impl/5.1.3/opensaml-saml-impl-5.1.3.pom 403 Forbidden -> [Help 1]
For reference, in my pom.xml, it has this dependency:
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-common</artifactId>
<version>4.0.0</version>
</dependency>