说明:web为启动模块,依赖关系:web->service->manager->dao->entity+common
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="/POM/4.0.0" xmlns:xsi="/2001/XMLSchema-instance"
xsi:schemaLocation="/POM/4.0.0 /xsd/maven-4.0.0.xsd">    <modelVersion>4.0.0</modelVersion>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mx-vehicle-parts-management-test</name>
<parent>
<groupId&server.tsp</groupId>
springboot结构
<artifactId>mx-vehicle-parts-management</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<dependencies>
<!-- 依赖所有⼦模块  -->
<dependency>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-web</artifactId>
</dependency>
<dependency>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-service</artifactId>
</dependency>
<dependency>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-manager</artifactId>
</dependency>
<dependency>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-dao</artifactId>
</dependency>
<dependency>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-entity</artifactId>
</dependency>
<dependency>
<groupId&server.tsp</groupId>
<artifactId>mx-vehicle-parts-management-common</artifactId>
</dependency>
</dependencies>
</project>
综上,为了合并多module的代码测试覆盖率统计报告,
(1)采⽤了JaCoCo插件,
(2)且单独为了聚合统计报告⽽新建了⼀个test模块,当前模块没有任何代码,只是显式依赖了其他所有⼦模块,
缺陷:
test模块除了⽣成聚合报告,没有任何实际作⽤,且所有Springboot多模块项⽬为了聚合代码测试覆盖率报告都需要单独建⽴⼀个test模块,成本有点⼤,且引⼊了多余的test模块(破环了项⽬原有结构),希望⽇后到更好的⽅法......

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。