Maven 2.x and 3.x Site Plugin

Execution order of report plugins is arbitrary if inheritance is involved

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 3.1
  • Component/s: inheritance
  • Labels:
    None
  • Environment:
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

this issue is the clone of http://jira.codehaus.org/browse/MNG-3808

the output of
/opt/development/tools/apache-maven-2.1.0/bin/mvn clean install site -X > sitefull.log
is in attachment with the whole project.
the command was executed in Regression/ComponentB

Feel free to ask more info!
thanks

Issue Links

Activity

Hide
Luca added a comment -

sorry forgot...
as you can see in the log, the last executed report plugin is Source Xref, instead of the expected qa lab.
all reports plugin are specified in the parent

Show
Luca added a comment - sorry forgot... as you can see in the log, the last executed report plugin is Source Xref, instead of the expected qa lab. all reports plugin are specified in the parent
Hide
Brett Porter added a comment -

confirmed. Further investigation is needed and the IT for 3808 enhanced.

Show
Brett Porter added a comment - confirmed. Further investigation is needed and the IT for 3808 enhanced.
Hide
John Casey added a comment -

I've traced the handling of reports through POM inheritance (verified using help:effective-pom), through DefaultPluginManager and DefaultLifecycleExecutor (used to load and gather the reports list when the site plugin requires them), and finally found something here:

http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java

Take a look at the locateReports(..) method, around line 297. This uses a HashMap to reorganize the report instances for execution against a particular Locale. If no custom locales are configured, the english locale is used by default. This is what reorders the reports collection, resulting in the weird behavior you're seeing.

Show
John Casey added a comment - I've traced the handling of reports through POM inheritance (verified using help:effective-pom), through DefaultPluginManager and DefaultLifecycleExecutor (used to load and gather the reports list when the site plugin requires them), and finally found something here: http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java Take a look at the locateReports(..) method, around line 297. This uses a HashMap to reorganize the report instances for execution against a particular Locale. If no custom locales are configured, the english locale is used by default. This is what reorders the reports collection, resulting in the weird behavior you're seeing.
Hide
John Casey added a comment -

linking to previous issue.

Show
John Casey added a comment - linking to previous issue.
Hide
Herve Boutemy added a comment -

first level of fix in r1150948: now it is ok for Maven 3, but not Maven 2 for the moment

Show
Herve Boutemy added a comment - first level of fix in r1150948: now it is ok for Maven 3, but not Maven 2 for the moment
Hide
Herve Boutemy added a comment -

tested in "full-reporting" IT

works with Maven 3 and Maven 2.2.2+ (not yet released, but MNG-5140 fixed)

Show
Herve Boutemy added a comment - tested in "full-reporting" IT works with Maven 3 and Maven 2.2.2+ (not yet released, but MNG-5140 fixed)

People

Vote (2)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: