我有具有作为行家依赖性的jar文件,它包括其中i存储在我的规则CheckStyle的一个XML文件的一个项目。我认为这将是确定只使用此配置: mycheckstyle.xml 。我的理解是,文件应搜索的类路径和我的jar文件是一个Maven的依赖,所以应该可以找到,但是我得到未发现异常的资源。有什么建议么?由于事先..

裤裤

有帮助吗?

解决方案

尝试添加依赖关系部分到您的插件的配置。

如,

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <dependencies>
      <dependency>
        <groupId>com.example.whizbang</groupId>
        <artifactId>build-tools</artifactId>
        <version>1.0</version>
      </dependency>
    </dependencies>
  </plugin>

请参阅的Maven Checkstyle的插件 - 多模块配置获得更多信息。

scroll top