[ 
http://jira.codehaus.org/browse/MCLOVER-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96236
 ] 

Indrajit Khare commented on MCLOVER-70:
---------------------------------------

I applied the patch to a version of the 2.5 code base I have on my system and 
noticed that though the clover dependencies were being resolved by swizzle 
correctly they weren't being used in the classpath unless they were direct 
dependencies.  I added some debug output in the swizzle method and noticed that 
it was being called twice.  Once for direct dependencies as defined in the pom 
file and once for all the dependencies (including transtive dependencies).  The 
ones in the transitive dependencies were then not in the classpath for any 
other mojo (compile, testCompile, surefire:test].

But with this patch there is now a pattern to the madness, and if I add all 
transitive dependencies as an explicit dependency in the pom then the correct 
clover artifacts are used, thus giving the comprehensive coverage I need.

> Non-Clovered Jars used for Transitive Dependencies
> --------------------------------------------------
>
>                 Key: MCLOVER-70
>                 URL: http://jira.codehaus.org/browse/MCLOVER-70
>             Project: Maven 2.x Clover Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: James Olsen
>         Attachments: mclover-70.patch
>
>
> When executing tests or building ear/war archives, the plugin is not using 
> instrumented jars for transitive dependencies.  The ordinary jar is used 
> instead.  Hence no test coverage stats are obtained for those components.  
> Adding the transitive dependency as a direct dependency on the project 
> results in both the instrumented and plain jar appearing in the archive.  I 
> presume the same also happens for the unit test classpath although I haven't 
> confirmed.
> The plugin should use the instrumented version of the jar where available 
> regardless of whether the dependency is direct or transitive.

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

        

Reply via email to