In addition to tools.deps, which reads dependencies etc from a deps.edn file, you might want to look at Boot http://boot-clj.com which allows you to use libraries via the command line without needing a project or source files etc:
boot -d clj-http repl This will start a Clojure REPL (anywhere) with the clj-http library loaded. Boot also has a call task that accepts Clojure code via the command-line: boot -d clj-http call -p -e “(require ‘[clj-http.client :as http])” -e ‘(http/get “http://google.com”)’ The -p option tells call to print the result of each expression. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ________________________________ From: clojure@googlegroups.com <clojure@googlegroups.com> on behalf of C K Kashyap <ckkash...@gmail.com> Sent: Tuesday, November 28, 2017 2:49:53 PM To: clojure@googlegroups.com Subject: Re: Using libraries without Lein Thanks Alex ... just what I was looking for - putting the jars in classpath that is! I'll try out the new tool a little later though. Regards, Kashyap On Tue, Nov 28, 2017 at 2:27 PM, Alex Miller <a...@puredanger.com<mailto:a...@puredanger.com>> wrote: Sure. You need a jar for Clojure and a jar for clj-http and then just run Java with those in a classpath: java -cp clojure.jar:clj-http.jar my-program There is a lighter weight tool that we've added in Clojure 1.9 (also works with 1.8) that can help in assembling classpaths and serving as a runner. All it's really doing is taking a statement of deps and building the classpath to make that call. If you're interested in that, this will be useful: https://clojure.org/guides/deps_and_cli On Tuesday, November 28, 2017 at 4:20:43 PM UTC-6, Kashyap CK wrote: Hi, I am trying to use clj-http in my clojure program. I am trying to do the whole thing in a "light-weight" manner - without creating a project and all or using lein. Is that possible? or do I need to use Lein? Regards, Kashyap -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com<mailto:clojure@googlegroups.com> Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com<mailto:clojure%2bunsubscr...@googlegroups.com> For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to a topic in the Google Groups "Clojure" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/JaIX3aOZmvQ/unsubscribe. To unsubscribe from this group and all its topics, send an email to clojure+unsubscr...@googlegroups.com<mailto:clojure+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com<mailto:clojure+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.