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*
lib/ruby/gems/1.8/cache/mvn:org.clojure:clojure-1.3.0-java.gem
lib/ruby/gems/1.8/cache/mvn:org.clojure:clojure-1.4.0.a.1-java.gem

We have some additional tweaks to RubyGems to source them out of Maven
instead of having to push them to Rubygems.org. 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 rubygems.org 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 rubygems.org, 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 rubygems.org it's not an option.

I can certainly make a recommendation to JRuby users that they should
start pushing maven artifacts as gems to rubygems.org, 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 rubygems.org, so
we'd know they're available for JRuby users.

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

Suggestions?

- Charlie

On Thu, Oct 13, 2011 at 4:17 PM, Nick Quaranto <n...@quaran.to> 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:
>
> http://guides.rubygems.org/specification-reference/#requirements
>
> However this is yet another reason to have metadata :(
>
> -Nick
>
> On Thu, Oct 13, 2011 at 11:47 AM, Charles Oliver Nutter <head...@headius.com
>> wrote:
>
>> I ran into a snag trying to demo JRuby's support for installing Maven
>> artifacts as gems: rubygems.org 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 rubygems.org.
>>
>> 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 Rubygems.org 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
>> http://rubyforge.org/projects/rubygems
>> RubyGems-Developers@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rubygems-developers
>>
> _______________________________________________
> RubyGems-Developers mailing list
> http://rubyforge.org/projects/rubygems
> RubyGems-Developers@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers
>
_______________________________________________
RubyGems-Developers mailing list
http://rubyforge.org/projects/rubygems
RubyGems-Developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to