The following comment has been added to this issue:

     Author: Michael Heuer
    Created: Wed, 19 Jan 2005 3:59 PM
       Body:
I'm not smart enough to set up a development environment for maven plugins, but 
I believe the following changes to CoverageReport.java will do the trick:

In coverage.xml, you see

<coverage src="...
  <class name="org.mydomain.MyClass$InnerClass0">
    <file name="org/mydomain/MyClass.java">
    <line ...
  </class>
  <class name="org.mydomain.MyClass$InnerClass1">
    <file name="org/mydomain/MyClass.java">
    <line ...
  </class>
  <class name="org.mydomain.MyClass">
    <file name="org/mydomain/MyClass.java">
    <line ...
  </class>

But all three html reports are written to a file org/mydomain/MyClass.html.

At line numbers 283, 334, 357, and 367-375 in CoverageReport.java a file name 
based on Clazz.getName() instead of Clazz.getFile() should be created, e.g.

org/mydomain/MyClass$InnerClass0.html
org/mydomain/MyClass$InnerClass1.html
org/mydomain/MyClass.html

I'll leave the simple code fix to someone who knows how to build and deploy 
maven plugins.  :)
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MPJCOVERAGE-18?page=comments#action_29078

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPJCOVERAGE-18

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPJCOVERAGE-18
    Summary: Inner/anonymous classes report uncomplete
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-jcoverage-plugin
   Versions:
             1.0.8

   Assignee: Emmanuel Venisse
   Reporter: Daniel Frey

    Created: Tue, 26 Oct 2004 4:46 PM
    Updated: Wed, 19 Jan 2005 3:59 PM

Description:
Since I use maven (1.0b8 or so) up to now (1.0) I observe that the JCoverage 
plugin does produce wrong results for inner/anonymous classes. I.e. I have got 
a class called ClassOne, which has an anonymouls inner class. The two classes 
are displayed in the coverage report as ClassOnewith 44% and ClassOne$1 with 0% 
tested, which is correct. The underlining reference to the html-file is in both 
cases the same. However, the file displays only the coverage of the inner 
class, the outer class does not contain any counts, red or green lines. 
 
I doublechecked whether the coverage.xml file contains the corresponding 
values, which it does. So it seems to be a problem of the plugin itself.



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to