Apache Buildr - A Brief Introduction

What is 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. --from Apache Buildr project page.
As it implies in the Buildr project page, Buildr is a easy-to-use build system made by developers who were tired of some other Java build tools (hmm like Ant, Maven?) . Actually as a former C# programmer i never liked the idea of build management with writing configuration files by hand, so i used Netbeans as my primary IDE for these kind of stuff. But then i decided to give Buildr a try. Probably because of its usage of Ruby and several statements of other developers who mentioned about drastic decrease of line required to build a Java app with Buildr in contrast to Ant/Maven.

Installation
Apache Buildr's project documentation has described installation process well so i will only demonstrate the installation on Windows Vista Business (my primary OS), but if you encounter a problem with installation on other OS's, let me know so maybe i can figure it out.
Let's start then, go to the http://rubyinstaller.org/ and download the One-Click Installer (Windows). When download finished, run the executable and follow installation steps (be sure to check RubyGems component). I assume you already have JAVA_HOME environment variable set to JDK installation directory, if not set it. After installation finished, open command line and write:
gem update --system
This command will upgrade your Ruby Gems to the latest version if it's not already. Dependencies of upgrade process will require your permission. After upgrade process is finished we can install Buildr now:
gem install buildr
This will install Apache Buildr.Buildr uses a Buildfile, a build script for storing information about projects Buildr is building. To verify your Buildr installation and create a buildfile by running Buildr for the first time:
buildr
Command creates an app directory like "C:/Users/user_name/.buildr". And also ask you if you want Buildr to create a new buildfile in the current directory. You can enter 2 to cancel this so you can create a new sample folder like i did. After you're ready enter 1 to start creating a buildfile. This will create a project with the same folder name, to list all your projects type:
buildr help:projects
I hope this post will be helpful for who want to try Buildr. You can play with Buildr features or go to the Apache Buildr Quickstart for more details. It looks like i will be using Buildr for a long time so if you liked this article let me know so i can add more. See you later ;)

Comments

Popular Posts