Not getting the coverage on new code in sonar dashboard

I am trying to use scm activity plugin 1.8 for clearcase and
using sonar 4.3.3 and got the blame information in the sonar but did not
getting the coverage on new code in dashboard

  • Sync GIT and ClearCase
  • ClearCase MVFS files permissions
  • clearcase: Backup for only modified checked-out elements in all views
  • Revert to original version of a file in git (before even adding)
  • Gerrit equivalent for other repositories such as Clearcase/Subversion
  • Cleartool difference between -element and -version
  • “User interaction is not allowed” trying to sign an OSX app using codesign
  • sonar maven plugin build error, SonarQube version: null
  • Jenkins: how do I make the color of a failed build due to a workspace issue from red to gray?
  • How can I do a git pull in Maven?
  • Karma cannot start Firefox with Jenkins and Ubuntu 12.04
  • Jenkins: Failed to connect to repository
  • One Solution collect form web for “Not getting the coverage on new code in sonar dashboard”

    You should add Code Coverage Tool to your build process. If you use Maven, then you can add:

    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.5.201505241946</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <rule>
                            <element>CLASS</element>
                            <excludes>
                                <exclude>*Test</exclude>
                            </excludes>
                        </rule>
                    </rules>
                </configuration>
            </plugin>
        </plugins>
        ...
    </build>
    
    Git Baby is a git and github fan, let's start git clone.