[ 
https://jira.codehaus.org/browse/MCLIRR-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272637#comment-272637
 ] 

Bruno Marti commented on MCLIRR-37:
-----------------------------------

Additional info.
I think, the real problem is in AbstractClirrMojo, line 613:
{code}
  if ( classesDirectory.exists() )
{code}
Because of the maven compiler plugin will always create an empty 
'target\classes' directory even if there are no source classes to compile.
So "canGenerate()" gets "true" and the reporting will fail.

> ClirrReport throws java.lang.NegativeArraySizeException
> -------------------------------------------------------
>
>                 Key: MCLIRR-37
>                 URL: https://jira.codehaus.org/browse/MCLIRR-37
>             Project: Maven 2.x Clirr Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: win xp, maven 3.0.3
>            Reporter: Bruno Marti
>
> if there is an modul with no classes, clirr report (mvn clirr:clirr -e) 
> throws NegativeArraySizeException.
> {noformat}
> Caused by: java.lang.NegativeArraySizeException
>         at 
> org.codehaus.mojo.clirr.AbstractClirrMojo.reportDiffs(AbstractClirrMojo.java:669)
>         at 
> org.codehaus.mojo.clirr.AbstractClirrMojo.executeClirr(AbstractClirrMojo.java:263)
>         at org.codehaus.mojo.clirr.ClirrReport.doReport(ClirrReport.java:243)
>         at org.codehaus.mojo.clirr.ClirrReport.generate(ClirrReport.java:219)
>         at org.codehaus.mojo.clirr.ClirrReport.generate(ClirrReport.java:355)
>         at org.codehaus.mojo.clirr.ClirrReport.doExecute(ClirrReport.java:182)
>         at 
> org.codehaus.mojo.clirr.AbstractClirrMojo.execute(AbstractClirrMojo.java:200)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> {noformat}
> Because of currentClasses array size is 0. I think the problem is on line 669:
> {code:title=AbstractClirrMojo.java}
> JavaType[] currentClasses2 = new JavaType[currentClasses.length - 1]
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to