【问题标题】:FindBugs gives error in Jenkins by a GWT projectFindBugs 通过 GWT 项目在 Jenkins 中给出错误
【发布时间】:2011-10-20 07:44:22
【问题描述】:

我将 Jenkins 安装为 CI 工具。我还安装了 findbugs 插件来查找潜在的错误。 (还有 checkstyle、pmd 等)。 我的项目是一个使用 maven 结构的 gwt 项目。 我在jenkins配置页面中写了目标来执行findbugs。

clean package findbugs:findbugs

但是我收到以下错误,并且没有从 findbugs 中得到任何结果。其他插件工作正常。

[INFO] Fork Value is true 
    [java] The following classes needed for analysis were missing: 
    [java]   com.google.gwt.core.client.GWTBridge 
    [java] Missing classes: 2  
[INFO] xmlOutput is false

FindBugs 有什么不同?我应该改变什么?

【问题讨论】:

标签: gwt jenkins findbugs


【解决方案1】:

这将在升级的 gwt-2.5.1 版本中修复,补丁在这里http://gwt-code-reviews.appspot.com/1722803。

解决方法 - 将 gwt-dev 添加到类路径 - https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit-contributors/JQCU4mQWNX0

    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <scope>provided</scope>
        <version>2.5.0</version>
    </dependency>

这为我消除了 GWTBridge 警告。

【讨论】:

    【解决方案2】:

    我认为这是因为 findbugs 在 JAR 中看到了 GWT 源。我们在 findbugs-maven-plugin 配置中使用 &lt;onlyAnalyze&gt;com.mycompany.&lt;/onlyAnalyze&gt; 解决了这个问题。

    【讨论】:

    • 它不在 Jenkins 中,它在您的 pom.xml 中。
    • 我就这样改变了 pom。但是没有效果codeorg.codehaus.mojofindbugs-maven-plugin2.3.21.6 de.company.
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-27
    • 2015-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多