jqassistant报告生成因Maven站点而失败

时间:2016-02-26 13:38:56

标签: java maven jqassistant

我已成功设置jqassistant,创建了一些在我们的maven构建中检查的规则。

但是,当我尝试根据检查结果创建报告时,我在运行mvn网站时得到以下信息,当然没有生成报告:

ofImage

pom.xml的相关部分:

var lineSymbol = {
path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW
};

var poly = new google.maps.Polyline({
strokeColor: color,
strokeOpacity: 0.5,
icons: [{
icon: lineSymbol,
offset: '50%'
}],
...
});

扫描和分析工作没有问题。

任何想法?

修改:扫描/分析配置

[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

1 个答案:

答案 0 :(得分:3)

配置中的问题是您的配置中有<extensions>true</extensions>

documentation开始,插件的基本正确配置如下,请注意:

  

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>

当前文档似乎有两个版本(withwithout <extensions>true</extensions>),因为在存在其他扩展的构建环境中可能需要它。创建了一个问题来跟踪此问题:https://github.com/buschmais/jqassistant/issues/349