maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David M. Karr" <>
Subject Re: Why is checkstyle failing on one project, but not others?
Date Fri, 15 Jan 2016 16:44:08 GMT

On 01/14/2016 04:37 PM, wrote:
> Hello,
> Most likely the source directory is (incorrectly) overwritten at the compile plugin (or
it is compiled by the parent pom or some other strange mechanisms like an ant plugin). The
-X output (together with the effective pom) should tell you that as well.
> Removing the <sourceDirectory>, moving the files to src/main/java and removing
all properties or compile plugin options would be the proper cleanup action to plan for the
long run ,)
Certainly everything should be in "src/main/java".  In the meantime, I'd 
like to fully understand what's happening here.

After analyzing the "-X" output, I found that if I store my source in 
"src" and not set "sourceDirectory", the compiler plugin works fine (it 
looks in both "src/main/java" and "src" silently), but checkstyle 
apparently only looks in "src/main/java".  If I instead set 
"sourceDirectory" to "src", both the compiler and checkstyle plugins 
only look in "src".

This seems like a flaw in the checkstyle plugin to me.  It should be 
using the same source directories that were used by the compiler plugin.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message