title: Configure jacoco agent for sonar2.12 (Multi Module maven)
body: <p>The Sonar latest version 2.12 has the Jacoco plugin integrated and i want to use it for my code coverage part on a multi module project.</p>
  
  <p>I have a structure like this</p>
  
  <pre><code>proj.com.parent
     proj.com.provider
     proj,com.test
  </code></pre>
  
  <p>The Test cases for the provider project are in the test project. When i set the Code coverage plugin in sonar as jacoco it executes fine , but the combined code covergae is not presented on the DashBoard. Ihave seen a post that a single jacoco.exec file can solve the problem , but i am unable to do so.</p>
  
  <p>I have tried to configure the below in my pom as below</p>
  
  <pre><code>&lt;profile&gt;
          &lt;id&gt;sonar&lt;/id&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &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;argLine&gt;-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath}&lt;/argLine&gt; 
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
          &lt;properties&gt;
              &lt;sonar.jacoco.reportPath&gt;${basedir}/code-coverage/jacoco.exec&lt;/sonar.jacoco.reportPath&gt;
              &lt;sonar.jacoco.jar&gt; C:\sonar-2.12\war\sonar-server\deploy\plugins\jacoco\META-INF\lib\org.jacoco.agent-0.5.3.201107060350.jar&lt;/sonar.jacoco.jar&gt;
          &lt;/properties&gt;
  </code></pre>
  
  <p></p>
  
  <p>But on maven commandline " mvn clean install "  i get this error :</p>
  
  <blockquote>
    <p>Failed to find Premain-Class manifest attribute in C:\sonar-2.12\war\sonar-server\deploy\plugins\jacoco\META-INF\lib\org.jacoco.agent-0.5.3.201107060350.jar
    Error occurred during initialization of VM
    agent library failed to init: instrument</p>
  </blockquote>
  
  <p>Can anyone provide any help on this ?</p>