<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
<suppressionsLocation>config/checkstyle-suppressions.xml</suppressionsLocation>
During the build modules look for checkstyle-suppressions.xml at its own directory not parent and checkstyle plugin just simply ignores the error when file not found. Some people had the same problem with me on Stackoverflow and here too. I just choose the easy solution to add a new property in both parent and children pom files to set the correct location of the config file.
parent pom
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
<suppressionsLocation>${main.basedir}/config/checkstyle-suppressions.xml</suppressionsLocation>
<main.basedir>${project.basedir}</main.basedir>
children pom
<main.basedir>${project.basedir}/..</main.basedir>
And there is another way, I guess the better one, to share resource across project in Maven here.
No comments:
Post a Comment