After adding module-info.java
files to my project my checkstyle plugin start failing with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default-cli) on project email: Failed during checkstyle configuration: NoViableAltException occurred during the analysis of file /home/xxx/IdeaProjects/blynk-server/server/notifications/email/src/main/java/module-info.java. unexpected token: module -> [Help 1]
I tried
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
However, it failed with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default-cli) on project blynk: Failed during checkstyle configuration: cannot initialize module BeforeExecutionExclusionFileFilter - Unable to instantiate 'BeforeExecutionExclusionFileFilter' class, it is also not possible to instantiate it as com.puppycrawl.tools.checkstyle.checks.annotation.BeforeExecutionExclusionFileFilter
What is the correct way for skipping module-info.java
files during checkstyle for maven-checkstyle-plugin?
module-info.java
, isn't it? – Govern