Post

Today I found out about something really puzzling. I noticed that each new Java release of my Arconia Framework to Maven Central ended up being around 200MB. That's a lot! How could that be possible? 😱 Let me tell you what was the problem and how I got it down to 8MB.

Maven Central requires every library published there to provide a dedicated JavaDoc JAR file. Even though I don't need it, it's a requirement, so I configured my Java project to generate that. It turns out that, by default, each JavaDoc JAR comes with a bundle of font files of 4,1MB 🧨 Absurd!

What does that mean? Every Java artifact you publish to Maven Central has an extra 4,1MB of font files. Imagine how's that multiplied by the number of libraries published there? 💥 Since Java 23, you can disable the inclusion of the font files, but it should really be disabled the default!

Thanks for sharing. That's a convenient default! Unfortunately, the same doesn't happen with Gradle. I'll try suggesting a change in that direction to the Gradle project.

0 reposts2 likes

No replies yet.