I'm working with jRuby and Rails for a while, but I don't have the feeling that I've found the holy grail for this: I'm doing a lot of gems which are wrappers for actual java libs and I ask myself what the best option is for packaging those gems. Is it a good idea to package them as "native gems", letting the jars being packaged when the gem is installed? Is there a way to install the jars in the .m2 dir, letting bundler AND maven to what they can do best at the same time?
Best,
Tobias
RubyGems Maven support removed since jruby 1.7
see this RubyGems maven support has been removed in JRuby 1.7
So, that won't work with jruby 1.7:
Using jbundler instead, refer to https://github.com/mkristian/jbundler
Okay, there is an easy way to install java libraries as gem:
Which should solve some of the problems. Unfortunately, bundler does not seem to support them.
See http://blog.mkristian.tk/2011/03/rubygems-maven-support.html
and
http://blog.mkristian.tk/2011/09/jruby-and-rubygems-and-javaclassloader.html
Also, switching to Buildr as build tool instead of mvn makes things easier.