Skip to content

Share plugin discovery and version lookup between display and reports - #1397

Merged
slachiewicz merged 6 commits into
mojohaus:masterfrom
wilx:refactor-plugin-updates-analysis
Oct 10, 2026
Merged

slachiewicz merged 6 commits into
mojohaus:masterfrom
wilx:refactor-plugin-updates-analysis

Conversation

@wilx

@wilx wilx commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Plugin update reports use a separate discovery and lookup path from display-plugin-updates, and omit plugins declared only in <reporting>. This shares the existing display logic with the individual and aggregate reports, following the refactoring discussed in #1250.

  • Extract plugin discovery, version lookup, and Maven prerequisite analysis into reusable internal classes. Cache candidate POM results within each project's analysis and inspect Maven models directly for explicit version declarations.
  • Include reporting plugins and preserve distinct build, reporting, and managed versions. Unversioned reporting plugins first use the effective build version, then plugin management, before falling back to shared repository inference. The project's model is left unchanged. For example, a plugin declared with managed version 1.0, build version 2.0, and reporting version 3.0 retains each version in the appropriate report section.
  • Analyze aggregate projects with their own effective versions and repository context. Combine available versions for plugins and matching plugin dependencies across projects before applying onlyUpgradable, so updates found in any project's repository survive later results and appear with either setting.

The console keeps its existing plugin selection and Maven compatibility grouping. Reports retain their effective-model selection, update columns, HTML presentation, and XML 2.0.0 schema. Reports with known current versions do not need to build candidate POMs.

Validation:

  • All 453 unit tests in the full reactor suite and all 23 plugin display/report integration tests pass, including the new shared-analysis regression fixture. Regression coverage includes reporting-version precedence and aggregate candidate merging for build and managed plugins with both onlyUpgradable settings. Shared-dependency tests cover empty results in either project and combining overlapping candidates without duplicates.
  • The POM supplied in Inconsistency between report and display-plugin-updatesย #1250 was checked with Maven 3.9.11: active and managed dependency-plugin versions remain distinct, and reporting-only plugins appear in the report.
  • Formatting and lifecycle checks pass. Other integration suites were not run.
nice -n 10 /opt/maven/latest/bin/mvn -B -ntp clean verify -Prun-its \
  '-Dinvoker.test=it-display-plugin-updates*,it-plugin-updates*' \
  -Dinvoker.parallelThreads=4 -Dinvoker.rerunFailingTestsCount=0

Fixes #1250

@wilx
wilx marked this pull request as draft September 9, 2026 20:09
@wilx
wilx marked this pull request as ready for review September 9, 2026 20:11
@wilx
wilx marked this pull request as draft September 9, 2026 20:24
@wilx
wilx marked this pull request as ready for review September 9, 2026 20:44
@slachiewicz slachiewicz added the enhancement New feature or request label Sep 18, 2026
Include reporting-only plugins, retain distinct build and managed versions, and infer unspecified current versions using the shared analyzer. Preserve the existing report formats and avoid candidate POM builds when report versions are known.

Fixes mojohaus#1250
Resolve reporting plugin versions from effective build plugins, then plugin management, before repository inference. Cover default precedence and preservation of the project model.
Union the available plugin versions from every project before applying onlyUpgradable. Preserve dependency details from projects with no plugin update and cover both build and managed plugin reports.
Union available versions for matching plugin dependencies across projects instead of overwriting earlier results. Reuse the candidate merge for plugins and dependencies, and cover empty results in either order plus overlapping candidates.
@slachiewicz
slachiewicz merged commit 58f12d0 into mojohaus:master Oct 10, 2026
15 of 17 checks passed
@github-actions github-actions Bot added this to the 2.22.1 milestone Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistency between report and display-plugin-updates

2 participants