Thanks! This works perfectly.

It took a few tries to find the right incantation, but this seems to do:

(defn -main [& args]
  (Main/main (into-array String args)))

I note that the .clj file for this namespace ends up in the uberjar, but 
looks like it doesn't pull in the jar for the tool.


On Wednesday, August 13, 2014 2:04:04 PM UTC-7, Shantanu Kumar wrote:
>
>
>
> On Thursday, 14 August 2014 02:23:50 UTC+5:30, Brian Craft wrote:
>>
>> I need to run a tool while building docs which is distributed as a jar 
>> file, and is run with "java -jar". Not sure the best way to do this. lein 
>> can fetch the jar if I add it to dev dependencies, but then it's in some 
>> directory in ~/.m2. Is there some simple way to get the path so I can pass 
>> it to java? Does lein expose the m2 repository directory somehow?
>>
>
> If lein can fetch it, it'd be on the project classpath too -- just write a 
> Clojure ns with a `-main` fn that invokes the main class in the JAR (find 
> that in MANIFEST.MF file in the JAR), and trigger this ns using `lein run`. 
> HTH.
>
> Shantanu
>

-- 
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.

Reply via email to