Leiningen Bug In Producing Uberjars Or Misunderstanding?

What can cause lein uberjar to fail with "Caused by: java.lang.ClassNotFoundException" errors when lein run runs my app successfully? I'm using leiningen 2.5.1.

It looks like leiningen provides profiles as a way to make custom environments for certain tasks. However, I don't believe a profile difference between what is happening with lein run and lein uberjar is responsible because ...

1) I tried producing the uberjar with every possible profile, via lein with-profile <profile> for every <profile> named in the output of lein show-profiles .

2) I ran lein with-profile uberjar run , and no errors arose.

In case the answer to this problem and similar problems might be specific to the classes and dependencies involved, it is classes related to Overtone that produce the ClassNoteFoundException errors.

My project.clj file looks like:

(defproject cochlea "0.1.0-SNAPSHOT"
  :description "An interactive ear training GUI application"
  :url "http://github.com/seewalker/cochlea"
  :license {:name "GPL v3"
            :url "http://www.gnu.org/copyleft/gpl.html"}
  :repositories {"conjars" "http://conjars.org/repo"}
  :dependencies [[org.clojure/clojure "1.5.1"]
             [overtone "0.9.1"]
             [org.clojure/tools.trace "0.7.5"]
             [org.clojure/java.jdbc "0.3.7"]
             [postgresql "9.1-901.jdbc4"]
             [environ "0.5.0"]
             [incanter "1.9.0"]
             [clj-time "0.9.0"]
             [me.raynes/conch "0.8.0"]
             [seesaw "1.4.2" :exclusions [org.clojure/clojure]]]
  :profiles { :uberjar  {:aot :all} }
  :repl-options { :timeout 120000}
  :main cochlea.core
  :target-path "target/%s")
链接地址: http://www.djcxy.com/p/51740.html

上一篇: 代理不在uberjar工作

下一篇: Leiningen生产Uberjars的错误还是误解?