Apache Buildr
Encyclopedia
Buildr is an open-source build system mainly intended to build Java applications, but capable of doing much more. It gives the developer the power of a full-blown scripting language (Ruby
) while writing his or her build scripts, much missed in XML
-based building environments like Apache Ant
or Apache Maven
.
, and uses Ruby as a scripting language. It uses some project automation idioms from Maven like automated artifact management (Buildr is out-of-box
compatible with Maven's repositories). As opposed to more imperative style of build systems like Ant, Buildr takes a more declarative approach in describing the project automation logic (similarly to Maven).
Though Buildr's general philosophy is similar to Maven, it uses Ruby's scripting possibilities to provide a much more flexible and customizable programming model, dramatically extending the tools in the hands of the developer. The user writes a Ruby build script, declaring a project, its sub-projects, artifacts, dependencies, packaging rules etc.. Based on these declarations, a list of standard targets are provided to compile or package the project, upload a prepared package to a remote repository, clean up the build results, run tests and so on. Hooks are provided to execute custom Ruby code before or after the standard targets, allowing the user to comfortably override any defaults and further specify the behavior of the standard targets. New, completely user-written targets can be added, written in Ruby, using its full scripting powers.
and rich library make it much easier and quicker to extend it Buildr in any desired way.
Buildr also comes with out-of-box support technologies like Cobertura, Emma, JUnit
, TestNG
, JBehave, JMock. Integration with Ant is also provided.
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...
) while writing his or her build scripts, much missed in XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
-based building environments like Apache Ant
Apache Ant
Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects....
or Apache Maven
Apache Maven
Maven is a build automation and software comprehension tool. While primarily used for Java programming, it can also be used to build and manage projects written in C#, Ruby, Scala, and other languages. Maven serves a similar purpose to the Apache Ant tool, but it is based on different concepts and...
.
Overview
Buildr is based on Ruby's build system RakeRake (software)
Rake is a software task management tool. It allows you to specify tasks and describe dependencies as well as to group tasks in a namespace.It is similar to SCons and make, but has a number of differences. The tool is written in the Ruby programming language, and the Rakefiles use Ruby syntax...
, and uses Ruby as a scripting language. It uses some project automation idioms from Maven like automated artifact management (Buildr is out-of-box
Out of the box
Out of the box is the term used to denote items, functionalities, or features that do not require any additional installation. In addition to being used for tangible products, the phrase is often used in a less literal sense for software, which may not be distributed in an actual box but offer...
compatible with Maven's repositories). As opposed to more imperative style of build systems like Ant, Buildr takes a more declarative approach in describing the project automation logic (similarly to Maven).
Though Buildr's general philosophy is similar to Maven, it uses Ruby's scripting possibilities to provide a much more flexible and customizable programming model, dramatically extending the tools in the hands of the developer. The user writes a Ruby build script, declaring a project, its sub-projects, artifacts, dependencies, packaging rules etc.. Based on these declarations, a list of standard targets are provided to compile or package the project, upload a prepared package to a remote repository, clean up the build results, run tests and so on. Hooks are provided to execute custom Ruby code before or after the standard targets, allowing the user to comfortably override any defaults and further specify the behavior of the standard targets. New, completely user-written targets can be added, written in Ruby, using its full scripting powers.
Supported Technologies
While being mainly designed for Java, Buildr also knows how to invoke compilers for Groovy or Scala. It is also easily extendible with any custom tasks to invoke any third compiler, making it a universal, general-purpose build system. As compared with writing custom plug-ins for Ant, Ruby's flexibilityand rich library make it much easier and quicker to extend it Buildr in any desired way.
Buildr also comes with out-of-box support technologies like Cobertura, Emma, JUnit
JUnit
JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with SUnit....
, TestNG
TestNG
- Features :TestNG features include:* Flexible test configuration.* Support for data-driven testing .* Support for multiple instances of the same test class * Support for parameters....
, JBehave, JMock. Integration with Ant is also provided.