Class not found error when running sonarrunner

后端 未结 1 1611
感情败类
感情败类 2021-01-23 11:59

I am getting class not found error. The the class is not accessible through class loader and an error is being prompt when running the sonarrunner from gradle.

These c

相关标签:
1条回答
  • 2021-01-23 12:33

    To perform source code analysis the SQ Java plugin needs bytecode in addition to the source code. Bytecode location for source files is provided thanks to properties sonar.java.binaries and sonar.java.test.binaries. Bytecode (or JAR) locations for third party libs is provided by properties sonar.java.libraries and sonar.java.test.libraries.

    If you don't provide correctly those properties then you'll see some 'Class not found' errors. That doesn't prevent to complete the analysis but many SQ Java rules will probably not work and not detect any issue.

    (Partial) example: sonar-runner -Dsonar.sources=src -Dsonar.java.binaries=bin/classes -Dsonar.java.libraries=libs/*.jar

    0 讨论(0)
提交回复
热议问题