Maven plugin doesn't respect sourceDirectory/testSourceDirectory configurations
One of our projects uses a non-standard directory structure: src/com/... instead of src/main/java/com/... Maven has a sourceDirectory and testSourceDirectory configuration to support this. For example:
...
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
...
Unfortunately, the Spotless Maven plugin hard-codes the standard paths here: com.diffplug.spotless.maven.java.Java#DEFAULT_INCLUDES. Because of that, it doesn't find any files to analyze in this project. As a workaround, the paths can be configured through <includes>, but it really should pick it up from the standard Maven configuration parameters.
Work-around:
...
<java>
<includes>
<include>src/**/*.java</include>
<include>test/**/*.java</include>
</includes>
...
Honestly, I'm fine with this getting closed as a won't-fix as it's unusual and has a workaround. Just wanted to add some key-words to the bug database because I would have found the solution quicker if this bug report existed :)