Skip to Main Content
JRuby Cookbook
book

JRuby Cookbook

by Justin Edelson, Henry Liu
November 2008
Intermediate to advanced content levelIntermediate to advanced
224 pages
5h 2m
English
O'Reilly Media, Inc.
Content preview from JRuby Cookbook

Chapter 6. Build Tools

Introduction

Just about every software project, regardless of language or scope, needs to be built in some way. The build process can include steps including compiling code, running automated tests, file processing, packaging, and deployment, among others. Because there is significant commonality among build processes, a variety of specialized build systems are available. These systems allow you to describe your build process as a series of interdependent, reusable tasks. Ant, for example, allows you to replace this:

$ javac *.java
$ jar –cf my.jar *.class

With this:

$ ant jar

Or even (if jar is the default target):

$ ant

This chapter discusses techniques for building Java-based projects. In this context, Ruby can be used as the core of the build process or to enhance an existing build process. There are two major build systems used for Java projects: Ant and Maven. Both of these are projects of the Apache Software Foundation and both have extension mechanisms that support JRuby. This is the focus of the first few recipes. The later recipes describe two different Ruby-based build systems designed for Java projects: Raven and Buildr. All four of these build systems have merit: which to use for a particular project is largely a matter of preference. Raven and Buildr are significantly newer than Ant and Maven and, as a result, the communities around them are smaller.

The chapter ends with two recipes about the Hudson continuous integration server. The first of these ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ruby Cookbook, 2nd Edition

Ruby Cookbook, 2nd Edition

Lucas Carlson, Leonard Richardson
Groovy 2 Cookbook

Groovy 2 Cookbook

Andrey Adamovich, Luciano Fiandesio
Mastering Ruby Closures

Mastering Ruby Closures

Benjamin Tan Wei Hao
Ruby Phrasebook

Ruby Phrasebook

Jason Clinton

Publisher Resources

ISBN: 9780596155063Errata Page