Using classifiers with deps.edn

One of Maven’s dependency management features is the classifier. Classifiers let you create multiple different artifacts from the same POM. You might use this to publish variations with native libraries for each OS, or to support different Java versions. This is also how sources and javadoc artifacts are created.

In Maven you can specify a dependency on a version with <classifier> like this:

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-epoll</artifactId>
    <version>4.1.74</version>
    <classifier>linux-x86_64</classifier>
</dependency>

To specify this dependency with Clojure’s deps.edn, you need to use the syntax <group>/<artifact>$<classifier>:

{:deps 
  {io.netty/netty-transport-native-epoll$linux-x86_64 
    {:mvn/version "4.1.74.Final"}}}