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
It seems 0.5.7 was last version that cares about Jarfile #116
When running bundle exec lock_jars I expected that Jars.lock would include all jars from Gemfile gems that adds jar requirements in gemspecs. Also I expected that lock_jars would include all jars spesified in Jarfile. After 0.5.7 it seems Jarfile is not opened at all when running bundle exec lock_jars.
Right, this might be considered intended - switching off "full" mvn support (after-all we're no longer using Maven):
The maven-tools DSL (custom repository / source / local / snapshot declarations) in a Jarfile would need to be evaluated to support previous behavior.
Also I expected that lock_jars would include all jars spesified in Jarfile
AFAIU, that was mostly the domain of jbundler and likely a relic that ended up being moved over to jar-dependencies? 🤷
We could restore a limited sub-set behavior of Jarfile (without Maven DSL) but I am not sure.
What do you actually use it for, just as a place to declare extra jar dependencies or are you using the DSL features?
Seems like I was wrong, most of this could be supported with Mima APIs.
Will give it a go, still interested in your specific use-case to make sure we don't miss anything.
I started using jar-dependencies maybe 3-4 weeks ago. I tried different versions and tried to understand how this works or should work. Maybe I misunderstood something ...
My goal was to get rid of all jar files in the repository and specify them in Jars.lock file. I noticed that all gems that add jar dependencies will effect how Jars.lock is generated (naturally I think). I also thought that I can add e.g. oracle jdbc jar file to Jarfile as oracle enhanced adapter does not add taht jar dependency to gemspec afaik.
I currently have a workaround for this: I created a gem that has no code and only requirement is 'jar com.oracle.database.jdbc:ojdbc11, 23.9.0.25.07'. Then I depend on this gem on the app Gemfile. This way that ojdbc11 jar ends to Jars.lock. So curently I have no use-case. I still think it would be more convenient to allow to specify jar dependencies (used directly by the app code not by the gems) to Jarfile instead of making a gem to bring them to Jars.lock.
Happy to provide more information if needed and happy to answer if questions rises.
think it would be more convenient to allow to specify jar dependencies (used directly by the app code not by the gems) to Jarfile instead of making a gem to bring them to Jars.lock
makes sense, was under the impression jbundler might still handle those use-cases but seems like jar-dependencies did work with those and can support the Jarfile moving forward - we should have it back in next release.
you're use-case if perfectly valid and should be usable, thanks.
Activity
kares commentedon Oct 16, 2026
could you elaborate a bit, not sure what this mean precisely?
jlahtinen commentedon Oct 16, 2026
When running
bundle exec lock_jarsI expected thatJars.lockwould include all jars fromGemfilegems that adds jar requirements in gemspecs. Also I expected that lock_jars would include all jars spesified inJarfile. After 0.5.7 it seems Jarfile is not opened at all when runningbundle exec lock_jars.kares commentedon Oct 30, 2026
Right, this might be considered intended - switching off "full" mvn support (after-all we're no longer using Maven):
The maven-tools DSL (custom
repository/source/local/snapshotdeclarations) in a Jarfile would need to be evaluated to support previous behavior.AFAIU, that was mostly the domain of jbundler and likely a relic that ended up being moved over to jar-dependencies? 🤷
We could restore a limited sub-set behavior of Jarfile (without Maven DSL) but I am not sure.
What do you actually use it for, just as a place to declare extra jar dependencies or are you using the DSL features?
kares commentedon Oct 31, 2026
Seems like I was wrong, most of this could be supported with Mima APIs.
Will give it a go, still interested in your specific use-case to make sure we don't miss anything.
[fix] read Jarfile in lock_jars again (jruby#116)
[fix] read Jarfile in lock_jars again (jruby#116)
jlahtinen commentedon Nov 2, 2026
I started using jar-dependencies maybe 3-4 weeks ago. I tried different versions and tried to understand how this works or should work. Maybe I misunderstood something ...
My goal was to get rid of all jar files in the repository and specify them in Jars.lock file. I noticed that all gems that add jar dependencies will effect how Jars.lock is generated (naturally I think). I also thought that I can add e.g. oracle jdbc jar file to Jarfile as oracle enhanced adapter does not add taht jar dependency to gemspec afaik.
I currently have a workaround for this: I created a gem that has no code and only requirement is 'jar com.oracle.database.jdbc:ojdbc11, 23.9.0.25.07'. Then I depend on this gem on the app Gemfile. This way that ojdbc11 jar ends to Jars.lock. So curently I have no use-case. I still think it would be more convenient to allow to specify jar dependencies (used directly by the app code not by the gems) to Jarfile instead of making a gem to bring them to Jars.lock.
Happy to provide more information if needed and happy to answer if questions rises.
kares commentedon Nov 2, 2026
makes sense, was under the impression jbundler might still handle those use-cases but seems like jar-dependencies did work with those and can support the Jarfile moving forward - we should have it back in next release.
you're use-case if perfectly valid and should be usable, thanks.
[fix] read Jarfile in lock_jars again (jruby#116)