I’m constructively complaining about Maven


If I’m saying anyone who’s used Maven should have a list of criticisms then I suppose I should put down a couple of mine.

Offline operation

It’s largely an exaggeration that you need to be online to run ‘mvn clean’, but there’s truth in it. Maven lazily fetches functionality from its central repository, so anything new fails without a connection. I’ve been bitten by this — I couldn’t run a test report until I got online again. I want a fully offline mode: a simple way to pre-load and know the core functionality will work. If I can install it through my OS’s package manager all the better. There’s nothing conceptually complicated here, just an archive with all the referenced jars, but it’s better than surprises when you’re on the go.

Top quality production releases

Two recent releases, 2.0.10 and 2.2.0 had bugs (MNG-4167 and MNG-4235 respectively) that made me wish I’d waited longer to deploy. 2.2.0’s bad checksums for uploaded artifacts was, ironically, only a problem with Ivy (which verifies on download).

Maven makes it so easy to keep dependencies current, and the Jira is invaluable for tracking bugs. For some projects, it’s acceptable to track development versions. For corporate deployment, a long-term supported version is a must, ideally with as few beta dependencies as possible. When it’s ready, a rock-solid guarantee that Maven 3.0 is ready to deploy would really help to build confidence, especially for anybody tempted in by a point-zero release.

POM modification

During the development lifecycle a POM will contain information that probably doesn’t need to leave the development department — source code repositories, publication servers and more. This gets rolled into the release as-is.

Some of the information can be moved out of the POM and into command-line arguments. There are also steps like this workaround for the clash between internal and external definitions of repository locations.

Whatever the solution, I’d like clean POM as part of the release.

I’ve also needed to modify POMs more heavily during a build, which involved more scripting around Maven than I liked. Which leads to...

Simpler configuration format

They know, they’re fixing it. Here’s an example of a manual conversion.

This isn’t just for manual editing — to generate and manipulate POMs a simpler format, or a stable API and object model, would be great.

If you’re not scared off, here’s a good case study (via Sonatype) of how Maven’s simple model helps to ensure everyone, from new starters to old hands, can build, test and develop with a codebase. There’s real value in a clean onboarding process, which is very much part of the Maven pitch.

(Music: Fleet Foxes, “Your Protector”)
(More from this year, or the front page? [K])