Please provide compiled classes of your project with sonar.java.binaries

You’re running your Maven steps in the wrong order:

  • clean – delete all previous build output
  • sonar:sonar – run analysis (which requires build output)
  • deploy – build &etc…

Try this instead:

mvn clean deploy sonar:sonar

Now if you’re about to object that you don’t want to actually “deploy” the jar until/unless the changed code passes the Quality Gate, well… that requires a different workflow:

mvn clean package sonar:sonar
// check quality gate status
// if (qualityGateOk) { deploy }

The particulars of those last two steps will depend on your CI infrastructure. But for Jenkins, step #2 is well documented

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)