Skip to content

It seems 0.5.7 was last version that cares about Jarfile #116

Closed

Description

@jlahtinen

Test with only 2 files in a repo. Gemfile and Jarfile.

With gemfile

source "foo-bar"

group :development do
  gem 'jar-dependencies'
end

any Jarfile does not have any effect

Activity

  1. kares commented on Oct 16, 2026

    @kares
    Member

    could you elaborate a bit, not sure what this mean precisely?

  2. jlahtinen commented on Oct 16, 2026

    @jlahtinen
    Author

    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.

  3. kares commented on Oct 30, 2026

    @kares
    Member

    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?

  4. kares commented on Oct 31, 2026

    @kares
    Member

    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.

  5. linked a pull request that will close this issuerestore Jarfile support #120on Nov 1, 2026
  6. jlahtinen commented on Nov 2, 2026

    @jlahtinen
    Author

    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.

  7. kares commented on Nov 2, 2026

    @kares
    Member

    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.

  8. added this to the 0.6.2 milestone on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions