[Backport 4.0.x][#12353] Add jaxb2-maven-plugin to mvnup plugin upgrade list#12356
Open
gnodet wants to merge 1 commit into
Open
[Backport 4.0.x][#12353] Add jaxb2-maven-plugin to mvnup plugin upgrade list#12356gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
jaxb2-maven-plugin versions before 3.2.0 depend on jaxb-parent:3.0.0 which contains `<Xlint:all />` — an element with an undeclared namespace prefix. Maven 4's namespace-aware StAX parser rejects this invalid XML, causing transitive dependencies (jaxb-core, jaxb-impl) to be lost from the plugin classrealm, resulting in ClassNotFoundException at runtime. jaxb-parent:3.0.2 (used by jaxb2-maven-plugin 3.2.0+) fixed this by using `<compilerArgument>-Xlint:all</compilerArgument>` instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
slachiewicz
approved these changes
Jun 24, 2026
There was a problem hiding this comment.
Pull request overview
Backports the mvnup plugin upgrade strategy update to Maven 4.0.x to automatically bump org.codehaus.mojo:jaxb2-maven-plugin to a Maven 4–compatible minimum version, preventing failures caused by invalid XML in older transitive POMs.
Changes:
- Added
org.codehaus.mojo:jaxb2-maven-pluginwith minimum version3.2.0to the mvnup plugin upgrade list. - Added a unit test ensuring
jaxb2-maven-plugin3.1.0is upgraded to3.2.0.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategy.java |
Adds jaxb2-maven-plugin (min 3.2.0) to the plugin upgrade map/list so mvnup upgrades incompatible versions. |
impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategyTest.java |
Adds coverage verifying mvnup upgrades jaxb2-maven-plugin from 3.1.0 to 3.2.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Backport of #12354 to
maven-4.0.x.jaxb2-maven-plugin(min version 3.2.0) to the mvnup plugin upgrade listjaxb2-maven-pluginversions before 3.2.0 depend onjaxb-parent:3.0.0which contains<Xlint:all />— an element with an undeclared namespace prefix that Maven 4's namespace-aware StAX parser rejectsjaxb-core,jaxb-impl) to be lost from the plugin classrealm, resulting inClassNotFoundExceptionat runtimejaxb-parent:3.0.2(used byjaxb2-maven-plugin3.2.0+) fixed the invalid XML upstreamTest plan
jaxb2-maven-plugin3.1.0 gets upgraded to 3.2.0PluginUpgradeStrategyTesttests pass onmaven-4.0.xjaxb2-maven-plugin:3.1.0fails on Maven 4,3.2.0succeedsCloses #12353
🤖 Generated with Claude Code