2017-03-25 54 views

回答

7

那麼答案很簡單。我錯過了根文件夾中的boot.properties文件。只要創建一個文件,內容如下:

#https://github.com/boot-clj/boot 
#Sun Nov 01 16:34:27 CET 2015 
BOOT_CLOJURE_NAME=org.clojure/clojure 
BOOT_VERSION=2.7.1 
BOOT_CLOJURE_VERSION=1.8.0 
0

你應該只包括[org.clojure/clojure "1.8.0"]具有相同版本的引導環境變量BOOT_CLOJURE_VERSION=1.8.0

build.boot依存列表。

擺脫此問題的另一種方法是從列表中的幾個依賴項中排除clojure依賴項。

boot show -d 

將顯示你的依賴關係列表,

Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0 
2018-01-16 15:05:21.023:INFO::main: Logging initialized @6899ms 
[adzerk/boot-cljs "2.1.4" :scope "test"] 
[adzerk/boot-reload "0.5.2" :scope "test"] 
[hiccup "1.0.5"] 
[org.clojure/clojurescript "1.9.946"] 
├── [com.google.javascript/closure-compiler-unshaded "v20170910"] 
│ ├── [args4j "2.33"] 
│ ├── [com.google.code.findbugs/jsr305 "3.0.1"] 
│ ├── [com.google.code.gson/gson "2.7"] 
│ ├── [com.google.errorprone/error_prone_annotations "2.0.18"] 
│ ├── [com.google.guava/guava "20.0"] 
│ ├── [com.google.javascript/closure-compiler-externs "v20170910"] 
│ ├── [com.google.jsinterop/jsinterop-annotations "1.0.0"] 
│ └── [com.google.protobuf/protobuf-java "3.0.2"] 
├── [org.clojure/google-closure-library "0.0-20170809-b9c14c6b"] 
│ └── [org.clojure/google-closure-library-third-party "0.0-20170809-b9c14c6b"] 
├── [org.clojure/tools.reader "1.1.0"] 
└── [org.mozilla/rhino "1.7R5"] 
[org.clojure/data.json "0.2.6"] 
[pandeiro/boot-http "0.8.3"] 
└── [org.clojure/clojure "1.7.0"] 
[ring/ring-core "1.6.3" :exclusions [[org.clojure/clojure]]] 
├── [clj-time "0.11.0"] 
│ └── [joda-time "2.8.2"] 
├── [commons-fileupload "1.3.3"] 
├── [commons-io "2.5"] 
├── [crypto-equality "1.0.0"] 
├── [crypto-random "1.2.0"] 
└── [ring/ring-codec "1.0.1"] 
    └── [commons-codec "1.6"] 
[ring/ring-jetty-adapter "1.6.3" :exclusions [[org.clojure/clojure]]] 
├── [org.eclipse.jetty/jetty-server "9.2.21.v20170120"] 
│ ├── [javax.servlet/javax.servlet-api "3.1.0"] 
│ ├── [org.eclipse.jetty/jetty-http "9.2.21.v20170120"] 
│ │ └── [org.eclipse.jetty/jetty-util "9.2.21.v20170120"] 
│ └── [org.eclipse.jetty/jetty-io "9.2.21.v20170120"] 
└── [ring/ring-servlet "1.6.3"] 

正如你可以在這裏看到的是:

[pandeiro/boot-http "0.8.3"] 
└─[org.clojure/clojure "1.7.0"] 

依賴性,其啓動抱怨上。所以,我做了什麼來擺脫這種依賴的就是讓排斥build.boot喜歡這裏:

[pandeiro/boot-http "0.8.3" :exclusions [org.clojure/clojure]]

所以pandeiro/boot-http不依賴於舊版本的Clojure再和引導compain dissapeared。