[ http://jira.codehaus.org/browse/MCOBERTURA-2?page=comments#action_60887 ] 

Dave Sag commented on MCOBERTURA-2:
-----------------------------------

I've looked into this a bit further building a multi-project build and the very 
latest cobertura from SVN:

First up I get similar results as reported in issue MCOBERTURA-5, namely that 
if i try to run a multi-project build i end up with no cobertura report.  It 
*says* its doing it, but i end up with no report files.  I do get a link to the 
non-existing file in the left hand navigation however.

If I run as a single project (that still refers to the parent pom for its 
config) I get the cobertura files but in one case it claims there were no tests 
and so i get a lot of red lines.  In another case it seems to work okay but I 
get the occasional warning as per my comment above, namely: 

[cobertura] INFO [main] 
net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find source 
file during CCN computation, source=[org/epo/......]

cheers dave

> Cobertura fails in multi-project
> --------------------------------
>
>          Key: MCOBERTURA-2
>          URL: http://jira.codehaus.org/browse/MCOBERTURA-2
>      Project: Maven 2.x Cobertura Plugin
>         Type: Bug

>     Reporter: Jurgen De Landsheer
>      Fix For: 2.0

>
>
> when you add the cobertura in the base pom of a multi project, it fails
> <packaging>pom</packaging>
> java.lang.NullPointerException
>       at java.util.HashSet.<init>(HashSet.java:99)
>       at 
> org.codehaus.mojo.cobertura.CoberturaInstrumentMojo.addCoberturaDependenciesToTestClasspath(CoberturaInstrumentMojo.java:137)
>       at 
> org.codehaus.mojo.cobertura.CoberturaInstrumentMojo.execute(CoberturaInstrumentMojo.java:103)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:859)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:731)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:522)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

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