On Jan 28, 12:09 am, Phil Hagelberg <[email protected]> wrote:
> Perry Trolard <[email protected]> writes:
> Any time you have dependencies that aren't in repositories, it's going
> to cause pain. It's much better to put them in a repository, even if
> it's a private/local one, than to bend Leiningen to work with bare jars.
>
> -Phil

Fair enough, though I think it was more a case of asking Leiningen to
produce bare jars for use outside of its environment — e.g. standalone
executables, the point of uberjar.

In case others are interested (& it isn't too obvious to mention), I
did end up using Leiningen to take care of my `clj` script setup. I
found that it greatly simplified things compared to the filesystem-
based configuration I used before. The project.clj looks like

(defproject clj "1.0.0-SNAPSHOT"
            :description "Jar for `clj` CLI script."
            :main clojure.main
            :dependencies
              [[org.clojure/clojure "1.2.0-master-SNAPSHOT"]
               [org.clojure/clojure-contrib "1.1.0-new-SNAPSHOT"]
               [clojure-saxon "0.9.0-SNAPSHOT"]
               [clojure-http-client "1.0.0-SNAPSHOT"]])

& my `clj` script is now

-----
#!/bin/bash

jopts='-Xmx256m -server -Dfile.encoding=UTF-8'
cp=~/software/clojure/clj/clj-standalone.jar

# add to the classpath
if [[ $1 == "-cp" ]]; then
    shift
    cp=$cp:$1
    shift
fi
# print the classpath
if [[ $1 == --print-c* ]]; then
   echo $cp
   exit 0
fi

exec rlwrap java $jopts -cp $cp clojure.main "$@"
----

Perry

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to