0

I am getting below erro while running sonar with gradle using jacoco for code coverage:

Execution failed for task ':CCL-CACHE:sonarAnalyze'

null value * Exception is: org.gradle.BuildExceptionReporter org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':CCL-CACHE:sonarAnalyze'.

Sonar version: 3.7.4 Gradle Version : 1.11

Jacoco.exec is getting generated

Stack_IQ
  • 438
  • 5
  • 20

1 Answers1

0

I have no experience with gradle, but from my experience with Maven, I would say you should set the property sonar.jacoco.reportPath to the (relative) path of jacoco.exec

Miguel Ferreira
  • 1,282
  • 11
  • 27
  • This started working when I used sonarrunner..But now I am facing problem for multimodule structure which I have in my poject.The jacoco.exec gets generated for each module but on the sonarqube code coverage of only one module gets published instead of all the modules.I am not able to decipher what could be the reason for this...Can anybody help me with this? – Stack_IQ Mar 20 '14 at 03:31
  • When faced with that same situation I had the jacoco.exec file placed at a central location. In my case it was the parent module. I did that by configuring the report path variable with a relative path for each module. Something like what is done in the accepted answer in this post: http://stackoverflow.com/questions/13031219/how-to-configure-multi-module-maven-sonar-jacoco-to-give-merged-coverage-rep – Miguel Ferreira Mar 20 '14 at 12:15