【发布时间】:2018-05-26 04:21:24
【问题描述】:
我在 pom.xml 中使用 Apache Maven Checkstyle 插件。 我正在尝试从检查样式扫描中排除目标目录,但到目前为止还没有运气。这是我正在尝试的 pom 代码。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>checkstyle-check</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>checkstyles.xml</configLocation>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<consoleOutput>true</consoleOutput>
<includes>**\/*.java,**\/*.groovy</includes>
<excludes>**WHAT GOES HERE TO EXCLUDE THE TARGET DIRECTORY**</excludes>
</configuration>
</plugin>
【问题讨论】:
-
默认不自动排除输出目录吗?
-
这里已经讨论了这个问题并提供了建议的解决方案:stackoverflow.com/questions/2362652/…
标签: java maven pom.xml maven-checkstyle-plugin