jacoco测试覆盖率maven配置

<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.7.1.201405082137</version>
    <executions>
        <execution>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
        <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>report</goal>
            </goals>
        </execution>
    </executions>
</plugin>

sonar maven配置
<profile>
 <id>sonar</id>
 <activation>
 <activeByDefault>true</activeByDefault>
 </activation>


 <properties>
 <!-- EXAMPLE FOR MYSQL -->
 <sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8</sonar.jdbc.url>
 <sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
 <sonar.jdbc.username>username</sonar.jdbc.username>
 <sonar.jdbc.password>password</sonar.jdbc.password>


 <!-- SERVER ON A REMOTE HOST -->
 <sonar.host.url>http://localhost:9000</sonar.host.url>
 </properties>
 </profile>

你可能感兴趣的:(java,maven,测试)