You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
allow warbler to use locked jars from jar-dependencies #481
jar-dependencies comes bundled with jruby and superseed jbundler. jbundler and jar-dependencies are using the same Jarfile but their lock file is different. jar-dependencies uses Jars.lock
With Jars.lock present and assuming jars resolution took place - buldler install - it is just a matter of using Jars::Lock.new("Jars.lock") to info to copy the jars into the war and maybe a jars loader (probably there are a few ways to require_jar the jars from the warfile)
@jlahtinen I'm not really an expert in jar-dependencies, but that is possibly a reasonable workaround if you know you have a Jars.lock there that will make it deterministic, and you are using bundler?
I guess closing this would involve adding a small auto-discovered trait which does that automatically similar to how JBundler worked, but perhaps triggered on Jarfile or Jars.lock, but which we could make dependent on the bundler trait. Perhaps there are some niggles to address dealing with bundled jar-dependencies at warble-time vs the runtime jar-dependencies version that might be implied by ones bundle config; and maybe it's not necessary to add the libs manually, as long as they are made pre-available to jar-dependencies so they can be dynamically located at Bundle.setup time based on the locked or pre-supplied versions (rather than re-resolved)?
Activity
mkristian commentedon Apr 23, 2020
please on further question please ping me . . .
headius commentedon May 12, 2020
So basically we would switch the current logic from using JBundler to copy in the jars and instead use Jars::Lock?
rwygand commentedon Oct 5, 2021
This is something I'd be interested in leveraging, if it's still a pending feature request.
mkristian commentedon Nov 28, 2021
@rwygand yes, this is still pending as:
please ping me if you need help
jlahtinen commentedon Oct 13, 2026
Can this be handled with
config.java_libs += Jars::Classpath.new.classpathin warble.rb or is this something else?chadlwilson commentedon Oct 13, 2026
@jlahtinen I'm not really an expert in jar-dependencies, but that is possibly a reasonable workaround if you know you have a
Jars.lockthere that will make it deterministic, and you are using bundler?I guess closing this would involve adding a small auto-discovered trait which does that automatically similar to how JBundler worked, but perhaps triggered on
JarfileorJars.lock, but which we could make dependent on the bundler trait. Perhaps there are some niggles to address dealing with bundled jar-dependencies at warble-time vs the runtime jar-dependencies version that might be implied by ones bundle config; and maybe it's not necessary to add the libs manually, as long as they are made pre-available to jar-dependencies so they can be dynamically located atBundle.setuptime based on the locked or pre-supplied versions (rather than re-resolved)?warbler/lib/warbler/traits/jbundler.rb
Lines 33 to 46 in e215500