title: emma code coverage on jenkins is not creating reports
body: <p>I am trying to generate code coverage reports using emma on jenkins, however it is failing</p>
  
  <p>Builds are successful. It is only the emma reports that are failing. </p>
  
  <p>Here is my pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;ThinClientManager&lt;/groupId&gt;
      &lt;artifactId&gt;ThinClientManager&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;ThinClientManager&lt;/name&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;included.packages&gt;-Dincluded.packages=hob.tcm&lt;/included.packages&gt;
          &lt;included.adapters&gt;-Dincluded.adapters=coverage,complexity,dependency&lt;/included.adapters&gt;
      &lt;/properties&gt;
      &lt;build&gt;
          &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src&lt;/directory&gt;
                  &lt;excludes&gt;
                      &lt;exclude&gt;**/*.java&lt;/exclude&gt;
                  &lt;/excludes&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.1&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source /&gt;
                          &lt;target /&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                      &lt;inherited&gt;true&lt;/inherited&gt;
                      &lt;configuration&gt;
                          &lt;forkMode&gt;once&lt;/forkMode&gt;
                          &lt;argLine&gt;-javaagent:serenity/serenity.jar -Xms512m -Xmx1024m ${included.packages} ${included.adapters}&lt;/argLine&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  
      &lt;reporting&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;emma-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.0-alpha-3&lt;/version&gt;
                  &lt;inherited&gt;true&lt;/inherited&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;surefire-report-maven-plugin&lt;/artifactId&gt;
                  &lt;inherited&gt;true&lt;/inherited&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/reporting&gt;
  
  
      &lt;repositories&gt;
          &lt;!--other repositories if any --&gt;
          &lt;repository&gt;
              &lt;id&gt;project.local&lt;/id&gt;
              &lt;name&gt;project&lt;/name&gt;
              &lt;url&gt;file:${project.basedir}/repo&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
  
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.4&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;ant&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;EAAdmin&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;hlset&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;hlsetutil&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;tool&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;xstream&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Here is my output</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'emma'.
  [INFO] ------------------------------------------------------------------------
  [INFO] Building ThinClientManager
  [INFO]    task-segment: [emma:emma]
  [INFO] ------------------------------------------------------------------------
  [INFO] Preparing emma:emma
  [INFO] [resources:resources {execution: default-resources}]
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 15 resources
  [INFO] [compiler:compile {execution: default-compile}]
  [INFO] Nothing to compile - all classes are up to date
  [INFO] [emma:instrument {execution: default-instrument}]
  [INFO] Instrumenting classes with EMMA
  processing instrumentation path ...
  ERROR: Could not find local repository for 2.2.1
  [INFO] ------------------------------------------------------------------------
  [ERROR] FATAL ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] com.vladium.emma.EMMARuntimeException
  /usr/share/tomcat6/.jenkins/jobs/Workplace Job System (Maven)/workspace/target/generated-classes/emma/classes/hob/props/.svn/prop-base/log.properties.svn-base (Permission denied)
  [INFO] ------------------------------------------------------------------------
  [INFO] Trace
  com.vladium.emma.EMMARuntimeException: com.vladium.emma.EMMARuntimeException
      at com.vladium.emma.instr.InstrProcessorST.handleFile(InstrProcessorST.java:567)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:193)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
      at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumerate(IPathEnumerator.java:97)
      at com.vladium.emma.instr.InstrProcessorST._run(InstrProcessorST.java:715)
      at com.vladium.emma.Processor.run(Processor.java:88)
      at org.codehaus.mojo.emma.task.InstrumentTask.execute(InstrumentTask.java:106)
      at org.codehaus.mojo.emma.EmmaInstrumentMojo.doExecute(EmmaInstrumentMojo.java:158)
      at org.codehaus.mojo.emma.AbstractEmmaMojo.execute(AbstractEmmaMojo.java:98)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      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:622)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at hudson.maven.agent.Main.launch(Main.java:205)
      at hudson.maven.MavenBuilder.call(MavenBuilder.java:154)
      at hudson.maven.Maven2Builder.call(Maven2Builder.java:79)
      at hudson.maven.Maven2Builder.call(Maven2Builder.java:55)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:701)
  Caused by: java.io.FileNotFoundException: /usr/share/tomcat6/.jenkins/jobs/Workplace Job System (Maven)/workspace/target/generated-classes/emma/classes/hob/props/.svn/prop-base/log.properties.svn-base (Permission denied)
      at java.io.RandomAccessFile.open(Native Method)
      at java.io.RandomAccessFile.&lt;init&gt;(RandomAccessFile.java:236)
      at com.vladium.emma.instr.InstrProcessorST.writeFile(InstrProcessorST.java:815)
      at com.vladium.emma.instr.InstrProcessorST$FileWriteJob.run(InstrProcessorST.java:882)
      at com.vladium.emma.instr.InstrProcessorST.drainJobQueue(InstrProcessorST.java:943)
      at com.vladium.emma.instr.InstrProcessorST.addJob(InstrProcessorST.java:929)
      at com.vladium.emma.instr.InstrProcessorST.handleFile(InstrProcessorST.java:562)
      ... 47 more
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 7 seconds
  [INFO] Finished at: Mon Apr 14 13:45:41 CEST 2014
  [INFO] Final Memory: 21M/50M
  [INFO] ------------------------------------------------------------------------
  [JENKINS] Archiving /usr/share/tomcat6/.jenkins/jobs/Workplace Job System (Maven)/workspace/pom.xml to ThinClientManager/ThinClientManager/0.0.1-SNAPSHOT/ThinClientManager-0.0.1-SNAPSHOT.pom
  channel stopped
  Skipping Emma coverage report as mojo did not run.
  Finished: FAILURE
  </code></pre>
  
  <p>My jenkins configuration is as follows:</p>
  
  <p>Build</p>
  
  <p>Root POM - pom.xml</p>
  
  <p>Goals and options - emma:emma</p>
  
  <p>and i have added the "Record Emma Coverage Report" Post-Build Action, however it is still empty.
  I did not add the archive artifacts post-build action.</p>