我已经成功地设置了jq助手,创建了一些在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 POMPom.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>扫描和分析是没有问题的。
有什么想法吗?
编辑:扫描/分析的配置
<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>发布于 2016-02-26 13:51:58
配置中的问题是配置中有<extensions>true</extensions>。
在文档中,插件的基本正确配置如下,并注意:
jQAssistant Maven插件必须在根模块的
pom.xml中配置,不应该被子模块覆盖。
这意味着这种配置需要在一个多模块项目中的顶级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>目前的文档似乎有两个版本(使用和不带 <extensions>true</extensions>),因为在存在其他扩展的构建环境中可能需要它。创建了一个问题来跟踪这个问题:https://github.com/buschmais/jqassistant/issues/349
https://stackoverflow.com/questions/35653212
复制相似问题