Issue Details (XML | Word | Printable)

Key: MNG-3808
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Brett Porter
Reporter: David Vicente
Votes: 32
Watchers: 22
Operations

If you were logged in you would be able to see more operations.
Maven 2

Execution order of report plugins is arbitrary if inheritance is involved

Created: 03/Nov/06 01:48 AM   Updated: 24/Apr/09 12:30 PM
Component/s: Inheritance and Interpolation, Plugins and Lifecycle, Sites & Reporting
Affects Version/s: 2.0.9
Fix Version/s: 2.0.11, 2.1.0

Time Tracking:
Not Specified

File Attachments: 1. Text File MNG-3808.patch (12 kB)

Environment: maven 2.0.4, windows 2000
Issue Links:
Related

Complexity: Intermediate
Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
I have created a maven 2 report : Dashboard report which aggregate all reports results in one report.

My plugin must be executed as the last one even if i can't bind the "post-site" phase or use the "aggregator" annotation.

I declare my report plugin as the last one in the reporting section of my POM.

When i run mvn site on a single project, it's ok, my plugin has been executed as the last one.

The reports list has been ordered as declared in my POM.

But if i run "mvn site" on a multi-project POM, the reports list isn't ordered as before.

I think, it's the same problem as http://jira.codehaus.org/browse/MNG-1994?page=all



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Benoit Xhenseval added a comment - 07/Nov/06 09:00 AM
We have exactly the same problem here....
Where does Maven determine the order for reports?

John Allen added a comment - 23/Jul/07 12:36 PM
Execution order of plugin's is something that has had quite a bit of discussion about but I'm afraid I have no specific URLs to let you catch up with the current thinking re this.

Danilo Eiji Seki added a comment - 12/Feb/08 02:23 PM
I noticed something strange and made a test. I suspected plugins/reports were being executed in alphabetic order (first by groupId, then by artifactId) and so they are!

For example, I have a problem generating QALab reports in child projects, because QALab plugin was always executed before the reports that generate data. Then I noticed the reports were generated almost in the order I specify them (I use the above alphabetic order, expept for the QALab plugin, that is the last one). Then I imagined that maybe that happens because all my reports are from org. groups while QALab belongs to net..

I tested it by creating a dummy plugin by renaming the groupId of a QALab report plugin to zzz.net.objectlab and deploying it to my local repository. Then I changed my root dependency to this new one and magic, IT WORKS.

I suspect someone is using a sorted collection (tree set, etc). Some display-beautifuly-list is messing things up.


Carlos Sanchez added a comment - 29/Oct/08 12:01 AM
Patch against 2.1.x with unit test

mergeReportPluginLists behavior copied from mergePluginLists which was fixed in related issues


Carlos Sanchez added a comment - 29/Oct/08 12:03 AM
also for some reason, as commented in the unit test, the configurations of reports don't seem to be merged

Brett Porter added a comment - 06/Feb/09 04:47 AM
applied

Luca added a comment - 27/Mar/09 07:24 AM
using 2.1 the order is still not respected, I define in the parent a couple of report plugins and when the site phase is executed on the child, the order is not respected

Paul Benedict added a comment - 29/Mar/09 08:48 PM
Carlos, was this patch properly applied to 2.1?

Brett Porter added a comment - 29/Mar/09 08:52 PM
I applied it, and created an IT. Please compare your use case to the IT, and file a new issue against 2.1.0 with a sample project if there is a problem.