Skip to content

GH-3321 Exclude package-info.class from shaded fastutil dependency - #3322

Merged
Fokko merged 1 commit into
apache:masterfrom
jerolba:GH-3321_exclude_package_info_from_shaded_fastutil
Dec 9, 2025
Merged

GH-3321 Exclude package-info.class from shaded fastutil dependency#3322
Fokko merged 1 commit into
apache:masterfrom
jerolba:GH-3321_exclude_package_info_from_shaded_fastutil

Conversation

@jerolba

Copy link
Copy Markdown
Contributor

Rationale for this change

I've noticed that some JARs include package-info.class files from the shaded it.unimi.dsi:fastutil dependency.

These files are located in packages that are otherwise empty and I believe these package-info.class files are unnecessary, even in artifacts that make use of other fastutil classes.

What changes are included in this PR?

Filtering these files out in the maven-shade-plugin configuration to reduce the final JAR size.

Are these changes tested?

No, apart of existing build process.

Are there any user-facing changes?

No

Closes#3321

@Fokko

Copy link
Copy Markdown
Contributor

I agree that it doesn't make sense to shade package-info.class, maybe we should completely remove it:

<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/package-info.class</exclude>
</excludes>
</filter>
</filters>

@jerolba

Copy link
Copy Markdown
ContributorAuthor

I have found it just from fastutil dependency.

I have no strong opinion on whether to explicitly manage this from fastutil or to generalize the rule for future changes.

@FokkoFokko added this to the 1.17.0 milestone Dec 2, 2025
@Fokko
Fokko merged commit 7ec3284 into apache:masterDec 9, 2025
7 checks passed
Sign up for freeto 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.

Exclude package-info.class from shaded fastutil dependency

2 participants

@jerolba@Fokko