Skip to content

Write the release settings file in UTF-8 - #1514

Merged
slachiewicz merged 1 commit into
masterfrom
agent/fix-release
Oct 1, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/fix-release

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

The settings file handed to the forked or Invoker Maven build was written with FileWriter, in the platform charset, while its XML header declares UTF-8, so non-ASCII content was corrupted on a non-UTF-8 default. Both executors now write UTF-8.

The new test only proves something under a non-UTF-8 default, and JDK 18+ defaults to UTF-8, so it also runs in a dedicated surefire execution with -Dfile.encoding=ISO-8859-1; the other tests keep their environment.

Found while porting to the Maven 4 API; part of apache/maven#13309.

Verified: testSettingsFileIsWrittenInUtf8 fails in the settings-charset execution without the fix.

@slachiewicz slachiewicz added the bug Something isn't working label Sep 30, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 30, 2026 21:37
@slachiewicz
slachiewicz merged commit 66602b5 into master Oct 1, 2026
21 checks passed
@slachiewicz
slachiewicz deleted the agent/fix-release branch October 1, 2026 19:03
@github-actions github-actions Bot added this to the 3.3.2 milestone Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant