Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Running checkstyle:check against a project that uses Exceptions from dependencies that are provided scope causes checktyle errors such as the following:
<file name="/share/duncans/workspace/eclipse/cdcie-webapp-feedreader/src/main/java/mil/jfcom/cie/portal/feedreader/converter/ConverterImpl.java">
<error line="0" severity="error" message="Got an exception - java.lang.RuntimeException: Unable to get class information for ValidationException." source="com.puppyc
rawl.tools.checkstyle.TreeWalker"/>
These errors go away when the scope is changed to compile. This does not happen for checkstyle:checkstyle; the report correct indicates no checkstyle errors. This is preventing us from using the checkstyle plugin to enforce checkstyle rules.
Attachments
Issue Links
| This issue relates to: | ||||
| MPCHECKSTYLE-20 | Unable to get class information for custom exceptions |
|
|
|
| MCHECKSTYLE-89 | java.lang.RuntimeException: Unable to get class information for XXXException |
|
|
|
This issue also affects Maven 2.0.4 and 2.0.5, not just 2.1. I've tested and confirmed the presence of this issue on Windows XP and Linux (Fedora Core), JDK 5 and JDK 6 alike. I've sent full details of my situation to the Maven users list just now.
Having <scope>provided</scope> is fairly common, as you know. Many Java webapps, for example, include the servlet-api, jsp-api, and related jars with provided scope on their classpath. So here's my vote for fixing it soon