aosapps / drone-sonar-plugin

The plugin of Drone CI to integrate with SonarQube (previously called Sonar), which is an open source code quality management platform.
MIT License
30 stars 51 forks source link

Failed with Drone: Please provide compiled classes of your project with sonar.java.binaries property #30

Closed mailbyms closed 3 years ago

mailbyms commented 3 years ago
ERROR: Error during SonarScanner execution
64 | org.sonar.java.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property
65 | at org.sonar.java.JavaClasspath.init(JavaClasspath.java:64)
66 | at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:280)
67 | at

I use the lastest plugin image, and my .drone.yml just like this:

  - name: sonar
    image: aosapps/drone-sonar-plugin
    pull: if-not-exists
    settings:
      sonar_host:
        from_secret: sonar_host
      sonar_token:
        from_secret: sonar_token
    when:
      event:
        - push

Please help.

mailbyms commented 3 years ago

OK, I fix this by adding a new environment parameter JAVA_BINARIES and build my own image.
Check it here: mailbyms/drone-sonar-plugin