2011-05-30 42 views
1

我目前遇到一个问题,在maven2-android项目中使用Hudson的PMD插件。 我POM这个样子的内的部分:Hudson with PMD-Plugin for android maven2 project

<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的规则集的位置。任何人有地址?

回答

1

使用最新的PMD(4.2.5,2009年2月),包含android.xml文件,其中包含Android-specific rules

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

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

你完全正确。此外,我的配置中有一个拼写错误,我的artifactId应该指向 maven-pmd-plugin,而不是“插件”。 – Rob 2011-05-30 13:35:00

+0

@罗伯特:那么,你最终放入了那个“''”元素? – VonC 2011-05-30 13:41:10

+0

相应的行现在看起来像这样: rulesets/android.xml Rob 2011-05-30 15:06:05