Skip to content

[Build] Remove unnecessary resources-plugin executions and set encoding#3756

Merged
HannesWell merged 1 commit into
eclipse-platform:masterfrom
HannesWell:cleanup-resource-copy
Apr 11, 2026
Merged

[Build] Remove unnecessary resources-plugin executions and set encoding#3756
HannesWell merged 1 commit into
eclipse-platform:masterfrom
HannesWell:cleanup-resource-copy

Conversation

@HannesWell
Copy link
Copy Markdown
Member

The filter-resources execution of the maven-resources-plugin seems not any effect at any project and the specified directory is always just skipped.

Additionally specify the the encoding explicitly when filtering resources, to prevent the INFO from below.
Java properties files are encoded using ISO-8859-1 encoding. Therefore, when filtered by the maven-resources-plugin, these files should be written with that encoding.

The encoding used to copy filtered properties files has 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

@HannesWell
Copy link
Copy Markdown
Member Author

I found one actual usage of the removed execution:

[INFO] --- resources:3.5.0:resources (default-resources) @ org.eclipse.jdt.ui.junit.sampleproject ---
[INFO] Copying 7 resources from src/main/resources to target/classes
[INFO] 
[INFO] --- resources:3.5.0:resources (filter-resources) @ org.eclipse.jdt.ui.junit.sampleproject ---
[INFO] Copying 7 resources from src/main/resources to target/resources

But since that project has packaging type jar the default lifecycle binding implies the default resources:resources execution:
https://github.com/eclipse-jdt/eclipse.jdt.ui/blob/26b3e0973e9870995b1cf72e8d68ea807a0bf146/org.eclipse.jdt.ui.junit.sampleproject/pom.xml#L27

... which should be suitable for the project's content:
https://github.com/eclipse-jdt/eclipse.jdt.ui/tree/master/org.eclipse.jdt.ui.junit.sampleproject/src/main/resources/

Therefore the removal should still be fine.

Java properties files are encoded using ISO-8859-1 encoding. Therefore,
when filtered by the maven-resources-plugin, these files should be
written with that encoding.
Explicit specifying the encoding also prevents the following INFO log
'''
The encoding used to copy filtered properties files has 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
'''
@HannesWell HannesWell force-pushed the cleanup-resource-copy branch from e6597cc to 14b9035 Compare April 11, 2026 14:13
@HannesWell HannesWell merged commit 534d2c8 into eclipse-platform:master Apr 11, 2026
6 checks passed
@HannesWell HannesWell deleted the cleanup-resource-copy branch April 11, 2026 15:06
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.

1 participant