[ 
http://jira.codehaus.org/browse/MOJO-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_95636
 ] 

David Vicente commented on MOJO-749:
------------------------------------

i have found the problem.

In the getCoberturaDataFile( MavenProject project ) method,

i retreive all reports from project.getReportPlugins() method.

I iterate to find the cobertura plugin.

if in the pom.xml ( <reporting> section ) , you specify a version as :

<plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>cobertura-maven-plugin</artifactId>
                                <version>2.1-SNAPSHOT</version>
                        </plugin>

it works fine.

but if you let maven using the last version as :
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
</plugin>

the ReportPlugin object has null value for version.

I will correct that as done in cobertura-maven-plugin without using the version 
value of the plugin.

Correction will be commited this day 2007 May 11.


> NPE if dashboard called on parent project
> -----------------------------------------
>
>                 Key: MOJO-749
>                 URL: http://jira.codehaus.org/browse/MOJO-749
>             Project: Mojo
>          Issue Type: Bug
>          Components: dashboard
>            Reporter: Jörg Hohwiller
>            Assignee: David Vicente
>
> On a project where I tried dashboard 1.0-SNAPSHOT today I continously got an 
> NPE.
> The problem only showed up, when dashboard (via site or site:stage) was 
> called on the parent project.
> It worked well on the individual modules. I do not know if that matters but 
> the project-layout was NOT a tree
> but flat. From the stracktrace, I can see that 
> DefaultArtifactVersion.parseVersion was called with a "version" argument of 
> null:
> java.lang.NullPointerException
> at 
> org.apache.maven.artifact.versioning.DefaultArtifactVersion.parseVersion(DefaultArtifactVersion.java:148)
> at 
> org.apache.maven.artifact.versioning.DefaultArtifactVersion.<init>(DefaultArtifactVersion.java:42)
> at 
> org.codehaus.mojo.dashboard.report.plugin.DashBoardUtils.getCoberturaDataFile(DashBoardUtils.java:841)
> at 
> org.codehaus.mojo.dashboard.report.plugin.DashBoardUtils.getCoberturaReport(DashBoardUtils.java:342)
> at 
> org.codehaus.mojo.dashboard.report.plugin.DashBoardUtils.getDashBoardReportBean(DashBoardUtils.java:273)
> at 
> org.codehaus.mojo.dashboard.report.plugin.DashBoardUtils.getDashBoardReportBean(DashBoardUtils.java:235)
> at 
> org.codehaus.mojo.dashboard.report.plugin.DashBoardReportMojo.executeReport(DashBoardReportMojo.java:143)
> at 
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)

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