You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
47 | INFO: ------------------------------------------------------------------------
48 | INFO: Total time: 6.901s
49 | INFO: Final Memory: 18M/119M
50 | INFO: ------------------------------------------------------------------------
51 | ERROR: Error during SonarQube Scanner execution
52 | org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.
53 | at org.sonar.java.JavaClasspath.init(JavaClasspath.java:64)
54 | at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:280)
55 | at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:149)
56 | at org.sonar.java.JavaSquid.(JavaSquid.java:81)
57 | at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:102)
58 | at
The text was updated successfully, but these errors were encountered:
2、Repackage the docker image, here is my Dockerfile and sonar-scanner.properties
Note: I use the DroneCI to do the code-analysis so the sonar.java.binaries is /drone/src/target/classes
## Dockerfile
FROM harbor.sz/library/drone-sonar-plugin:latest
ARG SONAR_VERSION=4.7.0.2747
ARG SONAR_SCANNER_CLI=sonar-scanner-cli-${SONAR_VERSION}
ARG SONAR_SCANNER=sonar-scanner-${SONAR_VERSION}
COPY ./sonar-scanner.properties /bin/${SONAR_SCANNER}/conf
ENV PATH $PATH:/bin/${SONAR_SCANNER}/bin
ENTRYPOINT /bin/drone-sonar
## sonar-scanner.properties
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here
#----- Default SonarQube server
#sonar.host.url=http://localhost:9000
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
sonar.java.binaries=/drone/src/target/classes
It's not a bug , the sonar-scanner require sonar.java.binaries when do the java code analysis but the default conf not supply it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
INFO: EXECUTION FAILURE
47 | INFO: ------------------------------------------------------------------------
48 | INFO: Total time: 6.901s
49 | INFO: Final Memory: 18M/119M
50 | INFO: ------------------------------------------------------------------------
51 | ERROR: Error during SonarQube Scanner execution
52 | org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.
53 | at org.sonar.java.JavaClasspath.init(JavaClasspath.java:64)
54 | at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:280)
55 | at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:149)
56 | at org.sonar.java.JavaSquid.(JavaSquid.java:81)
57 | at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:102)
58 | at
The text was updated successfully, but these errors were encountered: