Skip to content

Fix #12081: mvnup: use domtrip XML API on 4.0.x branch to align with master#12082

Merged
gnodet merged 3 commits into
apache:maven-4.0.xfrom
gnodet:polydactyl-tango
May 19, 2026
Merged

Fix #12081: mvnup: use domtrip XML API on 4.0.x branch to align with master#12082
gnodet merged 3 commits into
apache:maven-4.0.xfrom
gnodet:polydactyl-tango

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 18, 2026

Summary

  • Migrate mvnup from JDOM to domtrip XML API on the maven-4.0.x branch, aligning it with master
  • Cherry-pick of commit a336a2c ("Switch mvnup to domtrip Switch mvnup to domtrip #11432") with conflict resolution for 4.0.x-specific backport divergence
  • Update domtrip version to 0.4.1 (matching master)

This eliminates the need to maintain two separate XML API implementations for mvnup across branches, enabling clean cherry-picks between master and 4.0.x.

Fixes #12081

Changes

  • Root pom.xml: Add domtrip dependency management (0.4.1), remove jdom2
  • maven-cli/pom.xml: Replace jdom2 dependency with domtrip-core + domtrip-maven
  • Source files removed: JDomUtils.java, GAV.java, GAVUtils.java, UpgradeConstants.java
  • Source file added: DomUtils.java (domtrip-based XML utilities)
  • All strategy files rewritten: JDOM API → domtrip API (CompatibilityFixStrategy, InferenceStrategy, ModelUpgradeStrategy, ModelVersionUtils, PluginUpgradeStrategy, PomDiscovery, StrategyOrchestrator, etc.)
  • All test files migrated accordingly

Test plan

  • All 228 mvnup tests pass
  • No JDOM imports remain in **/mvnup/** files
  • Spotless formatting clean
  • Compilation succeeds

Claude Code on behalf of Guillaume Nodet

gnodet and others added 2 commits May 18, 2026 18:04
Adds InheritedPluginDetectionTests and effective model warning test
from maven-4.0.x branch (834daf2), converted from JDOM2 to domtrip.
Also fixes log level for effective model analysis failures from debug
to warning to avoid silently swallowing errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants