试图清理我的${project.build.directory}
,我注意到maven-checkstyle-plugin
将三个文件放入我的target
文件夹checkstyle-checker.xml
中:checkstyle-cachefile
和checkstyle-result.xml
.
我能够将最后两个重定向到他们自己的文件夹中target/checkstyle
:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<cacheFile default-value="${project.build.directory}/checkstyle/checkstyle-cachefile"/>
<configLocation>google_checks.xml</configLocation>
[...]
<outputFile default-value="${project.build.directory}/checkstyle/checkstyle-result.xml">${checkstyle.output.file}</outputFile>
</configuration>
[...]
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
我能找到的所有信息checkstyle-checker
都在propertiesLocation下。有说:
如果成功解析,属性位置的内容将被复制到 ${project.build.directory}/checkstyle-checker.properties 文件中,然后再传递给 Checkstyle 进行加载。
我可以更改将属性位置的内容复制到的位置吗?还是有另一种方法可以让插件将checkstyle-checker.xml
文件写入我的自定义文件夹target/checkstyle
?