我有一个多模块maven项目,我想得到聚合的万无一失报告。我尝试了下面的方法,但我没有看到聚合的万无一失的报告生成。我可以看到为各个模块生成的报告。
我在indvidual中添加了下面的插件配置(打包jar)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>2.22.0</version>
</dependency>
</dependencies>
<configuration>
<useManifestOnlyJar>false</useManifestOnlyJar>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<aggregate>true</aggregate>
<linkXRef>true</linkXRef>
</configuration>
</plugin>
</plugins>
</reporting>
以下为根级pom (包装类型pom)
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${version.plugin.surefire}</version>
<inherited>false</inherited>
<configuration>
<aggregate>true</aggregate>
<linkXRef>true</linkXRef>
</configuration>
</plugin>
</plugins>
</reporting>
有人能帮我解决问题吗?
发布于 2022-10-26 10:20:56
尝试使用mvn surefire-report:report -Daggregate=true
https://stackoverflow.com/questions/70596159
复制相似问题