[ 
http://jira.codehaus.org/browse/MCOBERTURA-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94690
 ] 

Mirko Nasato commented on MCOBERTURA-61:
----------------------------------------

Ok so I downloaded the plugin source code and found this interesting comment in 
class CoberturaInstrumentMojo

            // Old, Broken way
            System.setProperty( "net.sourceforge.cobertura.datafile", 
dataFile.getPath() );

            /* New, Fixed way.
             * See 
https://sourceforge.net/tracker/index.php?func=detail&aid=1543280&group_id=130558&atid=720017
             * for patch to Cobertura 1.8 that fixes the datafile location.
             */
            Properties props = new Properties();
            props.setProperty( "net.sourceforge.cobertura.datafile", 
dataFile.getPath() );

I then applied the patch from the mentioned issue to Cobertura 1.8, recompiled 
and copied the patched cobertura.jar into my local Maven repository. Surely 
enough that fixed the problem.

Basically the Maven plugin v2.1 requires a patched version of Cobertura 1.8. 
Maybe this patched version should be made available in the Maven repository? 
(Ideally that should have been done before releasing the plugin...)


> HTML report shows all 100% but cobertura:check shows correct coverage - only 
> in 2.1, works in 2.0
> -------------------------------------------------------------------------------------------------
>
>                 Key: MCOBERTURA-61
>                 URL: http://jira.codehaus.org/browse/MCOBERTURA-61
>             Project: Maven 2.x Cobertura Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: java 1.5.2_10, maven 2.0.4, windows XP SP2
>            Reporter: James Burton
>
> The cobertura HTML report shows everything 100%, yet the cobertura:check goal 
> shows correct percentages complains about very low coverage, which is 
> correct. 
> The HTML report is correct when I use your plugin version 2.0, and this error 
> only shows up in 2.1.
> Here are my dependencies, from the Maven site generator...
> asm   asm-all 2.2.3   -       jar     
> aspectj       aspectjrt       1.5.2a  -       jar     
> aspectj       aspectjweaver   1.5.2a  -       jar     
> cglib cglib-nodep     2.1_3   -       jar     
> commons-dbcp  commons-dbcp    1.2     -       jar     
> commons-lang  commons-lang    2.2     -       jar     
> freemarker    freemarker      2.3.8   -       jar     
> ibatis        ibatis  2.3.0   -       jar     
> net.sourceforge.jtds  jtds    1.2     -       jar     
> org.codehaus.xfire    xfire-java5     1.2.4   -       jar     
> org.codehaus.xfire    xfire-jaxb2     1.2.4   -       jar     
> org.codehaus.xfire    xfire-spring    1.2.4   -       jar     
> org.springframework   spring  2.0.1   -       jar     
> org.springframework   spring-mock     2.0.1   -       jar     
> quartz        quartz  1.5.2   -       jar     
> taglibs       standard        1.1.2   -       jar     

-- 
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to