테스트를 위해 Midje 라이브러리를 사용하는 Leiningen 프로젝트가 있습니다. Howerver 나는 그래서 내가 잘못 종속성 dev
프로파일을 정의하기 때문에이 추측 lein test
의 경우 나는 와 교대로Midje 테스트를 실행하는 동안 FileNotFound 예외가 발생했습니다.
java.io.FileNotFoundException: Could not locate midje/sweet__init.class or midje/sweet.clj on classpath
또는를 얻을 나는
java.io.FileNotFoundException: Could not locate midje/util/ecosystem__init.class or midje/util/ecosystem.clj on classpath
를 얻을 수있는 테스트를 실행할 수 없습니다입니다 그러나 나는 진짜 문제가 어디에 있는지 모른다.
는 보너스로, 나는 또한, 나는 항상 내가 (이뿐만 아니라 동일한 문제가있을 수 있습니다)에env
지도에서 일부 속성을 끌어 할
nil
얻고있다
environ
작업을 얻을 수 없습니다.
내 project.clj
(defproject
project
"0.1.0-SNAPSHOT"
:dependencies
[[org.clojure/clojure "1.8.0"]
[environ "1.1.0"]
;; other deps, midje is not there
:repl-options
{:init-ns mailing.repl}
:jvm-opts
["-server"]
:plugins
[[lein-ring "0.8.13"]
[lein-environ "1.0.0"]
[lein-ancient "0.5.5"]
[migratus-lein "0.4.2"]]
:ring
{:handler mailing.handler/app,
:init mailing.handler/init,
:destroy mailing.handler/destroy}
:profiles
{:uberjar {:omit-source true, :env {:production true}, :aot :all},
:production
{:ring {:open-browser? false, :stacktraces? false, :auto-reload? false}},
{:dev
{:env
{:db-user "user"
:db-password "psswd"
:db-classname "org.postgresql.Driver"
:db-subprotocol "postgresql"
:db-subname "//localhost/mailer"}}}
{:dependencies
[[ring-mock "0.1.5"]
[ring/ring-devel "1.3.1"]
[midje "1.6.3"]],
:env {:dev true}}}
:migratus {
:store :database
:migration-dir "migrations"
:db {
:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:subname "//localhost/mailer"
:user "usr"
:password "psswd"}}
;; refer to user and psswd from project
:min-lein-version "2.0.0")
개발 의존성이 : dev 프로필 블록 안에있는 것처럼 보이지 않습니다. – jszakmeister
그래, 나도 알아 챘지만, 거기에 넣으면'Map Literal은 짝수 개의 양식을 포함해야한다. ' 따라서 올바른 구문이 무엇인지 확실하지 않습니다 –