GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MPH-210] Fix help:evaluate for Maven 3 model collections by wilx · Pull Request #425 · apache/maven-help-plugin

Conversation

@wilx

@wilx wilx commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #327.

help:evaluate can receive model collections implemented by Maven 3's internal
ModelMerger.MergingList. XStream does not recognize that implementation as a
collection and falls back to reflective serialization. On recent JDKs, this
fails when it tries to access AbstractList.modCount.

This change registers a collection converter that accepts every Collection
implementation and aliases the concrete runtime list class so the existing XML
root name is preserved. The evaluated list is serialized directly without
copying it.

This PR targets master, the current 3.5.x line. The plugin still declares
Maven 3.6.3 as its runtime prerequisite. The regression IT is limited to Maven
3 because Maven 4 exposes different model collection implementations.

This replaces #416, which targeted the 3.4.x maintenance branch currently under
retirement review. PR #417 covers Maven 4-specific collection and map
implementations and can build on this Maven 3 change. The commits remain
intentionally split: the first adds the regression IT and the second applies
the fix.

Validation

  • Maven 3.9.16 / JDK 21: mvn -Prun-its clean verify - 30 unit tests and all
    36 integration tests passed.
  • Maven 3.10.0-rc-1 / JDK 21: mvn -Prun-its clean verify - 30 unit tests and
    all 36 integration tests passed.
  • Maven 4.0.0-rc-6 / JDK 21: the unit-test phase passed all 30 tests. The full
    Invoker run passed 32 tests, skipped 2 Maven-version-specific tests, and hit
    the two existing unrelated failures also documented by Fix #327: evaluate model collections on Maven 4 #417:
    describe-cmd-with-goal-report and describe-plugin-without-name.
  • mvn spotless:apply made no changes.
  • The failure was reproduced before the fix with Help Plugin 3.5.2, Maven
    3.9.16, and JDK 21.

Checklist

  • A JIRA issue exists for this change: MPH-210.
  • This pull request addresses only that issue.
  • Each commit has a meaningful subject line and body.
  • The pull request title follows the [MPH-XXX] convention.
  • This description explains what changed, how, and why.
  • mvn clean verify passed.
  • The integration tests passed with Maven 3.9.16 and Maven 3.10.0-rc-1.
  • I hereby declare this contribution to be licenced under the
    Apache License Version 2.0, January 2004.
  • In any other case, an Apache Individual Contributor License Agreement has
    been filed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
wilx added 2 commits August 21, 2026 23:09
@wilx
[MPH-210] Add regression test for Maven 3 model collections
5425846
Exercise help:evaluate with project.build.resources under Maven 3 so
ModelMerger.MergingList serialization is covered.
@wilx
[MPH-210] Evaluate merged model lists without reflection
eb52c5f
Register a collection converter for model list implementations so XStream
serializes them as collections instead of reflecting into JDK internals.

Fixes apache#327
@wilx
wilx marked this pull request as ready for review August 22, 2026 15:10
elharo
elharo approved these changes Aug 25, 2026
View reviewed changes
@elharo
elharo merged commit 5ac0be0 into apache:master Aug 25, 2026
17 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added this to the 3.5.3 milestone Aug 25, 2026
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

@elharo Please assign appropriate label to PR according to the type of change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned elharo Aug 25, 2026
@elharo elharo added the bug Something isn't working label Aug 25, 2026
@wilx
wilx deleted the issue-327-maven-3 branch August 25, 2026 16:54
@slawekjaranowski slawekjaranowski mentioned this pull request Nov 17, 2026
Planned releases — Q4 2026 (Doxia stack + plugins + shared deps) apache/maven#13085
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@elharo elharo elharo approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@elharo elharo

Labels

bug Something isn't working

Projects

None yet

Milestone

3.6.0

Development

Successfully merging this pull request may close these issues.

[MPH-210] Failure to evaluate on Maven 3.9 + JDK 21

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@wilx @elharo
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.