Checkstyle 报告不显示图像
Checkstyle report doesn't show images
我将 Checkstyle 添加到我的 Maven 项目中,它正在生成报告,但 image/style 链接已损坏。 target/site/images/
只包含 rss.png。我怎样才能让它正确地生成带有图像的报告?
这是我 pom.xml 的相关部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
我是 运行 专家,通过 IntelliJ 使用 jxr:jxr checkstyle:checkstyle
。我还尝试了来自不同来源的不同配置文件 (checkstyle.xml)。
您必须使用 mvn site
而不是 checkstyle:checkstyle
生成站点才能生成样式。另见此处:https://issues.apache.org/jira/browse/MCHECKSTYLE-127
我将 Checkstyle 添加到我的 Maven 项目中,它正在生成报告,但 image/style 链接已损坏。 target/site/images/
只包含 rss.png。我怎样才能让它正确地生成带有图像的报告?
这是我 pom.xml 的相关部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
我是 运行 专家,通过 IntelliJ 使用 jxr:jxr checkstyle:checkstyle
。我还尝试了来自不同来源的不同配置文件 (checkstyle.xml)。
您必须使用 mvn site
而不是 checkstyle:checkstyle
生成站点才能生成样式。另见此处:https://issues.apache.org/jira/browse/MCHECKSTYLE-127