在maven中使用bundler,git和jRuby gem的最佳做法是什么? [英] What's the best practice for using bundler, git, and jRuby gems with maven?

查看:129
本文介绍了在maven中使用bundler,git和jRuby gem的最佳做法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jRuby和Rails一段时间,但是我没有感觉到我已经找到了这个圣杯:
我正在做很多gem,它们是封装真正的java库,我问自己什么是包装这些宝石的最佳选择。
将它们打包为本地宝石是不是一个好主意,当安装宝石时让罐子被打包?
有没有办法在.m2目录下安装jar,让bundler和maven同时做到最好?

最好的,

Tobias

解决方案

好的,有一种简单的安装方法java库作为gem:

  gem install mvn:< groupId>:< artifactId> 

这应该解决一些问题。
不幸的是,bundler似乎不支持它们。



请参阅
http://blog.mkristian.tk/2011/03/rubygems-maven-support.html





http://blog.mkristian.tk/2011/09/jruby-and-rubygems-and-javaclassloader.html



另外,将Buildr作为构建工具而不是mvn可以让事情更轻松。


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

解决方案

Okay, there is an easy way to install java libraries as gem:

gem install mvn:<groupId>:<artifactId>

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.

这篇关于在maven中使用bundler,git和jRuby gem的最佳做法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆