{"id":13846881,"url":"https://github.com/mkristian/jbundler","last_synced_at":"2025-04-12T21:20:02.308Z","repository":{"id":49728978,"uuid":"3895180","full_name":"mkristian/jbundler","owner":"mkristian","description":"bundler support for jars for jruby","archived":false,"fork":false,"pushed_at":"2022-08-08T12:14:21.000Z","size":2770,"stargazers_count":211,"open_issues_count":26,"forks_count":40,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-04T00:20:04.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkristian.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-01T20:23:57.000Z","updated_at":"2025-01-14T05:09:54.000Z","dependencies_parsed_at":"2022-08-28T02:24:08.557Z","dependency_job_id":null,"html_url":"https://github.com/mkristian/jbundler","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkristian%2Fjbundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkristian%2Fjbundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkristian%2Fjbundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkristian%2Fjbundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkristian","download_url":"https://codeload.github.com/mkristian/jbundler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248632190,"owners_count":21136641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T18:00:49.486Z","updated_at":"2025-04-12T21:20:02.282Z","avatar_url":"https://github.com/mkristian.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# jbundler\n\n* [![Build Status](https://secure.travis-ci.org/mkristian/jbundler.svg)](http://travis-ci.org/mkristian/jbundler)\n\nManage jar dependencies similar to how **bundler** manages gem dependencies:\n\n* the DSL mimics the one from bundler\n* you can use maven-like version declarations or rubygems/bundler version ranges\n* it locks down the jar versions inside \"Jarfile.lock\"\n* you can declare jar dependencies within a gem using the requirements directive of the gem specification. jbundler will include those jar dependencies into its classpath\n\ndifferences compared to **bundler**\n\n* you need to run ```bundle install``` first if any of the gems have jar dependencies.\n* all one command ```jbundle```, see ```jbundle help``` on the possible options and how to update a single jar, etc.\n\n## Get started\n\nInstall JBundler with:\n```bash\njruby -S gem install jbundler\n```\n\nFirst, create a **Jarfile**, something like:\n```bash\njar 'org.yaml:snakeyaml', '1.14'\njar 'org.slf4j:slf4j-simple', '\u003e1.1'\n```\n\nInstall jar dependencies\n```bash\njruby -S jbundle install\n```\n\nLoading the jar files\n```bash\nrequire 'jbundler'\n```\n\nIt will add all the jar dependencies in the java classpath from the `Jarfile.lock`.\n\n### Jarfile\n\nMore info about the **[Jarfile](https://github.com/torquebox/maven-tools/wiki/Jarfile)** and about [versions](https://github.com/torquebox/maven-tools/wiki/Versions).\n\nFor adding a maven repository see [Jarfile](https://github.com/torquebox/maven-tools/wiki/Jarfile).\n\n## Building the jbundler gem\n\nRunning the integration test\n\n```bash\n./mvnw verify\n./mvnw clean verify\n```\nor a single integration test\n```bash\n./mvnw verify -Dinvoker.test=running_rspec_via_rake\n./mvnw clean verify -Dinvoker.test=running_rspec_via_rake\n```\n\nBuilding the gem (see ./pkg)\n```bash\n./mvnw package -Dinvoker.skip\n```\n\nOr just\n```bash\ngem build jbundler.gemspec\n```\n\n## Usage\n\nHere is an example usage of the AliasEvent class from the snakeyaml package\n\n```ruby\n#test_file.rb\nrequire 'jbundler'\nrequire 'java'\n\njava_import 'org.yaml.snakeyaml.events.AliasEvent'\n\nclass TestClass\n  def my_method\n    puts AliasEvent.methods\n  end\nend\n\nTestClass.new.my_method\n```\n\n## Limitations\n\nSince the version resolution happens in two steps - first the gems, and then the jars/poms - it is possible in case of a failure that there is a valid gems/jars version resolution which satisfies all version contraints. So there is plenty of space for improvements (like maven could resolve the gems as well, etc).\n\n## Special thanks\n\nThe whole project actually started with a controversial discussion on a [pull request on bundler](https://github.com/carlhuda/bundler/pull/1683). This very same pull request were the starting point of that project here. Probably by now there is not much left of the original code, but many thanks to [ANithian](https://github.com/ANithian) for giving the seed of that project.\n\nLicense\n-------\n\nAlmost all code is under the MIT license but the java class (AetherSettings.java)[https://github.com/mkristian/jbundler/blob/master/src/main/java/jbundler/AetherSettings.java] which was derived from EPL licensed code.\n\nContributing\n------------\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nMeta-fu\n-------\n\nenjoy :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkristian%2Fjbundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkristian%2Fjbundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkristian%2Fjbundler/lists"}