有什么建议吗?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pdf-plugin</artifactId>
<executions>
<execution>
<id>pdf</id>
<phase>site</phase>
<goals>
<goal>pdf</goal>
</goals>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
<includeReports>true</includeReports>
</configuration>
</execution>
</executions>
<dependencies>
<!-- https://mvnrepository.com/artifact/xalan/xalan -->
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>
</dependencies>
</plugin>
答案 0 :(得分:0)
Jacoco的默认输出文件夹值为${project.reporting.outputDirectory}/jacoco
,site
中maven-pdf-plugin
文件夹的默认值为${basedir}/src/site
。
因此,您需要配置maven-pdf-plugin
,以查看Jacoco报告包含的位置。
...
<configuration>
<outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
<includeReports>true</includeReports>
<siteDirectory>${project.reporting.outputDirectory}/jacoco</siteDirectory> <!-- specify your jacoco reports folder-->
</configuration>
...