Maven 2 & 3

site generation with 2.0.9 and plugin:report (2.4 ONLY) is broken

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.9
  • Fix Version/s: 2.0.9
  • Component/s: Plugins and Lifecycle
  • Labels:
    None
  • Number of attachments :
    0

Description

Generating a site that works in 2.0.8 breaks in 2.0.9 with an exception: Caused by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/module/site/manager/SiteModuleNotFoundException

There is already a committed IT for this. It may be related to issues with MPLUGIN-104, however in this case the 2.4 version of the plugin does work in 2.0.8 so we need to investigate it in the core as well.

Issue Links

Activity

Hide
John Casey added a comment -

Rolled back the switch from HashSet to LinkedHashSet for plugin dependencies, which was originally changed in the commit for MNG-3426. We do need that change, but for now it breaks at least the plugin:report execution when run from within the site lifecycle phase...the result is the exception reported in the description of this issue.

I'll open a new issue to get this fixed in the next Maven release.

Show
John Casey added a comment - Rolled back the switch from HashSet to LinkedHashSet for plugin dependencies, which was originally changed in the commit for MNG-3426. We do need that change, but for now it breaks at least the plugin:report execution when run from within the site lifecycle phase...the result is the exception reported in the description of this issue. I'll open a new issue to get this fixed in the next Maven release.
Hide
John Casey added a comment -

The issue with the plugin plugin isn't the LinkedHashSet...it's incorrect ordering of dependencies in the plugin's POM, and a change in the artifact-resolution code that uses an ordered set now where it didn't used to.

I've verified that the ordering of artifacts resolved for the same plugin POM is different between 2.0.8 and the 2.0.9 code, where the 2.0.9 resolution order is actually correct...the plugin POM specifies dependencies on maven-reporting-impl 2.0.4 and doxia-site-renderer 1.0-alpha-10 IN THAT ORDER. This means that it resolves:

  1. maven-reporting-impl 2.0.4 -> doxia-core 1.0-alpha-7
  2. doxia-site-renderer 1.0-alpha-10 -> doxia-core 1.0-alpha-10

and, since it sees -alpha-7 of doxia-core FIRST (it's at the same transitivity level as the other doxia-core dependency), -alpha-7 wins. This is correct according to the rules implemented in the ArtifactCollector. Previously, I think it was just dumb luck that it worked using a bad ordering algorithm (or, more precisely, no ordering algorithm).

Show
John Casey added a comment - The issue with the plugin plugin isn't the LinkedHashSet...it's incorrect ordering of dependencies in the plugin's POM, and a change in the artifact-resolution code that uses an ordered set now where it didn't used to. I've verified that the ordering of artifacts resolved for the same plugin POM is different between 2.0.8 and the 2.0.9 code, where the 2.0.9 resolution order is actually correct...the plugin POM specifies dependencies on maven-reporting-impl 2.0.4 and doxia-site-renderer 1.0-alpha-10 IN THAT ORDER. This means that it resolves:
  1. maven-reporting-impl 2.0.4 -> doxia-core 1.0-alpha-7
  2. doxia-site-renderer 1.0-alpha-10 -> doxia-core 1.0-alpha-10
and, since it sees -alpha-7 of doxia-core FIRST (it's at the same transitivity level as the other doxia-core dependency), -alpha-7 wins. This is correct according to the rules implemented in the ArtifactCollector. Previously, I think it was just dumb luck that it worked using a bad ordering algorithm (or, more precisely, no ordering algorithm).
Hide
John Casey added a comment -

the problem is actually in the plugin POM, but we may need to collect info on other failing plugins here, for reference.

Show
John Casey added a comment - the problem is actually in the plugin POM, but we may need to collect info on other failing plugins here, for reference.
Hide
Brian Fox added a comment -

this was resolved by releasing plugin tools 2.4.1 and reporting impl 2.0.4.1

Show
Brian Fox added a comment - this was resolved by releasing plugin tools 2.4.1 and reporting impl 2.0.4.1

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: