jruby / ruby-maven

Eclipse Public License 2.0
1 stars 5 forks source link

Using polyglot extension #11

Closed mkristian closed 1 month ago

mkristian commented 3 months ago

using the new maven and the new polyglot-ruby to setup the ruby extension

This setup is done inside the maven distribution itself and thus need no extra configuration to use ruby DSL pom.rb or Mavenfile.

Updated the version to follow the base version of the maven distribution itself (3.9.)

headius commented 3 months ago

Nice! I'll review and merge tomorrow.

headius commented 2 months ago

I held off on merging because you mentioned the errors. Are you looking into these or should I try?

mkristian commented 2 months ago

@headius my performance speed and response time is horrible.

I fixed the spec, something odd with directory name extensions, do I changed it to something mode specific.

But if you could test the new gem in one or two scenario, like a docker container or anything without any cached maven artifacts, that would be great.

headius commented 1 month ago

@mkristian I can give it a test here but just updating the ruby-maven-libs gem has worked around the Docker problem already. I'm not sure if I'd be able to reproduce the issue even if I tried!

I'll push a preview version of the gem and a PR for JRuby to test it!

headius commented 1 month ago

https://github.com/jruby/jruby/pull/8372

headius commented 1 month ago

Difficult to test on gem install, because the jar-dependencies seems to only install released gems?

$ gem install psych            
  jar dependencies for psych-5.1.2-java.gemspec . . .
Installing gem 'ruby-maven' . . .
Fetching ruby-maven-libs-3.3.9.gem
Fetching ruby-maven-3.3.13.gem
Successfully installed ruby-maven-libs-3.3.9
Successfully installed ruby-maven-3.3.13
Parsing documentation for ruby-maven-libs-3.3.9
Installing ri documentation for ruby-maven-libs-3.3.9
Parsing documentation for ruby-maven-3.3.13
Installing ri documentation for ruby-maven-3.3.13
Done installing documentation for ruby-maven-libs, ruby-maven after 0 seconds
Parsing documentation for ruby-maven-3.3.13
Parsing documentation for ruby-maven-libs-3.3.9
Done installing documentation for ruby-maven, ruby-maven-libs after 0 seconds

using maven for the first time results in maven
downloading all its default plugin and can take time.
as those plugins get cached on disk and further execution
of maven is much faster then the first time.

ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - /Users/headius/work/jruby/lib/ruby/stdlib/polyglot_jars
    org/jruby/RubyDir.java:132:in `initialize'
    org/jruby/RubyClass.java:922:in `new'
    /Users/headius/work/jruby/lib/ruby/stdlib/ruby_maven.rb:73:in `launch'
    /Users/headius/work/jruby/lib/ruby/stdlib/ruby_maven.rb:47:in `exec'
    /Users/headius/work/jruby/lib/ruby/stdlib/maven/ruby/maven.rb:112:in `exec'
    /Users/headius/work/jruby/lib/ruby/stdlib/jars/maven_exec.rb:79:in `resolve_dependencies_list'
    /Users/headius/work/jruby/lib/ruby/stdlib/jars/installer.rb:233:in `install_dependencies'
    /Users/headius/work/jruby/lib/ruby/stdlib/jars/installer.rb:224:in `do_install'
    /Users/headius/work/jruby/lib/ruby/stdlib/jars/installer.rb:170:in `vendor_jars'
    /Users/headius/work/jruby/lib/ruby/stdlib/jars/post_install_hook.rb:28:in `block in <main>'
headius commented 1 month ago

Time to just go for it and we'll deal with any fallout. jar-dependencies needs the ruby-maven release to really test properly, so let's do that.