`java.lang.OutOfMemoryError: Java heap space` in SonarScanner or Maven Sonar plugin.
IntermediateTroubleshootingBuild Tools, Nexus, SonarQube and Test Failures
Answer
Likely causes → Large project and default heap.
Diagnose → Check logs near the failure and file counts.
Fix → SONAR_SCANNER_OPTS=-Xmx2048m or MAVEN_OPTS=-Xmx2g; exclude generated sources with sonar.exclusions.
Prevent → Exclude vendor/generated directories.
More on Build Tools, Nexus, SonarQube and Test Failures
`[ERROR] Failed to execute goal ... Could not resolve dependencies ... Could not transfer artifact ... from/to central ... Connect timed out`.Beginner`Return code is: 401, ReasonPhrase: Unauthorized` on `mvn deploy` to Nexus.Beginner`Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases`.Beginner`Return code is: 413, ReasonPhrase: Request Entity Too Large` when uploading an artifact.Intermediate`npm ERR! code E401` / `Unable to authenticate, need: Basic realm="Sonatype Nexus Repository Manager"`.IntermediateSonarQube scan: `ERROR: Not authorized. Analyzing this project requires authentication.`Beginner