Skip to content

RATIS-2441. Set encoding for maven-resources-plugin#1470

Open
adoroszlai wants to merge 1 commit into
apache:masterfrom
adoroszlai:RATIS-2441
Open

RATIS-2441. Set encoding for maven-resources-plugin#1470
adoroszlai wants to merge 1 commit into
apache:masterfrom
adoroszlai:RATIS-2441

Conversation

@adoroszlai
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fix warning about properties encoding:

[INFO] --- resources:3.3.1:resources (default-resources) @ ratis-docs ---
...
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html

by setting propertiesEncoding for maven-resources-plugin according to doc.

ratis-version.properties is read using Properties class, so encoding should be ISO-8859-1.

try (InputStream in = clazz.getClassLoader().getResourceAsStream(RATIS_VERSION_PROPERTIES)) {
if (in != null) {
properties.load(in);

https://issues.apache.org/jira/browse/RATIS-2441

How was this patch tested?

Warning is gone:
https://github.com/adoroszlai/ratis/actions/runs/26450457188/job/77883526958

@adoroszlai adoroszlai self-assigned this May 26, 2026
Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 the change looks good.

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