【问题标题】:Hudson with PMD-Plugin configured for android maven2 project为 android maven2 项目配置 PMD-Plugin 的 Hudson
【发布时间】:2011-05-30 06:46:26
【问题描述】:

我目前在 maven2-android 项目上使用 Hudson 的 PMD 插件时遇到了问题。 我的 POM 中的部分如下所示:

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugins</artifactId>
        <configuration>
          <linkXref>true</linkXref>
          <sourceEncoding>UTF-8</sourceEncoding>
          <targetJdk>1.6</targetJdk>
          <rulesets>
            <ruleset>Where should this point?</ruleset>
          </rulesets>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

不幸的是,我找不到任何关于 android-ruleset 的位置。有人知道地址吗?

【问题讨论】:

    标签: android maven-2 hudson pmd


    【解决方案1】:

    在最新的 PMD(4.2.5,2009 年 2 月)中,包含一个 android.xml 文件和 Android-specific rules

    您可以尝试引用该文件,有点像this thread

    <ruleset>rulesets/android.xml</ruleset>
    

    【讨论】:

    • 你完全正确。此外,我的配置中有错字,我的 artifactId 应该指向 maven-pmd-plugin,而不是“plugins”。
    • @Robert:那么,你最终在“&lt;ruleset&gt;”元素中添加了什么?
    • 对应的行现在看起来像这样:rulesets/android.xml
    • @罗伯特:非常好。我已将其包含在答案中以提高知名度。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-06-01
    • 2011-03-22
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-28
    相关资源
    最近更新 更多