Skip to content

Conversation

jerolba
Copy link
Contributor

@jerolba jerolba commented Sep 21, 2025

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
Contributor

Fokko commented Sep 22, 2025

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
Contributor Author

jerolba commented Sep 22, 2025

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.

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.

Exclude package-info.class from shaded fastutil dependency

2 participants