小编cac*_*bre的帖子

Jacoco 如何正确排除包

我正在使用 Jacoco Maven 插件版本 0.8.1(使用 Java 8 / Maven 3.1.0)。无法让 Jacoco 使用路径排除。我想排除这些包:

  • my.package.model
  • my.package.exception

我试过的:

<build>
      <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.1</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>  
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>my.package.model</exclude>
                        <exclude>my.package.exception</exclude>
                    </excludes>
                </configuration>
            </plugin>
      </plugins>
</build>

<reporting>
        <plugins>
             <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.1</version>
                <configuration>
                    <excludes>
                        <exclude>my.package.model</exclude>
                        <exclude>my.package.exception</exclude>
                    </excludes>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
</reporting>
Run Code Online (Sandbox Code Playgroud)

还有(就excludes部分而言):

<excludes>
     <exclude>my.package.model**</exclude>
     <exclude>my.package.exception**</exclude>
</excludes>

<excludes>
     <exclude>my/package/model/**/*</exclude>
     <exclude>my/package/exception/**/*</exclude>
</excludes>

<excludes>
     <exclude>*/my/package/model/**/*</exclude>
     <exclude>*/my/package/exception/**/*</exclude>
</excludes>

<excludes>
     <exclude>**/my/package/model/**/*</exclude>
     <exclude>**/my/package/exception/**/*</exclude>
</excludes>

<excludes> …
Run Code Online (Sandbox Code Playgroud)

java maven jacoco

6
推荐指数
2
解决办法
2万
查看次数

Java Applet "ClassNotFoundException" on Firefox 52.4.1 - works on IE

We need to run an old web application which using Java 8 Applet (sick), on Firefox 52.4.1 (last version compatible with Java Applet) and Internet Explorer 11.

The applet is based on Java 8 and distributed by an Apache Tomcat server. It is signed and obfuscated (Proguard).

The user connect to the website with SSL mutual authentication from a smartcard (The client needs a PKCS11 module to get the certificate from the smartcard). The SSL mutual authentication is also done …

java ssl firefox applet pkcs#11

5
推荐指数
1
解决办法
115
查看次数

标签 统计

java ×2

applet ×1

firefox ×1

jacoco ×1

maven ×1

pkcs#11 ×1

ssl ×1