You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Carlos Sanchez (JIRA)" <ji...@codehaus.org> on 2005/12/27 17:10:57 UTC

[jira] Updated: (MCHECKSTYLE-10) Exception when creating Checkstyle report as part of a 'site' build

     [ http://jira.codehaus.org/browse/MCHECKSTYLE-10?page=all ]

Carlos Sanchez updated MCHECKSTYLE-10:
--------------------------------------

       Priority: Blocker  (was: Major)
        Version: 2.0-beta-2
    Fix Version: 2.0-beta-2

> Exception when creating Checkstyle report as part of a 'site' build
> -------------------------------------------------------------------
>
>          Key: MCHECKSTYLE-10
>          URL: http://jira.codehaus.org/browse/MCHECKSTYLE-10
>      Project: Maven 2.x Checkstyle Plugin
>         Type: Bug

>     Versions: 2.0-beta-2
>  Environment: Windows XP, JDK 1.4.2_10, Maven 2.0.2-SNAPSHOT, maven-checkstyle-plugin 2.0-beta-2-SNAPSHOT
>     Reporter: Nick Giles
>     Priority: Blocker
>      Fix For: 2.0-beta-2
>  Attachments: error_trace.txt
>
>
> When attempting to create a project site including a checkstyle report, the build fails with the attached stack trace. However, when creating a checkstyle report simply by running 'mvn checkstyle:checkstyle', the build is successful and the report is produced.
> From some initial investigation, it appears that the classloader passed in to checkstyle itself by the plugin can locate essential resources when the build is specifically for checkstyle, but cannot locate them when it is invoked as part of a call for 'site'. This can be tested by adding the following lines of code into org.apache.maven.plugin.checkstyle.CheckstyleReport.getModuleFactory(), where 'loader' is the ClassLoader being passed to the PackageNamesLoader:
> 	getLog().info("\n\n\n\nClass loader: " + loader.getClass().getName());
> 	getLog().info("Input stream: " + loader.getResourceAsStream("com/puppycrawl/tools/checkstyle/checkstyle_packages.xml"));
> 	getLog().info("DTD: " + loader.getResourceAsStream("com/puppycrawl/tools/checkstyle/packages_1_0.dtd"));
> These should show jar file URLs if found, and null if not, which will happen respectively when run as 'mvn checkstyle:checkstyle' and 'mvn site'.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org