You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/02/03 12:34:00 UTC

[jira] Updated: (MCHECKSTYLE-54) checkstyle:check does not see provided scope dependencies

     [ http://jira.codehaus.org/browse/MCHECKSTYLE-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MCHECKSTYLE-54:
-----------------------------------------

    Attachment: MCHECKSTYLE-54.zip
                requires-dep-resolution.patch

Attached are a demo project and a fix.

Using the demo project and the unpatched plugin, the following behavior occurred (with Maven 2.0.8):
Running {{mvn clean checkstyle:checkstyle}} failed to locate the compile-time dependency on log4j whereas {{mvn clean compile}} runs checkstyle as part of the default lifecycle and succeeds.

> checkstyle:check does not see provided scope dependencies
> ---------------------------------------------------------
>
>                 Key: MCHECKSTYLE-54
>                 URL: http://jira.codehaus.org/browse/MCHECKSTYLE-54
>             Project: Maven 2.x Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Stephen Duncan Jr
>            Assignee: Dennis Lundberg
>            Priority: Critical
>             Fix For: 2.2
>
>         Attachments: MCHECKSTYLE-54.zip, requires-dep-resolution.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira