简体   繁体   中英

Getting coverage from .war-dependency in multi-module-project

I have setup a Jacoco-subproject to allow Jacoco to handle multi-module-projects in my maven-project as described here . The Jacoco project depends on all .jar-modules in my project as described in the tutuorial. But this setup only seems to work for .jar-files. Instead of understanding that my .war-project produces a .war-file Jacoco is looking for a .jar.

What do I have to do to make the .war-file to get coverage?

maybe this issue will help.

Just add <type>war</type> to the dependency in the dedicated module.


but after doing that, I got another error:

Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.4.RELEASE:repackage failed: Unable to find main class -> [Help 1]

after add <packaging>pom</packaging> to the dedicated module for collecting all test result, jacoco works as usual.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM