声纳+四叶草只能运行在SRC-仪表(Sonar + Clover only runs on src-

2019-09-28 07:52发布

目前,我试图做一个集成测试+三叶草+声纳,我可以这样做(我可以在声呐的全覆盖,(IT +单元测试看看)一起)的问题是相当多的,源被上传到声纳是三叶草产生做他的事情的人。

[INFO] [16:16:57.566] Working dir:/Users/cortiz/dev/company/tmp/profile/server/target/sonar
[INFO] [16:16:57.566] Source dirs:/Users/cortiz/dev/company/tmp/profile/server/target/clover/src-instrumented
[INFO] [16:16:57.566] Test dirs:/Users/cortiz/dev/company/tmp/profile/server/target/clover/src-test-instrumented
[INFO] [16:16:57.566] Binary dirs:/Users/cortiz/dev/company/tmp/profile/server/target/classes

或者很多__CLR **东西四周),使源代码实际上不是可读或准确

我如何运行它使用此命令

mvn clean clover2:setup install clover2:clover sonar:sonar -PSonar

和超声波轮廓

    <profile>
        <id>Sonar</id>
        <properties>
            <clover.version>3.1.8</clover.version>
            <sonar.core.codeCoveragePlugin>clover</sonar.core.codeCoveragePlugin>
            <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
            <sonar.clover.reportPath>${project.build.directory}/clover.xml</sonar.clover.reportPath>
            <sonar.sources>bork</sonar.sources>
            <sonar.exclusions>**/clover/src-instrumented/**</sonar.exclusions>
        </properties>
        <build>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-clover2-plugin</artifactId>
                    <version>${clover.version}</version>
                    <configuration>
                        <license>${clover.license}</license>
                        <reportDescriptor>clover-report.xml</reportDescriptor>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>

如果需要,我可以把更多的信息。

Answer 1:

通过DavidRACODON建议

mvn clean clover2:setup install clover2:clover -PSonar 
mvn sonar:sonar -DskipTests -PSonar 


文章来源: Sonar + Clover only runs on src-instrumented