takari / polyglot-maven

Support alternative markup for Apache Maven POM files
Eclipse Public License 1.0
893 stars 101 forks source link

OpenSSL missing in Ruby polyglot building JRuby #243

Open headius opened 2 years ago

headius commented 2 years ago

Hello!

As you know, JRuby's own build is using polyglot, so I have been trying to upgrade the version we use today. I discovered that some time in the 0.4.8 release, the following error now shows up when we try to use polyglot to install RubyGems during our build:

using jruby 9.2.19.0
install gems unless already installed
/home/headius/.m2/repository/rubygems/rubygems-update/3.2.29/rubygems-update-3.2.29.gem
NameError: uninitialized constant Gem::Specification::OpenSSL
         const_missing at org/jruby/RubyModule.java:3766
               to_ruby at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:2470
                  each at org/jruby/RubyArray.java:1820
               to_ruby at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:2466
     to_ruby_for_cache at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:2515
  ensure_loadable_spec at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/installer.rb:633
    pre_install_checks at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/installer.rb:914
               install at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/installer.rb:301
              eval_pom at /home/headius/work/jruby93/lib/pom.rb:187
                  each at org/jruby/RubyArray.java:1820
              eval_pom at /home/headius/work/jruby93/lib/pom.rb:175

This may be a bug in JRuby, but at a glance it looks like something is avoiding or preventing JRuby's OpenSSL emulation layer from loading.

We will be upgrading to 0.4.7 and will work with you to fix this issue.

cc @kares for suggestions from the jruby-openssl side

cstamas commented 1 year ago

Does this issue still stand? (w/ 0.5.0)