Install JAR from remote repo (clojar)

I want to download and install this Clojure library, but I canโ€™t figure it out for my whole life. I explored Maven but couldn't find it to find the repo. How can I easily install the Clojure library on my machine?

+6
source share
3 answers

download https://clojars.org/repo/clj-http/clj-http/0.4.1/clj-http-0.4.1.jar

mvn install:install-file -DgroupId=clj-http -DartifactId=clj-http -Dversion=0.4.1 -Dpackaging=jar -Dfile=clj-http-0.4.1.jar 
+4
source

You can add the repository containing this jar to your pom or settings file and specify the corresponding jar as a dependency.

 <repository> <id>clojars.org</id> <url>http://clojars.org/repo</url> </repository> ... <dependency> <groupId>clj-http</groupId> <artifactId>clj-http</artifactId> <version>0.4.1</version> </dependency> 
+9
source

If you use Leiningen, you can just read all about how to connect to the repository server on a recent Sonatype blog post from Tim O'Brien.

If you are using Maven, you should get a repo server like Nexus and set up the clojure repository as another proxy repository and add it to your public group.

If none of these approaches suits you, you can use the Raghurams or number23_cn approach. Both of them, however, are semi-optimal and will not scale for teams or many artifacts.

0
source

Source: https://habr.com/ru/post/916964/


All Articles