clojurejvmpom.xmldeps-edn

Within a Clojure project using deps.edn, where is the package name and version tracked?


Where would one track/store the package name and version string within a Clojure project using deps.edn? For example, within a Rust project, there is the Cargo.toml file where the package name and version string are stored along with other metadata about the package.


Solution

  • Not there. The deps.edn file is not a comprehensive description of your project, it's a file for specifying what the project's dependencies are, where to get them, what classpath the project has, and how to run it.

    Project name and version can be stored there as e.g. JVM options under some alias, but that's... unconventional to say the least. You'd be much better off creating a completely separate file and using it however you like. An EDN file with a map with :name and :version keys, a properties file with two keys, specially marked sections in your README, an existing package.json, a pom.xml created and updated with clj -X:deps mvn-pom where you keep the version and the groupId/artifactId of your project, and so on.

    And also, not every project needs a version and a name. While libraries do need them (and then pom.xml usually makes the most sense), apps often don't.