No external deps on

Charles Oliver Nutter headius at
Thu Oct 13 23:09:11 EDT 2011

These *are* gems...

system ~/projects/jruby $ gem install mvn:org.clojure:clojure
Successfully installed mvn:org.clojure:clojure-1.4.0.a.1-java
1 gem installed

system ~/projects/jruby $ ls lib/ruby/gems/1.8/cache/*clojure*

We have some additional tweaks to RubyGems to source them out of Maven
instead of having to push them to We did this to avoid
everyone pushing their own copy of every maven artifact in the world,
which I think you all would agree is best.

Here's the deal...

JVM libraries are as useful to JRuby users as gems are. There's tens
of thousands of them available. They're generally published by the JVM
community to Maven repositories, primarily the "central" repositories
that act like does for RubyGems. JRuby users want to use
those libraries in their apps and depend on them in their gems. In
order to do that, one of two things need to happen:

1. They push a gem that contains the libraries. This means potentially
hundreds or thousands of binary jar files wrapped in gems and pushed
to, and updated as those libraries are versioned. This is
what you are recommending to me.
2. They use JRuby's maven/gem integration to source the libraries
directly from maven, transparently wrapped in a gem at install time. I
think this is preferable in many ways, but since those gems don't
exist on it's not an option.

I can certainly make a recommendation to JRuby users that they should
start pushing maven artifacts as gems to, if that's what
you'd prefer. I could also set up a nightly/weekly job to scan Maven
Central and push tens of thousands of jars-in-gems to, so
we'd know they're available for JRuby users.

I don't think anyone wants that, though. :)


- Charlie

On Thu, Oct 13, 2011 at 4:17 PM, Nick Quaranto <nick at> wrote:
> "dependency" is for "gem" dependency, let's keep it that way, please. There
> is a "requirements" field in the gemspec that this could be used for
> instead:
> However this is yet another reason to have metadata :(
> -Nick
> On Thu, Oct 13, 2011 at 11:47 AM, Charles Oliver Nutter <headius at
>> wrote:
>> I ran into a snag trying to demo JRuby's support for installing Maven
>> artifacts as gems: does not allow pushing gems with
>> external dependencies.
>> For the "cloby" gem, which exposes Clojure's STM and persistent list
>> as Ruby instance variables, I wanted to have a dependency on Clojure
>> directly from Maven, using JRuby's maven gem support. The gem name for
>> that looks like "mvn:org.clojure:clojure". This worked well as a
>> dependency in the gemspec, and local copies of the gem would also
>> fetch Clojure from Maven Central. But I was not able to push the gem
>> to
>> Inability to push gems that depend on Maven artifacts waters down that
>> support considerably. It also means we would need to start pushing
>> Maven libraries to for every such library anyone depends
>> on...which could mean hundreds of gems that only exist to wrap a JVM
>> library. I know nobody wants that (and that's why we built this
>> support into JRuby) so perhaps we can reach a compromise?
>> - Charlie
>> _______________________________________________
>> RubyGems-Developers mailing list
>> RubyGems-Developers at
> _______________________________________________
> RubyGems-Developers mailing list
> RubyGems-Developers at

More information about the RubyGems-Developers mailing list