title: maven - no sources to compile, no tests to run, unable to read execution data file
body: <p>I want sonar to display the code quality for my project using the jacoco code coverage reports. I am able to generate code coverage reports using jacoco and also an executable file jacoco-ut.exec for my unit tests. When I use jenkins i get following messaages.</p>
  
  <p>I am using the old target folder in the project hence the build is successful    </p>
  
  <pre><code>enter code here
  [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ ProjectX ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ProjectX ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\workspace\13april-ty3\src\test\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ ProjectX ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ProjectX ---
  [INFO] No tests to run.
  [JENKINS] Recording test results
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ProjectX ---
  [WARNING] JAR will be empty - no content was marked for inclusion!
  [INFO] Building jar: C:\Program Files (x86)\Jenkins\workspace\13april-ty3\target\ProjectX-0.0.1-SNAPSHOT.jar
  [INFO] 
  [INFO] --- jacoco-maven-plugin:0.5.5.201112152213:report (jacoco-site) @ ProjectX ---
  [ERROR] Unable to read execution data file C:\Program Files (x86)\Jenkins\workspace\13april-ty3\target\coverage-reports\jacoco-unit.exec: C:\Program Files (x86)\Jenkins\workspace\13april-ty3\target\coverage-reports\jacoco-unit.exec (The system cannot find the path specified)
  java.io.FileNotFoundException: C:\Program Files (x86)\Jenkins\workspace\13april-ty3\target\coverage-reports\jacoco-unit.exec (The system cannot find the path specified)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:146)
      at org.jacoco.maven.ReportMojo.loadExecutionData(ReportMojo.java:101)
      at org.jacoco.maven.ReportMojo.executeMojo(ReportMojo.java:78)
      at org.jacoco.maven.AbstractJacocoMojo.execute(AbstractJacocoMojo.java:66)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
  [INFO] 
  [INFO] --- maven-install-plugin:2.4:install (default-install) @ ProjectX ---
  [INFO] Installing C:\Program Files (x86)\Jenkins\workspace\13april-ty3\target\ProjectX-0.0.1-SNAPSHOT.jar to C:\.m2\repository\com\company\inner\ProjectX\0.0.1-SNAPSHOT\ProjectX0.0.1-SNAPSHOT.jar
  [INFO] Installing C:\Program Files (x86)\Jenkins\workspace\13april-ty3\pom.xml to C:\.m2\repository\com\company\inner\ProjectX\0.0.1-SNAPSHOT\ProjectX-0.0.1-SNAPSHOT.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 4.266 s
  [INFO] Finished at: 2015-04-13T17:55:41+00:00
  [INFO] Final Memory: 18M/183M
  [INFO] ------------------------------------------------------------------------
  Waiting for Jenkins to finish collecting data
  [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\13april-ty3\pom.xml to com.company.inner/ProjectX/0.0.1-SNAPSHOT/ProjectX-0.0.1-SNAPSHOT.pom
  [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\13april-ty3\target\ProjectX-0.0.1-SNAPSHOT.jar to com.company.inner/ProjectX/0.0.1-SNAPSHOT/ProjectX-0.0.1-SNAPSHOT.jar
  channel stopped
  [JaCoCo plugin] Collecting JaCoCo coverage data...
  [JaCoCo plugin] **/**.exec;**/classes;**/src/main/java; locations are configured
  [JaCoCo plugin] Number of found exec files for pattern **/**.exec: 2
  [JaCoCo plugin] Saving matched execfiles:  C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX-y\target\coverage-reports\jacoco-unit.exec C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX\target\coverage-reports\jacoco-unit.exec
  [JaCoCo plugin] Saving matched class directories for class-pattern: **/classes:  C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX-y\target\classes C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX\bin\target\classes C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX\target\classes C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX\target\classes
  [JaCoCo plugin] Saving matched source directories for source-pattern: **/src/main/java:  C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjextX-y\src\main\java C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX\src\main\java C:\Program Files (x86)\Jenkins\workspace\13april-ty3\ProjectX\src\main\java
  [JaCoCo plugin] Loading inclusions files..
  [JaCoCo plugin] inclusions: []
  [JaCoCo plugin] exclusions: []
  [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, maxClass=0, minMethod=0, maxMethod=0, minLine=0, maxLine=0, minBranch=0, maxBranch=0, minInstruction=0, maxInstruction=0, minComplexity=0, maxComplexity=0]
  [JaCoCo plugin] Publishing the results..
  [JaCoCo plugin] Loading packages..
  [JaCoCo plugin] Done.
  [13april-ty3] $ "C:\Program Files\apache-maven-3.2.2\bin\mvn.bat" -f "C:\Program Files (x86)\Jenkins\workspace\13april-ty3\pom.xml" -e -B sonar:sonar -Dsonar.sources=ProjectX/src -Dsonar.language=java -Dsonar.core.codeCoveragePlugin=jacoco -Dsonar.jacoco.reportPath=ProjectX/target/coverage-reports/jacoco-unit.exec-Dsonar.dynamicAnalysis=reuseReports -Dsonar.surefire.reportsPath=target/surefire-reports -Dsonar.jdbc.driver=com.mysql.jdbc.Driver "-Dsonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true&amp;useConfigs=maxPerformance" ******** ******** -Dsonar.host.url=http://localhost:9000 ******** ********
  </code></pre>