{"id":15503035,"url":"https://github.com/rickmoynihan/lein-tools-deps","last_synced_at":"2025-04-04T16:16:50.984Z","repository":{"id":62433427,"uuid":"114179046","full_name":"RickMoynihan/lein-tools-deps","owner":"RickMoynihan","description":"A leiningen plugin that lets you share tools.deps.alpha dependencies in your leiningen project","archived":false,"fork":false,"pushed_at":"2022-12-20T12:47:36.000Z","size":128,"stargazers_count":167,"open_issues_count":26,"forks_count":20,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T15:11:12.805Z","etag":null,"topics":["clojure","leiningen","tools-deps"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RickMoynihan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-13T23:19:52.000Z","updated_at":"2024-05-31T07:44:02.000Z","dependencies_parsed_at":"2023-01-30T00:45:35.916Z","dependency_job_id":null,"html_url":"https://github.com/RickMoynihan/lein-tools-deps","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickMoynihan%2Flein-tools-deps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickMoynihan%2Flein-tools-deps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickMoynihan%2Flein-tools-deps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickMoynihan%2Flein-tools-deps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RickMoynihan","download_url":"https://codeload.github.com/RickMoynihan/lein-tools-deps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208183,"owners_count":20901570,"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":["clojure","leiningen","tools-deps"],"created_at":"2024-10-02T09:11:55.595Z","updated_at":"2025-04-04T16:16:50.960Z","avatar_url":"https://github.com/RickMoynihan.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lein-tools-deps\n\n**WARNING: This project is unmaintained and targets a 4y/old version of tools.deps**\n\n[![Clojars Project](https://img.shields.io/clojars/v/lein-tools-deps.svg)](https://clojars.org/lein-tools-deps)\n\n[![Build Status](https://travis-ci.org/RickMoynihan/lein-tools-deps.svg?branch=master)](https://travis-ci.org/RickMoynihan/lein-tools-deps)\n\nA leiningen plugin that lets you\nshare [tools.deps.alpha](https://github.com/clojure/tools.deps.alpha)\n`deps.edn` dependencies with your leiningen project build.\n\n## Do you really want to use this?\n\nProbably not, it has been over 4 years since its last update; and is hugely \nbehind on changes in tools.deps.  If you think you need to use this, then\nyou should expect to fork it and maintain it going forward, or if you require `git/deps` \nuse [tools.build](https://clojure.org/guides/tools_build)\ninstead.  \n\nIf you plan on forking this, then you will probably want to update to a more \nrecent version of tools.deps, and I'd also suggest at least fixing \n[this issue](https://github.com/RickMoynihan/lein-tools-deps/issues/91) if you\nintend to also use it for library development.\n\n`lein-tools-deps` has to square the circle between leiningen \u0026 maven's \ndependency resolution algorithm and that used by tools.deps.  Leiningen \nand Maven, when there is a conflict always pick the version that is closest\nto the root of the dependency tree; where as `tools.deps` always picks \nthe newest.\n\nIn order to square this circle, `lein-tools-deps` resolves all dependencies\nwith `tools.deps` and flattens the tree before inserting it into lein's\n`:dependencies` vector.  This guarantees the resolution is the same as\n`tools.deps` would give; however it has the unfortunate effect of flattening\nyour libraries dependencies for consumers of your library.  This makes it\nsignificantly harder for consumers to use `:exclusions` and overrides when\nthey get a conflict on a transitive dependency brought in by your library.\n\n## Why use leiningen and deps.edn?\n\nThe Clojure 1.9.0 command line tools bring a host of new benefits to\nthe Clojure practitioner.  In particular native support for\ndependencies hosted in git repositories (and not deployed as maven\nartifacts), faster startup times for project REPLs, and easier ways to\nscript with Clojure and define multi-project projects; all whilst\nproviding a purely declarative data format in the form of `deps.edn`\nfiles.\n\nHowever at its core `deps.edn` and the CLI tools are just a simple\nsystem that provide better facilities for resolving dependencies and\nbuilding a java classpath.  They actively avoid being a build tool,\nand consequently can't be used in isolation to build a project, `:aot`\ncompile it, `uberjar` it, etc...\n\nLeiningen is the incumbent build tool for Clojure projects.  It's well\nsupported, with a thriving plugin ecosystem, and is the default choice\nin the Clojure world if you need to build an application or deploy a\nlibrary.  It's easy to get started with and is great if you have a\npro-forma project; which doesn't need much custom build-scripting.\n\n`lein-tools-deps` teaches Leiningen to take its `:dependencies` from\nyour `deps.edn` files, which means you can get the best of both\nworlds.  You can use `clj` and `deps.edn` to take advantage of\n`deps.edn` sub-projects, located on the local filesystem\n(`:local/root`) and in git repositories (`:git/url`) or make use of\nstandard maven dependencies (`:mvn/version`).\n\n`lein-tools-deps` will let you replace your leiningen `:dependencies`\nentirely with those from `deps.edn` meaning you don't need to repeat\nyourself.  Likewise for `deps.edn` projects if you need to start\n`:aot` compiling, `uberjar`ing, or integrating with a `:cljs-build`,\nyou now can.\n\nEssentially `lein-tools-deps` lets Clojure practitioners use both\n`Leiningen` and the `clj` / `deps.edn` tools together in the same\nproject.\n\n## Why not use boot instead?\n\nBoot is arguably a better choice than Leiningen if you need more bespoke build\nscripting.  However Leiningen projects because of their declarative\nconstraints tend to be more uniform and familiar.  Leiningen projects\nare harder to turn into unique snowflakes, which might be better or\nworse for you.\n\nIf you don't need anything fancy (like a combined Clojurescript/Clojure \nbuild) and want to just get started quickly, I'd recommend Leiningen \nover Boot.  If you don't need to `:aot`, or to build your Clojure at \nall, and your development environment and prefered tools support it go \nlightweight and just use `clj` and `deps.edn`.\n\nIf you want to integrate boot with `tools.deps` you can via @seancorfield's \n[boot-tools-deps](https://github.com/seancorfield/boot-tools-deps/).\n\n## Why not just use deps.edn?\n\nIf you can do this, consider it, and consider not using `lein-tools-deps` at\nall.  Yes, I'm saying maybe you don't need this project; even if it is pretty\ngood :-)\n\n`deps.edn` is starting to grow an ecosystem of tools and whilst they're\nnot yet mature, and the landscape is frequently changing, with various \ncontenders many existing tools such as the Clojurescript compiler, and \nfigwheel-main have native support for `deps.edn`.  Additionally there are\nnew tools such as [depstar](https://github.com/healthfinch/depstar), \n[pack.alpha](https://github.com/juxt/pack.alpha), [katamari](https://github.com/arrdem/katamari)\nthat will work with `deps.edn` and might be able to build that uberjar for you.  \n\nSee the [tools.deps Tools](https://github.com/clojure/tools.deps.alpha/wiki/Tools) page\nfor a more complete list of available tooling.\n\n`lein-tools-deps` is for those who need or want to keep a foot in both \ncamps.  Perhaps it's suitable as a stop gap solution for an existing \nleiningen project, or perhaps members of your team are only just \ngetting used to leiningen, and you don't want to confuse them with\nanother tool or workflow.\n\n## More [Frequently Asked Questions...](https://github.com/RickMoynihan/lein-tools-deps/wiki/FAQ)\n\n## Usage\n\nSimply add the following to your plugins and middleware vectors,\nrespectively, in your `project.clj`:\n\n```clojure\n  :plugins [[lein-tools-deps \"0.4.5\"]]\n```\n\n```clojure\n  :middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]\n```\n\nThen set `:lein-tools-deps/config` to specify which `deps.edn` files to resolve, we recommend:\n\n```\n:lein-tools-deps/config {:config-files [:install :user :project]}\n```\n\nThe keywords `:install`, `:user` and `:project` will be resolved by the\nplugin.  You can also supply your own paths as strings, e.g.\n\n`:lein-tools-deps/config {:config-files [:install :user :project \"../src/deps.edn\"]}`\n\nYou can now delete your `:dependencies` vector from `project.clj`.\n\n\u003e Note: With `lein-tools-deps` `0.3.0-SNAPSHOT` and earlier, the\n\u003e config value was a vector and looked like `:tools/deps [:install\n\u003e :user :project]`, as of 0.4.0 it changed to the above map\n\u003e based syntax.\n\n### Supported configuration options\n\n#### `:config-files`\n\nA vector referencing an ordered collection of `deps.edn` files that\nwill be used for dependency resolution.  Each file should be either a\nfile path string or a special keyword (`:install` `:user` or\n`:project`). The special `:install` and `:user` keys refer to the `deps.edn`\nfiles defined in the installation and user's home `.clojure` config directories; \nwhilst `:project` refers to a `deps.edn` at the root of your leiningen project.\n\n#### `:clojure-executables`\n\nA vector of strings identifying possible install locations for the\n`clojure` command line tool script.  They will be tried in order, with\nthe first match being used.  The default is currently set to\n`[/usr/local/bin/clojure]`.  This is necessary as `lein-tools-deps`\nuses the `clojure` executable to determine some system specific\ndefaults, such as the location of the `:install` `:config-files`.\n\n#### `:resolve-aliases`\n\nA vector of `deps.edn` alias names whose `:extra-deps`, `override-deps`\nand `:default-deps` will be resolved with the same semantics as if they\nhad been used with the `-R` option to the `clj` tool.\n\n#### `:classpath-aliases`\n\nA vector of `deps.edn` alias names whose `:extra-paths` and\n`classpath-overrides` will be applied with the same semantics as if\nthey had been used with the `-C` option to the `clj` tool.\n\n#### `:aliases`\n\nA vector of `deps.edn` alias names whose values are resolved in the same\nway as for both `:resolve-aliases` and `classpath-aliases` above.\nEquivalent to the `-A` option of the `clj` tool.\n\n### Profiles\n\n`lein-tools-deps` works with Leiningen profiles, allowing you to specify \ndependencies on a per profile basis.  We support the use of any configuration\noptions in Leiningen profiles, which will follow Leiningen's standard \n`meta-merge` semantics for each of the configuration options above.  Profiles \nare merged before `tools.deps` resolution.\n\nE.g.\n\n```clojure\n    :lein-tools-deps/config {:config-files [\"foo.edn\"]}\n    :profiles {:dev {:lein-tools-deps/config [\"bar.edn\" \"baz.edn\"]}}\n```\nresults a logical ```:config-files``` value of ```[\"foo.edn\" \"bar.edn\"\n\"baz.edn\"]```  when the ```:dev``` profile is used.\n\nAliases and all other options are resolved in a similar fashion, and support\nthe use of Leiningen's `^:replace`/`^:displace` metadata flags, to control the\nmerge.\n\nOne of the benefits of `lein-tools-deps` is that you can use profiles to group\nvarious combinations of `:aliases` etc under a single profile name.\n\n## Prerequisites\n\nYou will need the following base dependencies installed:\n\n- Java 8 (recommended)\n- Leiningen 2.8.1\n- [Clojure CLI Tools (1.9.0.341 or above)](https://clojure.org/guides/getting_started)\n\n## Project Status\n\n**ALPHA** because `tools.deps` is still `.alpha`.\n\nPRs \u0026 ideas for future development welcome.\n\nPlease see the [issue tracker](https://github.com/RickMoynihan/lein-tools-deps/issues)\n\n## With thanks to\n\n- @HughPowell\n- @mfikes\n- @seancorfield\n- @puredanger\n- @atroche\n- @marco-m\n\n## License\n\nCopyright © 2017 Rick Moynihan\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickmoynihan%2Flein-tools-deps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickmoynihan%2Flein-tools-deps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickmoynihan%2Flein-tools-deps/lists"}