title: JaCoCo coverage is missing
body: <p>I've been working on this for hours, and every solution I've tried that I've found online makes no difference.</p>
  
  <p>I have a project which is written in Kotlin. I have the Kotlin plugin installed on my sonar server. I am using JaCoCo plugin to generate code coverage report for sonar.</p>
  
  <p>My project is multi-module, but only 1 sub-module has unit tests, and so I have defined my JaCoCo plugin there.</p>
  
  <p>I am also using the Surefire plugin.</p>
  
  <p>Here are my properties in my pom.xml</p>
  
  <pre><code>&lt;properties&gt;
      &lt;sonar.java.binaries&gt;target/classes&lt;/sonar.java.binaries&gt;
      &lt;sonar.core.codeCoveragePlugin&gt;jacoco&lt;/sonar.core.codeCoveragePlugin&gt;
      &lt;sonar.jacoco.reportPath&gt;target/jacoco.exec&lt;/sonar.jacoco.reportPath&gt;
      &lt;sonar.language&gt;kotlin&lt;/sonar.language&gt;
      &lt;sonar.sources&gt;src/main&lt;/sonar.sources&gt;
      &lt;sonar.tests&gt;src/test&lt;/sonar.tests&gt;
      &lt;sonar.verbose&gt;true&lt;/sonar.verbose&gt;
      &lt;sonar.jacoco.reportsPath&gt;target&lt;/sonar.jacoco.reportsPath&gt;
      &lt;sonar.junit.reportsPath&gt;target/surefire-reports&lt;/sonar.junit.reportsPath&gt;
      &lt;sonar.surefire.reportsPath&gt;target/surefire-reports&lt;/sonar.surefire.reportsPath&gt;
  
      &lt;surefireArgLine/&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>Here is my surefire plugin:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
          &lt;excludes&gt;
              &lt;exclude&gt;**/*IT.java&lt;/exclude&gt;
          &lt;/excludes&gt;
      &lt;/configuration&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.platform&lt;/groupId&gt;
              &lt;artifactId&gt;junit-platform-surefire-provider&lt;/artifactId&gt;
              &lt;version&gt;1.2.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
              &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
              &lt;version&gt;${junit-jupiter.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>And here is my JaCoCo plugin:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
      &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;0.8.1&lt;/version&gt;
      &lt;configuration&gt;
          &lt;append&gt;true&lt;/append&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;pre-unit-test&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;prepare-agent&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;destFile&gt;target/jacoco.exec&lt;/destFile&gt;
                  &lt;propertyName&gt;surefireArgLine&lt;/propertyName&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
          &lt;execution&gt;
              &lt;id&gt;post-unit-test&lt;/id&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;report&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>After running my unit tests, I generate my sonar report like so:</p>
  
  <pre><code>mvn sonar:sonar -Dsonar.projectName=vqs -Dsonar.projectKey=vqs
  </code></pre>
  
  <p>And Sonar reports no coverage.<a href="https://i.stack.imgur.com/hus85.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hus85.png" alt="sonar report summary"></a></p>
  
  <p>At one point in time, I was getting code coverage data. At this time, the project was a single module, and was potentially not using surefire (I can't remember for sure).</p>
  
  <p>Hoping somebody will see my error and help me out!</p>
  
  <p>Thanks,
  Tonya</p>
  
  <p>EDIT, adding console output:</p>
  
  <pre><code>tohrel@ussd-olm-016438:~/projects/project-name-redacted/vqs-api$ mvn sonar:sonar -Dsonar.projectName=vqs -Dsonar.projectKey=vqs
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Variant Query Service - API 1.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] --- sonar-maven-plugin:3.4.0.905:sonar (default-cli) @ vqs-api ---
  [INFO] User cache: /Users/tohrel/.sonar/cache
  [INFO] SonarQube version: 7.2.1
  [INFO] Default locale: "en_US", source code encoding: "UTF-8"
  [INFO] Publish mode
  [INFO] Load global settings
  [INFO] Load global settings (done) | time=143ms
  [INFO] Server id: AWT2VY5OzSeF07PuEM-H
  [INFO] User cache: /Users/tohrel/.sonar/cache
  [INFO] Load/download plugins
  [INFO] Load plugins index
  [INFO] Load plugins index (done) | time=82ms
  [INFO] Load/download plugins (done) | time=132ms
  [INFO] Loaded core extensions:
  [INFO] Process project properties
  [INFO] Load project repositories
  [INFO] Load project repositories (done) | time=140ms
  [INFO] Load quality profiles
  [INFO] Load quality profiles (done) | time=63ms
  [INFO] Load active rules
  [INFO] Load active rules (done) | time=618ms
  [INFO] Load metrics repository
  [INFO] Load metrics repository (done) | time=19ms
  [INFO] Project key: vqs
  [INFO] Project base dir: /Users/tohrel/projects/project-name-redacted/vqs-api
  [INFO] -------------  Scan vqs
  [INFO] Load server rules
  [INFO] Load server rules (done) | time=178ms
  [INFO] Base dir: /Users/tohrel/projects/project-name-redacted/vqs-api
  [INFO] Working dir: /Users/tohrel/projects/project-name-redacted/vqs-api/target/sonar
  [INFO] Source paths: src/main
  [INFO] Test paths: src/test
  [INFO] Source encoding: UTF-8, default locale: en_US
  [INFO] Language is forced to kotlin
  [INFO] Index files
  [INFO] 254 files indexed
  [INFO] Quality profile for kotlin: Sonar way
  [INFO] Sensor Kotlin Sensor [kotlin]
  [INFO] 208 source files to be analyzed
  [INFO] Sensor Kotlin Sensor [kotlin] (done) | time=2693ms
  [INFO] 208/208 source files have been analyzed
  [INFO] Sensor SonarJavaXmlFileSensor [java]
  [INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=4ms
  [INFO] Sensor Zero Coverage Sensor
  [INFO] Sensor Zero Coverage Sensor (done) | time=90ms
  [INFO] Sensor CPD Block Indexer
  [INFO] Sensor CPD Block Indexer (done) | time=0ms
  [INFO] 57 files had no CPD blocks
  [INFO] Calculating CPD for 151 files
  [INFO] CPD calculation finished
  [INFO] Analysis report generated in 484ms, dir size=658 KB
  [INFO] Analysis reports compressed in 582ms, zip size=444 KB
  [INFO] Analysis report generated in /Users/tohrel/projects/project-name-redacted/vqs-api/target/sonar/scanner-report
  [INFO] Analysis report uploaded in 27ms
  [INFO] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=vqs
  [INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
  [INFO] More about the report processing at http://localhost:9000/api/ce/task?id=AWVagYWzPCQMqzjb5q73
  [INFO] Task total time: 7.582 s
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 11.536 s
  [INFO] Finished at: 2018-08-20T20:22:42-07:00
  [INFO] Final Memory: 56M/869M
  [INFO] ------------------------------------------------------------------------
  </code></pre>