---
layout: default
title: Apache Buildr
---

Apache Buildr is a build system for Java-based applications, including support for Scala, Groovy and a growing number of JVM languages and tools.  We wanted something that's simple and intuitive to use, so we only need to tell it what to do, and it takes care of the rest.  But also something we can easily extend for those one-off tasks, with a language that's a joy to use.  And of course, we wanted it to be fast, reliable and have outstanding dependency management.


h2(#why).  Why Buildr Rocks

"Daniel Spiewak":http://www.codecommit.com/blog:

bq. If you think about it, the question isn’t “Why use Buildr?”, it’s really “Why use anything else?” The advantages afforded by Buildr are so substantial, I really can’t see myself going with any other tool, at least not when I have a choice.

"Tristan Juricek":http://tristanhunt.com/:

bq. That’s still the strongest sell: it builds everything I need, and as I’ve needed more, I just got things working without a lot of fuss.

"Matthieu Riou":http://offthelip.org/:

bq. We used to rely on Ant, with a fairly extensive set of scripts. It worked but was expensive to maintain. The biggest mistake afterward was to migrate to Maven2. I could write pages of rants explaining all the problems we ran into and we still ended up with thousands of lines of XML.

"Martin Grotzke":http://www.javakaffee.de/blog/:

bq. The positive side effect for me as a java user is that I learn a little ruby, and that’s easy but lots of fun… :-)

"Ijonas Kisselbach":http://twitter.com/ijonas/statuses/4134103928:

bq. I've cleaned up & migrated the Vamosa build process from 768 lines of Ant build.xml to 28 lines of Buildr.

h2(#what).  What You Get

* A simple way to specify projects, and build large projects out of smaller sub-projects.
* Pre-canned tasks that require the least amount of configuration, keeping the build script DRY and simple.
* Compiling, copying and filtering resources, JUnit/TestNG test cases, APT source code generation, Javadoc and more.
* A dependency mechanism that only builds what has changed since the last release.
* A drop-in replacement for Maven 2.0, Buildr uses the same file layout, artifact specifications, local and remote repositories.
* All your Ant tasks are belong to us! Anything you can do with Ant, you can do with Buildr.
* No overhead for building "plugins" or configuration. Just write new tasks or functions.
* Buildr is Ruby all the way down.  No one-off task is too demanding when you write code using variables, functions and objects.
* Simple way to upgrade to new versions.
* Did we mention fast?

So let's get started.  You can "read the documentation online":quick_start.html, or "download the PDF":buildr.pdf.


h2(#news).  What's New

New in Buildr 1.4.5 (Feb. 20th, 2011)

* Added:  BUILDR-555 Add support for the jaxb binding compiler (Mark Petrovic)
* Added:  BUILDR-554 Add support for OSGi bundle packages by importing the
          buildr_bnd plugin
* Added:  BUILDR-125 Add support for <security-role> in application.xml of
          EAR packaging (Mikael Amborn)
* Added:  BUILDR-550 Add support for groovydoc
* Added:  BUILDR-521: System tray notifications for Linux systems
          (via libnotify/notify-send)
* Added:  BUILDR-537 Shell tasks should use JAVA_OPTS by default
* Added:  BUILDR-538 Shell tasks should support passing :java_args
* Added:  BUILDR-544 Support ${groupId} in pom files (Chris Dean)
* Added:  BUILDR-552 Projects may now be defined using project(:name) and a block
* Added:  BUILDR-564 Add package(:scaladoc)
* Added:  Automatically add "require buildr/{groovy,scala}"  when generating
          project if Groovy/Scala files are detected.
* Change: BUILDR-540 Upgrade to rspec 2.1.0
* Change: BUILDR-546 Upgrade to Rubyzip 0.9.4 (Michael Guymon)
* Change: BUILDR-556 Merge buildr-iidea extension back into buildr.
* Change: Upgrade default Scala compiler version to 2.8.1-final
* Change: Upgrade to ScalaCheck 1.8
* Change: Upgrade to ScalaTest 1.3
* Change: Upgrade to Specs 1.6.6
* Change: Upgrade to JRuby 1.5.6
* Fixed:  BUILDR-542 Release task:  SVN tagging fails if parent tag directory
          does not exist yet (Gerolf Seitz)
* Fixed:  BUILDR-543 POMs are installed and uploaded twice when using artifacts
          with classifier
* Fixed:  BUILDR-522 Send notifications when continuous compilation
          succeeds/fails.
* Fixed:  BUILDR-551 Continuous compilation not working for project trees
* Fixed:  BUILDR-557 MD5 + SHA1 checksums are not Maven compliant (Tammo van Lessen)
* Change: Upgrade to Groovy 1.7.5
* Change: BUILDR-545 Add the ability to specify the description element in in
          application.xml contained within an ear.
* Fixed:  BUILDR-547 - Ensure ECJ compiler works when there is a space in the
          path of dependencies.
* Fixed:  BUILDR-558 Artifact uploads should show a progress bar (Tammo van Lessen)
* Fixed:  BUILDR-560 show a meaning full error message when POM cannot be parsed
          (Tammo van Lessen)
* Fixed:  BUILDR-562 WAR package isn't updated if files under src/main/webapp
          are updated
* Fixed:  BUILDR-569 Buildr fails under JRuby 1.6.0.RC1 due to read-only $? variable
* Fixed:  BUILDR-570 Buildr does not work with Rubygems 1.5.x
* Fixed:  Scaladoc task would cause build to exit prematurely

See the "CHANGELOG":CHANGELOG for full details.

h2(#notices).  Credits & Notices

!http://www.apache.org/images/asf-logo.gif(A project of the Apache Software Foundation)!:http://www.apache.org

The Apache Software Foundation is a non-profit organization, consider "sponsoring":http://www.apache.org/foundation/sponsorship.html and check the "thanks":http://www.apache.org/foundation/thanks.html page.

"ColorCons":http://www.mouserunner.com/Spheres_ColoCons1_Free_Icons.html, copyright of Ken Saunders.  "DejaVu fonts":http://dejavu.sourceforge.net, copyright of Bitstream, Inc.

Community member quotes from a thread on "Stack Overflow":http://stackoverflow.com/questions/1015525/why-use-buildr-instead-of-ant-or-maven/1055864.

Developed with !http://www.jetbrains.com/ruby/features/ruby_banners/ruby1/ruby120x30_white.gif(Developed with RubyMine)!:http://www.jetbrains.com/ruby/features?utm_source=RubyMineUser&utm_medium=Banner&utm_campaign=RubyMine

