Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Using JRuby with Maven

mkristian edited this page · 3 revisions
Clone this wiki locally

adding the jruby-core artifact to your project


in case maven picks the wrong version of for example joda-time you always can overwrite that by adding an explicit dependency with the desired version to your pom.xml.


to verify your new setup have a look at complete dependency tree

   mvn dependency:tree -Dverbose

using gems through maven

there is maven repository which delivers gem artifacts for all gems of

in order to use those gems we need to add the repository to the pom, the gem itself as dependency and we need to tell maven to "install" those gems. the gem maven plugin installs the gems into target/rubygems and the plugin tries to keep the outer environment out of the picture as good as possible.


during the test phase the gem plugin adds the gems to the classloader, i.e. you can use the haml gem inside a jruby scripting container via

 require 'rubygems'
 require 'haml'
 . . . 
Something went wrong with that request. Please try again.