Google Guava is an useful library that offers many different but unrelated features:
- For my Vaadin projects, I like using Event Bus to promote loose coupling along my components
- Guava offers Functional oriented collections handling
- There's a lightweight Cache implementation
However, this article is not about those features but about offering a single heavyweight Uber JAR for all. From Google’s point-of-view, providing an Uber library for all projects makes sense: “Hey guys, just add this dependency and it will meet your every requirement”. However, from my point of view, this is just making my applications heavier.
Cohesion is at the root of good software development. Many framework providers, such as Spring and JBoss, release nicely cohesive packages and manage dependencies between them through a Dependency Management tool. What is strange is that most Guava’s features are not coupled together, so a having single library is not mandatory. Even stranger, Guava has previously been released in different JARs but Google stopped doing that with version r03.
I have found no solution beside creating separate JARs and handling dependencies myself, then storing them in a Maven Enterprise Repository. Since these tasks are required for each release, I never found the ROI interesting enough. The easiest way would be for Google to do that at build time.
Dear Google engineers, if by chance you happen to stumble upon this article, I’d be very grateful if you’d consider it.