In travis ci.org i am getting build success , However Travis CI not sending Jacoco reports to SonarCloud. In travis ci build i am getting below log:
Preparing SonarQube Scanner CLI
199Archive: /home/travis/.sonarscanner/sonar-scanner.zip
200 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/bin/sonar-scanner-debug.bat
201 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/bin/sonar-runner.bat
202 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/bin/sonar-scanner.bat
203 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/bin/sonar-runner
204 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/bin/sonar-scanner
205 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/bin/sonar-scanner-debug
206 creating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/conf/
207 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/conf/sonar-scanner.properties
208 creating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/lib/
209 inflating: /home/travis/.sonarscanner/sonar-scanner-3.0.3.778/lib/sonar-scanner-cli-3.0.3.778.jar
210$ mv ${TRAVIS_HOME}/.sonarscanner/sonar-scanner-* ${TRAVIS_HOME}/.sonarscanner/sonar-scanner
211$ export SONAR_SCANNER_HOME=${TRAVIS_HOME}/.sonarscanner/sonar-scanner
212 Not installing SonarSource build-wrapper because it’s a Java or Javascript project
213Preparing SonarQube Scanner parameters
21421.70s$ mvn -f spring-project/pom.xml clean verify
Final build of travis is success:
[INFO]
609[INFO] — spring-boot-maven-plugin:2.1.4.RELEASE:repackage (repackage) @ spring-project —
610[INFO] Replacing main artifact with repackaged archive
611[INFO]
612[INFO] — spring-boot-maven-plugin:2.1.4.RELEASE:repackage (default) @ spring-project —
613[INFO] Replacing main artifact with repackaged archive
614[INFO] ------------------------------------------------------------------------
615[INFO] BUILD SUCCESS
616[INFO] ------------------------------------------------------------------------
617[INFO] Total time: 20.119 s
618[INFO] Finished at: 2020-06-06T16:26:11Z
619[INFO] ------------------------------------------------------------------------
620The command “mvn -f spring-project/pom.xml clean verify” exited with 0.
cache.2
621store build cache
623
624
625Done. Your build exited with 0.
.travis.yml has following configuration :
addons:
sonarcloud:
organization: “josephthachilgeorge”
token:
secure: “XXXXXXXXXXXX”
script:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=JosephThachilGeorge_ATTSD-master-project
install: true
cache:
directories:
- $HOME/.m2
script:
- mvn -f spring-project/pom.xml clean verify
In sonar-project.properties file has below configuration
sonar.projectKey=JosephThachilGeorge_ATTSD-master-project
sonar.projectName=spring-project
sonar.projectVersion=1.0
sonar.sources=.spring-project/src/main/java
sonar.sourceEncoding=UTF-8
Could you please help me to find why Travis CI not sending Jacoco reports to SonarCloud ?