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/06/07 21:30:10 UTC

[jira] Closed: (MPCHECKSTYLE-17) Exception handling always reports missing license file

     [ http://jira.codehaus.org/browse/MPCHECKSTYLE-17?page=all ]
     
Carlos Sanchez closed MPCHECKSTYLE-17:
--------------------------------------

    Resolution: Cannot Reproduce

The offending code is no longer in the plugin, seems already fixed

> Exception handling always reports missing license file
> ------------------------------------------------------
>
>          Key: MPCHECKSTYLE-17
>          URL: http://jira.codehaus.org/browse/MPCHECKSTYLE-17
>      Project: maven-checkstyle-plugin
>         Type: Bug
>     Versions: 2.2
>  Environment: Don't think it matters, but WIN2K
>     Reporter: Dale King

>
>
> I kept trying to figure out why I couldn't get Checkstyle to generate a report. I see it start to run and then all it tells me is the warning that I don't have a license file. That is not true as I do have an empty license file.
> The problem was that I had an error in my Checkstyle XML file. I tried to comment out some checks and accidentally was nesting XML comments, which is illegal.
> So checkstyle was generating an exception and the plugin caught that there was an exception. It's logic tries to check if the exception was due to the lack of a header file. It has the following line:
> <j:when test="${exception.indexOf('unable to load header file') != '-1'}">
> It appears that this test is always evaluating to true. I modified the jelly script to print the content of the exception and this is what the exception was:
> org.apache.commons.jelly.JellyTagException: file:/C:/Documents and Settings/kingd/.maven/plugins/maven-checkstyle-plugin-2.2/:124:63: &lt;ant:checkstyle&gt; Unable to create a Checker: unable to parse C:\Documents and Settings\kingd\My Documents\Eclipse Workspace\NobleWare Utilities\checkstyle.xml - The string "--" is not permitted within comments.:68:13
> I don't know enough about JEXL to diagnose what was wrong. I suspect that the problem is that -1 is in quotes so is taken to be the string "-1" not the number -1. I tried removing the quotes but got a parse error from JEXL. Does JEXL perhaps not support unary minus?
> I was able to get it to work by changing the check to:
> <j:when test="${exception.indexOf('unable to load header file') >= 0}">

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