Fork me on GitHub
#java
<
2023-01-09
>
mathpunk21:01:39

I’m fuzzy on how to add a Java library to a Clojure project. It’s this one https://github.com/DataDog/datadog-api-client-java Do I need to compile the Java, like discussed https://gamlor.info/posts-output/2019-10-24-compile-java-with-clojure-deps/en/?

emccue00:01:23

Java projects are published as compiled jars generally

emccue00:01:39

so you should just need to add the maven dependency to your deps.edn

jumar07:01:53

It's very similar to using a Clojure library. You can find it in http://mvnrepository.com -> https://mvnrepository.com/artifact/com.datadoghq/datadog-api-client The page also contains an example code for leiningen: https://mvnrepository.com/artifact/com.datadoghq/datadog-api-client/2.6.0

[com.datadoghq/datadog-api-client "2.6.0"]
For deps.edn you would use an equivalent:
com.datadoghq/datadog-api-client {:mvn/version "2.6.0"}