jruby-complete.jar ignores nested gems of required jar #3443

Closed
mkristian opened this Issue Nov 2, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@mkristian
Member

mkristian commented Nov 2, 2015

setup jars with gems

mkdir -p other/specifications
mkdir -p myjar/specifications
touch other/specifications/other.gemspec
touch myjar/specifications/some.gemspec
ls -1 other/specifications/ > other/specifications/.jrubydir
ls -1 myjar/specifications/ > myjar/specifications/.jrubydir
cd other; jar -cf ../other.jar specifications;cd -
cd myjar; jar -cf ../myjar.jar specifications;cd -

using the commandline gives

$ bin/jruby -J-cp other.jar -e "require './myjar.jar';p Dir['uri:classloader:/specifications/*'];puts; JRuby.runtime.jruby_class_loader.get_resources('specifications').each { |u| p Dir[ 'uri:' + u.to_s + '/*' ] }"
["uri:classloader:/specifications/other.gemspec", "uri:classloader:/specifications/some.gemspec"]

["uri:jar:file:/Users/cmeier/projects/active/jruby17/other.jar!/specifications/other.gemspec"]
["uri:jar:file:/Users/cmeier/projects/active/jruby17/myjar.jar!/specifications/some.gemspec"]

but with jruby-complete.jar

$ java -cp maven/jruby-complete/target/jruby-complete-1.7.23-SNAPSHOT.jar:other.jar org.jruby.Main -e "require './myjar.jar';p Dir['uri:classloader:/specifications/*'];puts; JRuby.runtime.jruby_class_loader.get_resources('specifications').each { |u| p Dir[ 'uri:' + u.to_s + '/*' ] }"
["uri:classloader:/specifications/other.gemspec"]

["uri:jar:file:/Users/cmeier/projects/active/jruby17/other.jar!/specifications/other.gemspec"]
["uri:jar:file:/Users/cmeier/projects/active/jruby17/myjar.jar!/specifications/some.gemspec"]

i.e. the resolution of "uri:classloader://specifications/*" misses out some resources from JRubyClassLoader

@mkristian mkristian self-assigned this Nov 2, 2015

@mkristian mkristian added this to the JRuby 1.7.23 milestone Nov 2, 2015

@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Nov 12, 2015

Member

@mkristian This is fixed now right?

Member

enebo commented Nov 12, 2015

@mkristian This is fixed now right?

@mkristian

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Nov 13, 2015

Member
Member

mkristian commented Nov 13, 2015

@enebo enebo closed this Nov 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment