[ 
http://jira.codehaus.org/browse/MCOBERTURA-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=264446#action_264446
 ] 

Mirko Friedenhagen commented on MCOBERTURA-145:
-----------------------------------------------

Benson,

as stated by the expert (glossar: {{maven-project-info-reports}} = {{MPIR}}), 
here my wild guesses:
* {{getOutputName}} of the childMojos is used as a sort of key during the run 
of MPIR.
* MIPR looks for the existence of a file called {{childMojo.getOutputName() + 
".html"}} in *it's own* {{getReportOutputDirectory}}, resulting in 
{{target/site/index.html}} for cobertura without the patch and not the value 
{{target/site/cobertura/index.html}} as you would expect of the coberturaMojo.
* But {{target/site/index.html}} is the complete outputname of {{MIPR}} itself. 
As it already did start to write to this file, the file exists and so execution 
is skipped (sort of optimization to not run reports twice).
* Most other reporting mojos (findbugs, checkstyle) just have one output file, 
use {{target/site}} and name their outputName like {{findbugs.html}} or 
{{pmd.html}}, so no collision arises.
* You could argue, that using 
{{reportMojo.getReportOutputDirectory().getParent()}} in the test is just a 
dirty hack for getting back to {{target/site}} ;-).
* To my understanding {{getOutputName()}} is only used by MIPR.
* The patch does not touch {{getReportOutputDirectory()}} at all, only the test 
is affected.

Regards
Mirko


> Regression: report will not be rendered on invocation of mvn clean install 
> site for a multi module project.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: MCOBERTURA-145
>                 URL: http://jira.codehaus.org/browse/MCOBERTURA-145
>             Project: Maven 2.x Cobertura Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>         Environment: maven-3.0.3, maven-cobertura-plugin 2.5
>            Reporter: Mirko Friedenhagen
>         Attachments: cobertura-2.4-x-with-project-reports.log, 
> cobertura-2.4-x.log, cobertura-2.4.log, 
> cobertura-2.5-x-with-project-reports.log, 
> cobertura-2.5-x-without-project-reports.log, cobertura-2.5-x.log, 
> cobertura-2.5.log, MCOBERTURA-145.patch
>
>
> When switching from 2.4 to 2.5 invocation of {{mvn clean install site}} will 
> not render neither the html nor the xml report anymore in a multimodule 
> project. A test project may be found at: 
> https://github.com/mfriedenhagen/multi-module-sample/commit/62c5ec2d8bfc1c0420f7e6a701032300894eaa98.

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