Hey folks,
I've been doing quite a bit of JRuby+Java work over the last several years. Recently, I needed to incorporate some Ruby code into a Scala/Maven project. Using Bundler and a post from Nick Sieger's circa 2009* as a jumping off point (I believe he's on this list too), I was able to put together a JAR that has _only_ the gems specified in the Gemfile (and their dependencies). The basic outline is:
a) use bundler cache to pool the dependencies in a local dir
b) download/extract a JRuby tarball
c) copy the gems from the bundler cache dir into the JRuby dir
d) wrap the JRuby dir up into the final JAR
This creates a JAR that I can import into a Java or Scala project and use like any other library.
I'm using maven-antrun-plugin to do most of this step-by-step, but I know there is an ecosystem of JRuby Maven plugins out there for various tasks. So far, the closest I've found is the gem-maven-plugin, but it looks like that pulls gems down from Rubygems, and I'm including locally-built gems as well. My process does work, but it feels like a bit of a hack. Is there a JRuby+Maven plugin that accomplishes something similar?