Maven vs Buildr

Jim Alateras talks about how Buildr could replace Maven in a blog entry titled “From Maven to buildr“.

Buildr claims to be a drop-in replacement of Maven as it uses the same file layout, artifact specifications, local and remote repositories.

For sure the best practices built into Maven are great and the central repository is a place where you’ll find almost every relevant open source java library but Maven is much more. Maven’s big advantage over ant is a declarative approach describing projects instead of describing (or programming) the build process. Buildr drops the Maven POM (project object model) and returns to coding the build process — this time not in XML as in ant but in Ruby. Apache ODE’s Rakefile may serve as an example.

Jim notes that Buildr seems to be faster than Maven and continues

All extension tasks (ala maven plugins) are written in Ruby so you get all the power and benefits of a turing complete language as opposed to the constraints of maven plugins.

Well since Maven 2 all its plugins are written in plain Java — seems like the author really should have invested some time to actually look at Maven’s design.

Can we learn from efforts like Buildr?

Well, the POM used by Maven to describe the projects is a bit verbose in some cases, this should be addressed in future versions. Besides that some performance optimizations might be a good thing tough I don’t think they are so badly needed. Maven already reduces the time to build by making it very easy to reuse pre-built snapshots of depentant modules.

Besides this it will remain a religious issue on whether you prefer a declarative or a procedural approach for your build process. If you prefer the later have a look at Buildr but don’t buy it as a drop-in replacement but as a different solution that reuses some of Maven’s achievements.