我在解决两个不同包的依赖关系发生冲突的问题上遇到了很多困难。我的Project.clj的依赖项如下所示:
:dependencies [[org.clojure/clojure "1.6.0"]
[itsy "0.1.1"]
[amazonica "0.3.22" :exclusions [commons-logging org.apache.httpcomponents/httpclient com.fasterxml.jackson.core/jackson-core]]])我的名称空间如下所示:
(ns crawler.core
(:require [itsy.core :refer :all])
(:require [itsy.extract :refer :all])
(:use [amazonica.core]
[amazonica.aws.s3]))当我尝试用(load crawler/core)将名称空间加载到lein的repl中时,我会得到以下错误:
CompilerException java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z, compiling:(amazonica/core.clj:1:1)在线消息来源表明,这是一种依赖不匹配。我该怎么解决呢?
发布于 2015-05-22 21:12:37
我把排除在它上,而不是马奇尼卡,它起了作用。还修正了core.clj中的NS格式。
project.clj:
(defproject blabla "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[itsy "0.1.1" :exclusions [com.fasterxml.jackson.core/jackson-core]]
[amazonica "0.3.22" :exclusions [commons-logging org.apache.httpcomponents/httpclient]]])core.clj:
(ns blabla.core
(:require [itsy.core :refer :all]
[itsy.extract :refer :all]
[amazonica.core :refer :all]
[amazonica.aws.s3 :refer :all]))
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))来处理这些情况
莱茵:树
并添加排除,直到只有最新的版本仍然存在。
https://stackoverflow.com/questions/30404507
复制相似问题