Interview Prep/CI/CD/Build Tools, Nexus, SonarQube and Test Failures

`Return code is: 401, ReasonPhrase: Unauthorized` on `mvn deploy` to Nexus.

BeginnerTroubleshootingBuild Tools, Nexus, SonarQube and Test Failures
Answer

Likely causes → Server <id> in settings.xml does not match distributionManagement repository id; wrong credentials; token expired.

Diagnose → Compare ids; test with curl -u user:pass -I https://nexus/repository/maven-releases/.

Fix → Align ids and update credentials.

Prevent → Standard settings.xml generated by CI from secrets.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Build Tools, Nexus, SonarQube and Test Failures