{"id":16726296,"url":"https://github.com/brunobonacci/lein-binplus","last_synced_at":"2025-08-25T01:13:18.632Z","repository":{"id":62433307,"uuid":"54469242","full_name":"BrunoBonacci/lein-binplus","owner":"BrunoBonacci","description":"A Leiningen plugin for producing standalone console executables that work on OS X, Linux, and Windows.","archived":false,"fork":false,"pushed_at":"2023-03-21T12:26:21.000Z","size":46,"stargazers_count":69,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-02T19:34:02.916Z","etag":null,"topics":["clojure","executable","java","uberjar"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrunoBonacci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-22T11:20:06.000Z","updated_at":"2025-04-11T15:31:09.000Z","dependencies_parsed_at":"2024-10-26T21:11:22.302Z","dependency_job_id":"ab6770a3-7e71-455c-981a-fe3c097a97f9","html_url":"https://github.com/BrunoBonacci/lein-binplus","commit_stats":{"total_commits":63,"total_committers":13,"mean_commits":4.846153846153846,"dds":0.6031746031746033,"last_synced_commit":"559c59fce44ef16ffc8ea8eed54018d8e1c14c4b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/BrunoBonacci/lein-binplus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBonacci%2Flein-binplus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBonacci%2Flein-binplus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBonacci%2Flein-binplus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBonacci%2Flein-binplus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrunoBonacci","download_url":"https://codeload.github.com/BrunoBonacci/lein-binplus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBonacci%2Flein-binplus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271989878,"owners_count":24854702,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["clojure","executable","java","uberjar"],"created_at":"2024-10-12T22:52:47.363Z","updated_at":"2025-08-25T01:13:18.580Z","avatar_url":"https://github.com/BrunoBonacci.png","language":"Clojure","readme":"# lein-binplus\n\nA Leiningen plugin for producing standalone console executables that\nwork on OS X, Linux, and Windows.\n\nIt basically just takes your uberjar and stuffs it in another file\nwith some fancy magical execution stuff.\n\n**NOTE: This is a fork of\n[Raynes/lein-bin](https://github.com/Raynes/lein-bin)\nwith the addition of several bug-fixes and improvements.**\n\nSadly, [@Raynes passed away last December (2016)](https://cemerick.com/2016/12/07/rip-anthony-grimes/)\ntherefore I decided to fork the project and carry on the development in my own copy.\n\nIt is compatible with the original and it is a *drop-in replacement* for it,\nyou just need to update the dependency.\n\n## Latest version\n\n[![Clojars Project](https://img.shields.io/clojars/v/lein-binplus.svg)](https://clojars.org/lein-binplus)\n\n## Usage\n\nThis is a leiningen plugin. If you're using lein 1, run `lein plugin\ninstall lein-binplus \u003ccurrent-version\u003e` to install it.  If you're using\nlein 2, add the plugin to your default profile in\n`~/.lein/profiles.clj`.\n\nTo install it in your `profile.clj` just add the dependency like:\n\n``` clojure\n{:user\n {:plugins\n  [[lein-binplus \"0.6.8\"]]}}\n```\n\nTo install it in a single project add it in your `project.clj` as follow:\n\n``` clojure\n  :profiles {:uberjar {:aot :all}\n             :dev {:plugins [[lein-binplus \"0.6.8\"]]}}\n```\n\nYour project needs to have a `:main` field specifying the namespace\nthat contains your `-main` function.  If you have that, just run `lein\nbin` and it'll produce a standalone executable for your project. Note\nthat your main namespace currently needs to be AOT compiled (it just\nneeds to have `:gen-class` specified in its `ns` declaration).\n\nYou can also supply a `:bin` key like so:\n\n        ;; add this in your project\n        :bin {:name \"runme\"\n              :bin-path \"~/bin\"\n              :jvm-opts [\"-server\" \"-Dfile.encoding=utf-8\" \"$JVM_OPTS\" ]}\n\n  * `:name`: Name the file something other than `project-version`\n  * `:bin-path`: If specified, also copy the file into `bin-path`,\n    which is presumably on your $PATH.\n  * `:jvm-opts`: If specified, supply the Java options to be used in\n    the executable jar. When present it overrides the project's\n    `:jvm-opts`. It support environment variables as well.\n  * `:bootclasspath`: Supply the uberjar to java via\n    `-Xbootclasspath/a` instead of `-jar`.  Sometimes this can speed\n    up execution, but may not work with all classloaders.\n  * `:skip-realign`: (default: `false`) Re-aligning ZIP archives\n    resets the correct offsets for the entries taking into account\n    the preamble size. Set `:skip-realign true` if you wish to skip\n    this process and not realign the entries.\n\n## Advanced use.\n\nThis plugin works by adding a custom script at the beginning of a JAR file\nas explained in [this blog post](http://skife.org/java/unix/2011/06/20/really_executable_jars.html).\n\nThe default \"preamble\" assumes that you have java in your PATH and that you wish\nto run your executable jar across multiple platforms (Linux, OSX and Windows).\n\nHowever if you need a specific set of options or a different preamble you\ncan add a `:custom-preamble` string in your `:bin` section of your `project.clj`.\n\n\n        ;; specify a custom preamble\n        :bin {:name \"runme\"\n              :custom-preamble \"#!/bin/sh\\nexec java {{{jvm-opts}}} -jar $0 \\\"$@\\\"\\n\"}\n\nThe custom preamble contains a placeholder `{{jvm-opts}}` which will be replaced\nat creation time with the `:jvm-opts` specified in your project.\n\nHere a list of possible substitutions:\n\n  - `{{project-name}}` - the name specified in your `project.clj`\n  - `{{version}}` - the version specified in your `project.clj`\n  - `{{main}}` - the main namespace as of `:main` in your `project.clj`\n  - `{{jvm-opts}}` - the `:jvm-opts` specified in your `:bin` section,\n     if present, of the `:jvm-opts` or your `project.clj`.\n     The default options are: `[\"-server\" \"-Dfile.encoding=UTF-8\"]`\n     This might contains environment variables in the form of:\n     `$VAR1` like `$HOME`.\n  - `{{win-jvm-opts}}` - is a Windows compatible version of `{{jvm-opts}}`.\n     This mainly contains environment variable in the Windows format.\n     For example `$HOME` becomes `%HOME%`.\n\n**Note:** `lein-binplus` uses a templating library\ncalled [Clostache](https://github.com/fhd/clostache) to render the\ntemplates. Clostache automatically escapes characters such as: `\u003c \u003e \u0026 %`.\nIf you don't want this behaviour use the triple braces in place of the\ndouble ones.\n\n```\n  Escaped: {{jvm-opts}}\nUnescaped: {{{jvm-opts}}}\n```\n\nAlternatively you can specify the preamble in a file using\n`:custom-preamble-script` in your `:bin` section of your\n`project.clj`.\n\n\n        ;; specify a custom preamble\n        :bin {:name \"runme\"\n              :custom-preamble-script \"./bin/preamble.sh\"}\n\nNOTE: if both keys `:custom-preamble` and `:custom-preamble-script`\nare present the latter (`:custom-preamble-script`) takes precedence\nand `:custom-preamble` is ignored.\n\n## Changes from the original version\n\nThis version contains a number of fixes and improvements which are not\npresent in the original version.\n\n  - added ability to customize `:jvm-opts` with support for\n    environment variables.\n  - Security fix for `CVE-2012-2098` on dependency\n    (https://github.com/BrunoBonacci/lein-binplus/pull/1)\n  - Fix for Windows preamble parameter handling\n    (https://github.com/BrunoBonacci/lein-binplus/pull/6)\n  - Fix incorrect offset-rewrite on zip file\n    (https://github.com/BrunoBonacci/lein-binplus/pull/7)\n  - Add ability to fully customize and template preamble script.\n\nAlthough, many changes have been applied which ultimately ended up\nwith a full rewrite, this version of `lein-binplus` is it a **fully\ncompatible, drop-in replacement** for the original version.\n\n## License\n\nThe original plugin Copyright (C) 2012 Anthony Grimes, Justin Balthrop, Jason Whitlark\n\nThis enhanced version Copyright (C) 2016-2018 Bruno Bonacci\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunobonacci%2Flein-binplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunobonacci%2Flein-binplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunobonacci%2Flein-binplus/lists"}