-
Bug
-
Resolution: Done
-
Trivial
-
21.0.0.Beta1
-
None
-
-
Undefined
-
---
-
---
Eclipse m2e mapping for checkstyle uses version 8.35 (non-configurable - vs 8.5 in pom.xml). As a result, running inside Eclipse has the error (with any checkstyle >= 8.19): TreeWalker has no cacheFile property.
This checkstyle config was updated in wildfly-config-checkstyle 1.0.8.Final to be >= 8.19 compatible.
Summary:
- pom.xml works in maven CLI
- Importing into Eclipse does not work cleanly, due to error messages from newer checkstyle 8.35 and wildfly-checkstyle-config 1.0.7.Final
In shell, force mvn to use checkstyle 8.35 to reproduce the Ecipse error:
# edit parent pom and update checkstyle 8.5 -> 8.35 $ mvn clean checkstyle:checkstyle [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:checkstyle (default-cli) on project helloworld: An error has occurred in Checkstyle report generation.: Failed during checkstyle configuration: cannot initialize module TreeWalker - Property 'cacheFile' does not exist, please check the documentation -> [Help 1]
Update parent pom to use 1.0.8.Final gives a clean goal:
# edit parent pom and update wildfly-checkstyle-config 1.0.7.Final -> 1.0.8.Final $ mvn clean checkstyle:checkstyle [INFO] Scanning for projects... [INFO] [INFO] -----------------< org.wildfly.quickstarts:helloworld >----------------- [INFO] Building Quickstart: helloworld 20.0.1.Final [INFO] --------------------------------[ war ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ helloworld --- [INFO] Deleting /home/vagrant/quickstart/helloworld/target [INFO] [INFO] --- maven-checkstyle-plugin:3.1.1:checkstyle (default-cli) @ helloworld --- [INFO] Starting audit... Audit done. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.529 s [INFO] Finished at: 2020-09-26T10:11:57+08:00 [INFO] ------------------------------------------------------------------------
Software versions:
- OS: Fedora 32, JDK 11.0.8
- Eclipse 2020-09
- JBoss Tools 4.17AM1
- Checkstyle configuration plugin for M2Eclipse 1.1.4.201906210825-r
- Eclipse Checkstyle Plug-in 8.35.0.202008141925