From Maven to Buildr

by Jim Alateras

On a recent flight from Boston to Melbourne i decided to have a play around with buildr and convert a small rest based web application from maven to buildr. Buildr is a ruby-based DSL build system for Java applications. The ruby plugin comes from the folks @ Intalio and born from their frustration in using maven for build management. The documentation on the rubyforge site is very good and provides a good introduction but to do more you'll probably need to browse the ruby source code.

It took about a day of playing around before i managed to replicate my maven build, which included compiling, testing, packaging a war and running up the war on an instance of a jetty server.

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. It's definitely much easier to extend buildr with new tasks than to write a maven plugin.

You may have seen Assaf's claims that builds are faster under buildr and my initial experience seems to confirm this.

If you're looking at using it beyond a small project have a look at Apache ODE's Rakefile, which is used to manage multi-project builds.


2007-07-02 02:28:43
gosh ...
sometimes I think that you only build applications guys, not create/write them ...
why the f*k we need another building tool?
2007-07-02 06:23:52

The answer is...we don't.

2007-07-02 11:23:32
How does this integrate with an IDE ? Does it have a maven-eclipse plugin equivalent ?
Jim Alateras
2007-07-02 13:14:54

You can do 'rake eclipse' to generated the eclipse .classpath and .project files. That's the only integration point i'm aware off.

2007-07-02 20:07:12
2007-07-03 04:53:07
I don't need another building tool (not for java)... :-)
2007-07-05 01:19:48
Really it is not useful at all!

2007-07-05 16:27:07
The document & example are not very helpful or convincing. I will wait for a more complete example & tutorial come out first.

2007-07-08 21:15:27
Just use Ant.
Nicolas Modrzyk
2007-07-10 17:06:16
Hi Jim,

It'd be cool to cross post your experience with the following thread on TSS:

Buildr is for me the way to go, making things simpler and faster..
Thank you for your insight!

Jan Novotný
2007-07-10 22:53:56
With Maven 2 it usually takes me an hour to complete setup build mechanism for new project. Maven 2 offers power of Java language (for plugins) if you need so. I haven't ever needed another building tool since Maven 2.

This and other articles makes me think - that the main considered reason for Rubyists is to have everything in Ruby - including build system ;).

2007-07-11 19:00:38
Geez another stupid and useless ruby tool. We dont need it, we are happy in java land with ant and maven, thank you.

Why this days lots of buzz with this shaky scripting languages. Actually are not pure languages are C based languages.

2007-07-11 21:00:13
Wooohooo! Get rid of that freakin XML!
2007-07-13 07:43:25
Everyone who uses maven 1 knows that it's a steaming pull of turd...that's why maven 2 is a rewrite! I think that both you and Assaf failed to disclaim that you are essentially upgrading from a 1980 volvo...almost anything is going to look good in comparison.

That's author's doc is very misleading...
"Of course, we're not measuring raw Ruby against pure Java. We're comparing one implementation against another, where they both do the same thing. Black box equivalent. That's a real life benchmark."

That's completely false -- it's a real life benchmark alright, but it's a benchmark of one engineering team vs. another.

I do like what buildr brings to the table, I'm tired of xml heavy ant files, / xml esque build tools. I hope the next gen of java build systems will actually be code based

2007-07-20 16:47:12
Going to give it a whirl. I was initially a huge fan of Maven2 but am finding it extremely annoying these days. Requires too much time investment from new team members. Ant is still > Maven2 imho.

And an emphatic yes that we do need new build tools. This really hasn't been solved in any meaningful way with Java. I believe there's a groovy builder too that might be worth checking out.

Laurie Young
2007-09-17 07:10:37
There is indeed a groovy build tool, Gant, but its only an ant replacement (ie a complile tool) rather than a maven replacement (packagaging and deployment etc). Currently I believe they are looking at extending it into maven/buildr territory, vs contributing to buildr.

I have just switched from maven2 to buildr and even for a simple project, its like a breath of fresh air. And thats from a java perspective!

Ittay Dror
2008-06-23 12:54:52
@Dave: check out gradle also. same concepts, but it allows per module build files, configuring a set of projects after they have been created, uses ivy for dependency management and is written in groovy