great that works. putting it in the bundler works as well.
There’s a lot of code snippets on the net that are outdated/misleading:
"
then after applying the patch on jruby master you should be able to do
something like:
$ gem install org.slf4j.slf4j-log4j12
" http://jira.codehaus.org/browse/JRUBY-5102
This is cool, didn’t know you could do this. How would I reference a
package that is installed in my local repo but not any remote maven
repos?
Will this command use a pom.xml if it is in the root of the project?
This is cool, didn’t know you could do this. How would I reference a
package that is installed in my local repo but not any remote maven repos?
nope - let’s call it a bug or missing feature
Will this command use a pom.xml if it is in the root of the project?
not the jgem or jruby -S gem command. but if you have already a
pom.xml maybe the gemify-maven-plugin
(https://github.com/torquebox/jruby-maven-pluginstree/master/gemify-maven-plugin
and have a look at the integration tests in src/it to get an idea what
is possible) might help or even any of the other jruby-maven-plugins.
not sure what exactly you want to do !
→$jruby -S gem install mvn:org.sweble.wikitext:swc-engine
ERROR: Could not find a valid gem ‘mvn:org.sweble.wikitext:swc-engine’
(>=
0) in any repository
but had some problems with the xstream
[ERROR] [ERROR] Failed to determine Java version for profile jdk15 @
line 124, column 14
[ERROR] [ERROR] Failed to determine Java version for profile jdk16 @
line 202, column 14
[ERROR] [ERROR] Failed to determine Java version for profile jdk14 @
line 279, column 14
[ERROR] for project com.thoughtworks.xstream:xstream:1.2.2
that is a bug - but do not know where in the plugin or in maven. the
jruby -S gem thingy is still silently ignoring the errors and moves on
as if it were a regular gem. did you by any chance update rubygems
which also wipes out the maven-gem support ?
right now I do not know how to solve this nicely BUT I hacked
something (a one liner) and deployed a snapshot of those plugin:
0.28.6-SNAPSHOT
→$jruby -S gem install mvn:org.sweble.wikitext:swc-engine --debug
Exception LoadError' at org/jruby/RubyKernel.java:1038 - no such file to load -- psych ExceptionGem::LoadError’ at
/Users/t/.rvm/rubies/jruby-1.6.4/lib/ruby/site_ruby/1.8/rubygems.rb:861
RubyGem version error: sources(0.0.1 not > 0.0.1)
Using Maven install at /usr/local/maven/bin
maven find dependency failed for mvn:org.sweble.wikitext:swc-engine (>=
0,
runtime): undefined local variable or method usr_settings_file' for #<Gem::Maven::Gemify:0x24753433> ExceptionGem::GemNotFoundException’ at
/Users/t/.rvm/rubies/jruby-1.6.4/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:221
Could not find a valid gem ‘mvn:org.sweble.wikitext:swc-engine’ (>= 0)
locally or in a repository
ERROR: Could not find a valid gem ‘mvn:org.sweble.wikitext:swc-engine’
(>=
in any repository
Exception `Gem::SystemExitException’ at
/Users/t/.rvm/rubies/jruby-1.6.4/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:160