Hi,
I need help to configure a manual check of code for the play framework 2.2.6 (is java 1.7 and scala)
Regards
Hi,
Please share a bit more information if you’d like some help:
What exactly are you struggling with? What have you tried already? Did you analyze the code and got error, or unexpected result?
Thanks
Hi,
We have project built in the Play Framework (it uses java and scala).
We have bitbucket cloud and we can build the project, its generate the “target” directory with all the files. I attached the pipeline log.
I have a final result:
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 38.389s
INFO: Final Memory: 29M/120M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Please provide compiled classes of your project with sonar.java.binaries property
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
✖ SonarCloud analysis failed.
If you can help it would be great.
Best regards.
my bitbucket-pipelines.yml
# You can specify a custom docker image from Dockerhub as your build environment.
image: cursorchile/play.2.2.6-java.1.7-psql.11.3-ci-cursor
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
pipelines:
branches:
sonar:
- step:
name: compilacion
script:
- echo "****Comenzando Instalacion Ambiente****"
- java -version
- rm -rf ~/.ivy2
- rm -rf ~/.sbt
- rm -rf ~/repository/cache
- rm -rf ~/target/universal/*.zip
- chmod +x docs/ambiente/ci/shell_dist.sh
- ./docs/ambiente/ci/shell_dist.sh
- echo "**** comenzando compilacion ****"
- chmod +x docs/ambiente/ci/shell_dist.sh
- ./docs/ambiente/ci/shell_dist.sh
- echo "***** revisamos archivos generados ***"
- find target/
artifacts:
- target/**
- step:
script:
- pipe: sonarsource/sonarcloud-scan:1.0.1
- pipe: sonarsource/sonarcloud-quality-gate:0.1.3
pipelineLog-298.txt (152 KB)
Hi,
If you’re using Java, you cannot use the sonarcloud-scan pipe. You should use the scanner for Gradle or Maven, depending on your build technologies.
We have sample project if you need an example of a Maven/Gradle project configuration.