Repository navigation
Report a clear error for an unparsable extensions.xml - #13957
Merged
gnodet merged 2 commits intoNov 12, 2026
Merged
Conversation
Port of apache#13947 (maven-3.10.x) to the `master` compat layer. readCoreExtensionsDescriptor() let any failure from the XML parser escape as-is, so an empty or otherwise malformed .mvn/extensions.xml surfaced as a bare EOFException or XMLStreamException with a full stack trace instead of a message naming the problem file. Wrap the parse failure in an IOException that names the extensions file, keeping the original exception as the cause so -e still shows the full chain. Fixes apache#10258
gnodet-bot
approved these changes
Nov 12, 2026
gnodet-bot
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Clean, minimal fix: wraps the bare XMLStreamException/EOFException from the StAX parser in an IOException naming the file, root cause preserved. Consistent with the merged companion #13947 on maven-3.10.x. Visibility change (private → package-private) is justified by direct test access from the same package.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Port of apache#13947 (maven-3.10.x) to the `master` compat layer. readCoreExtensionsDescriptor() let any failure from the XML parser escape as-is, so an empty or otherwise malformed .mvn/extensions.xml surfaced as a bare EOFException or XMLStreamException with a full stack trace instead of a message naming the problem file. Wrap the parse failure in an IOException that names the extensions file, keeping the original exception as the cause so -e still shows the full chain. Fixes apache#10258
gnodet
force-pushed
the
port/13947-extensions-xml-error-master
branch
from
November 12, 2026 15:53
65748a0 to
77da233
Compare
elharo
approved these changes
Nov 12, 2026
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.
Port of #13947 (maven-3.10.x) to the
mastercompat layer.readCoreExtensionsDescriptor() let any failure from the XML parser escape as-is, so an empty or otherwise malformed .mvn/extensions.xml surfaced as a bare EOFException or XMLStreamException with a full stack trace instead of a message naming the problem file.
Wrap the parse failure in an IOException that names the extensions file, keeping the original exception as the cause so -e still shows the full chain.
Fixes #10258