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

`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.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Build Tools, Nexus, SonarQube and Test Failures