Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven PMD/checkstyle/findbugs的自定义规则集的建议位置是什么?_Maven_Checkstyle_Findbugs_Pmd - Fatal编程技术网

Maven PMD/checkstyle/findbugs的自定义规则集的建议位置是什么?

Maven PMD/checkstyle/findbugs的自定义规则集的建议位置是什么?,maven,checkstyle,findbugs,pmd,Maven,Checkstyle,Findbugs,Pmd,当将Maven与PMD、Checkstyle和/或Findbugs的各种插件一起使用时,建议将自定义规则集文件放置在什么位置?我通常将它们放置在单独的父pom中,这样我以后可以在其他模块或项目中重用它们。 与checkstyle页面()上的建议类似,但我将其排除在主项目之外 您将文件放置在名为构建工具的模块中,在该模块中您有src/main/resources/your/package和checkstyle和pmd config,然后使用以下配置给定插件: <plugin>

当将Maven与PMD、Checkstyle和/或Findbugs的各种插件一起使用时,建议将自定义规则集文件放置在什么位置?

我通常将它们放置在单独的父pom中,这样我以后可以在其他模块或项目中重用它们。 与checkstyle页面()上的建议类似,但我将其排除在主项目之外

您将文件放置在名为
构建工具
的模块中,在该模块中您有src/main/resources/your/package和checkstyle和pmd config,然后使用以下配置给定插件:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <version>2.17</version>
    <dependencies>
      <dependency>
        <groupId>com.example.whizbang</groupId>
        <artifactId>build-tools</artifactId>
        <version>1.0</version>
      </dependency>
    </dependencies>
  </plugin>
   <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>annotations</artifactId>
        <version>3.0.1</version>
    </dependency>