Rawr, a packaging and deployment tool, is all you'll ever need for your JRuby projects. With Rawr, a simple, pre-generated configuration file turns your code into an executable jar, a .exe for Windows, and a .app for OS X.

The Rundown

Rawr was created as a general purpose JRuby bundling and deployment tool to make life easier for Monkeybars. Rawr is a suite of Rake tasks that can non-invasively inject itself into your project.
Inside of your project with your favorite terminal/command line:

rawr install

Most of the time, you'll see something like this:

rawr has found an exisiting Rakefile.
Please select one of these options:
1: Replace the current Rakefile with a new Rakefile. You will lose everything in the current Rakefile!
2: Keep the current Rakefile, and add the rawr content to the top.
3: Quit, leave the current Rakefile alone, and add nothing new.

Your choice (1,2, or 3):

Option #2 really means that it will just require rawr, which will make the rawr tasks usable in your project.
Here's a rundown of the tasks:

rake -T
rake rawr:build_data_jars
rake rawr:bundle:app
rake rawr:bundle:exe
rake rawr:clean
rake rawr:compile
rake rawr:compile_java_classes
rake rawr:compile_ruby_classes
rake rawr:jar
rake rawr:load_configuration
rake rawr:prepare

Of these tasks, the ones in bold are the ones that will see daily use.


Rawr will also generate a Ruby based configuration file to get you started. Here's what one looks like:

c.project_name = 'ChangeMe'
c.output_dir = 'package'
c.main_ruby_file = 'main'
c.main_java_file = 'org.rubyforge.rawr.Main'

# Compile all Ruby and Java files recursively
# Copy all other files taking into account exclusion filter
c.source_dirs = ['src', 'lib/ruby']
c.source_exclude_filter = []

c.compile_ruby_files = true
#c.java_lib_files = []
c.java_lib_dirs = ['lib/java']
#c.files_to_copy = []

c.target_jvm_version = 1.6
#c.jars[:data] = { :directory => 'data/images', :location_in_jar => 'images', :exclude => /bak/}
#c.jvm_arguments = ""

# Bundler options
# c.do_not_generate_plist = false

It explains itself! No documentation necessary here.
Actually, let's go over some of the defaults. With leading computer scientists working `round the clock, we have determined that the best place to put your source files is in the 'src' directory, while the best place for your Ruby libraries should be 'lib/ruby'. These libraries aren't .gem files per se, but frozen (in the Rails sense) Gems. See 'gem help unpack' for more about freezing these gems. For Java, we've chosen 'lib/java' for where all of our .jar files live. If these don't work, it's easy enough to change the defaults.
The c.jars[:data] entry you see is for moving content such as sound, images, and other data into a JAR. It is typical for a Java deployment to just be a series of JARs. :directory indicates where the resource exists in your project structure. :location_in_jar is the location the resources will be placed inside the JAR (which is a glorified zip file at this point), and there are :exclude and :include keys for filtering out some content (such as your Photoshop/Illustrator files you used to make your images).

Success Stories

In order of reporting: