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

Thomas Leonard commented on MCLOVER-70:
---------------------------------------

We have the same problem. Applying the patch fixes it, but I have to compile 
the plugin with tests disabled (revision 535629), otherwise I get:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.maven.plugin.clover.internal.CloverMojoTest
[debug] Loading license from classpath [targetFile]
[debug] Using license file [targetFile]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec
Running org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.099 sec <<< 
FAILURE!

Results :

Failed tests: 
  
testSwizzleCloverDependenciesWhenCloveredVersionOfDependencyIsNewerThanOriginal(org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest)
testSwizzleCloverDependenciesWhenOriginalVersionOfDependencyIsNewerThanCloveredOne(org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest)

Tests run: 6, Failures: 2, Errors: 0, Skipped: 0


The actual error is:

-------------------------------------------------------------------------------
Test set: org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest
-------------------------------------------------------------------------------
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.098 sec <<< 
FAILURE!
testSwizzleCloverDependenciesWhenCloveredVersionOfDependencyIsNewerThanOriginal(org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest)
  Time elapsed: 0.031 sec  <<< FAILURE!
org.jmock.core.DynamicMockError: mockArtifact: no match found
Invoked: org.apache.maven.artifact.Artifact.getVersionRange()
Allowed:
stub: getClassifier, returns <null>
stub: getGroupId, returns <null>
stub: getArtifactId, returns <null>
stub: getVersion, returns <null>
stub: getType, returns <null>
stub: getScope, returns <null>
stub: getFile, returns <some/file/cloveredArtifact>
stub: getId, returns <null:null:null:null>
stub: setScope, is void
        at org.jmock.core.AbstractDynamicMock.mockInvocation(Unknown Source)
        at org.jmock.core.CoreMock.invoke(Unknown Source)
        at $Proxy2.getVersionRange(Unknown Source)
        at 
org.apache.maven.plugin.clover.CloverInstrumentInternalMojo.swizzleCloverDependencies(CloverInstrumentInternalMojo.java:254)
        at 
org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest.testSwizzleCloverDependenciesWhenCloveredVersionOfDependencyIsNewerThanOriginal(CloverInstrumentInternalMojoTest.java:112)
        at 
org.apache.maven.plugin.clover.CloverInstrumentInternalMojoTest.testSwizzleCloverDependenciesWhenCloveredVersionOfDependencyIsNewerThanOriginal(CloverInstrumentInternalMojoTest.java:112)


> 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