jqassistant 报告生成失败,Maven 站点
jqassistant Report generation fails with Maven site
我已经成功设置了 jqassistant,创建了一些在我们的 maven 构建中检查的规则。
但是,当我尝试根据检查结果创建报告时,当 运行 mvn 站点时,我从控制台获得了以下信息,当然没有生成报告:
[INFO] --- maven-site-plugin:3.3:site (default-site) @ mvb-bfa ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project- info-reports-plugin:2.8.1
[INFO] configuring report plugin com.buschmais.jqassistant.scm:jqassistant-maven-plugin:1.1.2
[WARNING] ignoring com.buschmais.jqassistant.scm:jqassistant-maven-plugin:1.1.2:report goal since it is not a report: should be removed from reporting configuration in POM
pom.xml的相关部分:
<reporting>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
扫描和分析工作没有问题。
有什么想法吗?
编辑:scan/analyze
的配置
<build>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.1.2</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default</id>
<goals>
<goal>scan</goal>
<goal>analyze</goal>
</goals>
<configuration>
<failOnViolations>false</failOnViolations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
您配置中的问题是您的配置中有 <extensions>true</extensions>
。
来自documentation,插件的基本正确配置如下,注意:
The jQAssistant Maven plugin must be configured in the pom.xml
of the root module, it should not be overwritten by sub-modules.
这意味着此配置需要位于多模块项目中的顶级 POM。
<project>
...
<build>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.1.2</version>
<executions>
<execution>
<id>scan</id>
<goals>
<goal>scan</goal>
</goals>
</execution>
<execution>
<id>analyze</id>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.1.2</version>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
...
</project>
看来当前文档有两个版本 (with and without <extensions>true</extensions>
) because it might be needed in build environments where other extensions are present. An issue was created to track this: https://github.com/buschmais/jqassistant/issues/349
我已经成功设置了 jqassistant,创建了一些在我们的 maven 构建中检查的规则。
但是,当我尝试根据检查结果创建报告时,当 运行 mvn 站点时,我从控制台获得了以下信息,当然没有生成报告:
[INFO] --- maven-site-plugin:3.3:site (default-site) @ mvb-bfa ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project- info-reports-plugin:2.8.1
[INFO] configuring report plugin com.buschmais.jqassistant.scm:jqassistant-maven-plugin:1.1.2
[WARNING] ignoring com.buschmais.jqassistant.scm:jqassistant-maven-plugin:1.1.2:report goal since it is not a report: should be removed from reporting configuration in POM
pom.xml的相关部分:
<reporting>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
扫描和分析工作没有问题。
有什么想法吗?
编辑:scan/analyze
的配置<build>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.1.2</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default</id>
<goals>
<goal>scan</goal>
<goal>analyze</goal>
</goals>
<configuration>
<failOnViolations>false</failOnViolations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
您配置中的问题是您的配置中有 <extensions>true</extensions>
。
来自documentation,插件的基本正确配置如下,注意:
The jQAssistant Maven plugin must be configured in the
pom.xml
of the root module, it should not be overwritten by sub-modules.
这意味着此配置需要位于多模块项目中的顶级 POM。
<project>
...
<build>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.1.2</version>
<executions>
<execution>
<id>scan</id>
<goals>
<goal>scan</goal>
</goals>
</execution>
<execution>
<id>analyze</id>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.buschmais.jqassistant.scm</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.1.2</version>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
...
</project>
看来当前文档有两个版本 (with and without <extensions>true</extensions>
) because it might be needed in build environments where other extensions are present. An issue was created to track this: https://github.com/buschmais/jqassistant/issues/349