Dealing with JRuby and jars
luislavena at gmail.com
Thu Jan 12 13:29:42 EST 2012
On Thu, Jan 12, 2012 at 3:11 PM, Charles Oliver Nutter
<headius at headius.com> wrote:
> We want the external libraries to be fully functional gems. JRuby
> already supports installing them like this (I know colons are bad,
> we'll figure out something else):
> gem install mvn:org.clojure:clojure
So what you're suggesting, even you stated differently is that you
want to pollute rubygems.org with maven artifacts wrapped as gems?
> I don't understand why we can't just push gems that have maven
> dependencies. Because they depend on Java libs, they only work on
> JRuby anyway. Because they're used on JRuby, the maven dependencies
> will resolve at install time.
Simply because a maven dependency is not Ruby nor a RubyGem?
>> $ gem spec --local pkg/testext-0.0.1.gem
>> - maven:org.something.foo.whatever
>> - maven:junit.junit-4.10
>> That would work?
> I don't see that it works better than us just installing them as gems.
> The issue I have is that by having it as a separate post-install hook,
> every tool that uses RubyGems or Bundler to pull in dependencies has
> to be modified to also know how to fetch those libraries and include
> them. If they're just gems, the normal logic just works...
As long those tools use gem command line or Gem::Installer, those
hooks will be fired up automatically.
I have the feeling that no matter what solution we can come up with
will never be enough to you. I hint that you want rubygems.org
understand and host your maven dependencies.
What I suggested is a way that you can add a maven-logic layer to
RubyGems and be able to install those dependencies for the user, but
seems clearly discarded by you.
What you really want is be able to manage maven as gems from "gem"
command, something that I believe goes beyond the scope of RubyGems
(or Ruby) and that solves the needs of one single Ruby implementation:
Perhaps you need a way to plugin and extend Gem::Installer to fulfill
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
More information about the RubyGems-Developers