jacoco包括报告中的Apache

问题描述 投票:0回答:1

我是第一次尝试jacoco进行报道:但是jacoco的报告也包括它的apache依赖。enter image description here

这是我的pom。

<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.7.8</version>
    <executions>
        <execution>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
        <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>report</goal>
            </goals>
            <configuration>
                        <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                        <excludes>
                            <exclude>*org/apache/*</exclude>
                        </excludes>
                        <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
                    </configuration>
        </execution>
    </executions>
</plugin>   

我尝试过

<exclude>**/lib/*</exclude> 

也。没有什么可以从报告中删除该Apache覆盖范围。

下面是项目结构。

enter image description here

maven junit jacoco jacoco-maven-plugin
1个回答
0
投票

对于下面的我的代码,排除了工作的可能性

<exclude>**/axis-1.4.jar/**</exclude> 
© www.soinside.com 2019 - 2024. All rights reserved.