Dealing with JRuby and jars

Charles Oliver Nutter headius at
Mon Jan 9 13:59:20 EST 2012

Ok, we need to figure out a solution here :)

Here's the deal:

JRuby users are using JVM libraries. That's obviously a big selling
point of JRuby. They're also living in the Ruby world, and use
RubyGems, Bundler, etc. They don't want to have to manage dependencies
multiple ways.

Ruby world revolves around RubyGems and Bundler. Java world revolves
around Maven. We want to integrate the two for JRuby users in a way
that RubyGems,, and Bundler folks can accept.

JRuby currently supports installing jars from Maven at the "gem"
command line, but that's the only place it works. does
not allow us to push gems with maven dependencies, and Bundler does
not recognize maven dependencies.

What we need:

* A way for RubyGems to understand Maven artifacts and dependency
graphs and fetch them. We have that at the command line, but it's via
our own patches.

* A way for to allow gems that have Maven dependencies.
The alternatives to this are pushing gems that *just* wrap a jar file
(some of them very large) or hosting a JRuby-specific I
don't like either of those options.

* A way for Bundler to recognize Maven dependencies as though they are gems.

I'm looking for thoughts and suggestions on how we can make this
easier. It's one of the biggest headaches for JRuby users right now,
since they have to use multiple mechanisms to track dependencies. I
also don't want to flood with a bunch of giant jar-only
gems when we can simply source them from Maven mirrors.

So...what do you think?

- Charlie

More information about the RubyGems-Developers mailing list