Dealing with JRuby and jars

Evan Phoenix evan at
Mon Jan 9 15:04:43 EST 2012

See below. 

Evan Phoenix // evan at

On Monday, January 9, 2012 at 10:59 AM, Charles Oliver Nutter wrote:

> 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.

This currently fails because makes sure that there is an existing gem on for each requested dependency. It only checks the presence, not the versions required by the dependency.

Given that it's just checking the name and thusly not checking if the gem is actually usable with the requested dependencies, I think we should go ahead and remove the requirement all together.

If we want to be nice to the user and indicate to them that their may be a problem with their gem, it's best to do that at 'gem push' time rather than enforcing the policy on 
> * 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
> _______________________________________________
> RubyGems-Developers mailing list
> RubyGems-Developers at (mailto:RubyGems-Developers at

More information about the RubyGems-Developers mailing list