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

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   Resolved: 06/Feb/09 04:47 AM
Return to search
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



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?


Brett Porter made changes - 21/Feb/07 08:54 PM
Field Original Value New Value
Reporter David vicente [ d.vicente ] David Vicente [ dvicente72 ]
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 made changes - 28/Oct/08 08:59 PM
Link This issue relates to MNG-1994 [ MNG-1994 ]
Carlos Sanchez made changes - 28/Oct/08 09:00 PM
Affects Version/s 2.0-beta-4 [ 12200 ]
Affects Version/s 2.0.9 [ 13801 ]
Complexity Intermediate
Key MSITE-188 MNG-3808
Project Maven 2.x Site Plugin [ 11146 ] Maven 2 [ 10500 ]
Carlos Sanchez made changes - 28/Oct/08 09:04 PM
Component/s Sites & Reporting [ 12030 ]
Component/s Plugins and Lifecycle [ 11340 ]
Component/s Inheritance and Interpolation [ 11570 ]
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 made changes - 29/Oct/08 12:01 AM
Attachment MNG-3808.patch [ 37775 ]
Carlos Sanchez made changes - 29/Oct/08 12:02 AM
Testcase included yes
Patch Submitted [Yes]
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 made changes - 17/Dec/08 07:18 PM
Fix Version/s 2.1.0-M2 [ 14587 ]
Brett Porter added a comment - 06/Feb/09 04:47 AM

applied


Brett Porter made changes - 06/Feb/09 04:47 AM
Assignee Brett Porter [ brettporter ]
Resolution Fixed [ 1 ]
Fix Version/s 2.0.11 [ 14118 ]
Status Open [ 1 ] Closed [ 6 ]
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.


Brett Porter made changes - 31/Mar/09 07:16 PM
Link This issue is related to MNG-4118 [ MNG-4118 ]
John Casey made changes - 24/Apr/09 12:30 PM
Link This issue relates to MSITE-402 [ MSITE-402 ]