Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (46 sloc) 1.76 KB

JRuby’s compiler (jrubyc) maven plugin


JRuby is cool.

Documentation on how to add JRuby to your existing java projects is not cool.

Let’s try to change that (a little bit at least).

Add ruby to your maven-powered Java projects

If you are using maven as a build tool, this plugin will help you add ruby to your project very easily.


You need to have JRuby installed

Then, download the plugin sources from github and run mvn clean install to locally install the plugin.

Then just add this to your pom.xml:


And that’s it :D

How it works

This plugin will fire in the generate-sources phase.

It will search for ruby files in the folder:


And “compile” them to java files in:


Then the maven compile phase will kick in and take care of the rest. Smooth.

What now?

For now, this is it. I’m going to add a tutorial on how to invoke a ruby class implementing a java interface (something that is strangely missing in the internet at least at this moment) using the plugin so hopefully I can inspire you to start giving JRuby a try. It’s worth it.

About the author

My name is Pablo Fernandez. I live in Buenos Aires argentina.

You can follow me on twitter at @fernandezpablo

Or ping me (gtalk) / email me at fernandezpablo85 at gmail dot com

For professional contact, this is my LinkedIn Profile