Trying to clean up my ${project.build.directory}
, I noticed that maven-checkstyle-plugin
puts three files into my target
folder: checkstyle-checker.xml
, checkstyle-cachefile
and checkstyle-result.xml
.
I was able to redirect the last two into their own folder 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>
All I could find about checkstyle-checker
is under propertiesLocation.
There is says:
If successfully resolved, the contents of the properties location is copied into the ${project.build.directory}/checkstyle-checker.properties file before being passed to Checkstyle for loading.
Can I change the location the contents of the properties location are copied into? Or is there another way to make the plugin write the checkstyle-checker.xml
file into my custom folder target/checkstyle
?
mvn clean
(and sleep tight;) – Anything