【问题标题】:Leiningen and local repo dependencies issueLeiningen 和本地 repo 依赖问题
【发布时间】:2013-08-21 06:23:05
【问题描述】:

我正在使用 Leiningen 和本地 repo,这是我的 project.clj。 Camelclojure 是本地罐子。

(defproject mashup-dsl "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.5.1"]

            [enlive "1.1.1"]
            [ring/ring-core "1.1.8"]
            [ring/ring-jetty-adapter "1.1.8"]
            [net.cgrand/moustache "1.0.0"]
            [ring/ring-devel "1.1.8"]
            [compojure "1.1.5"]
            [org.clojure/data.zip "0.1.1"]
            [org.apache.camel/camel-core "2.11.0"]
            [org.apache.camel/camel-component "1.4.0"]     
            [org.clojure/data.xml "0.0.7"]
            [camelclojure "0.0.1-SNAPSHOT"]

          ]
 :repositories {"local"  "C:/Users/pvmd/.m2/repository"}
 :plugins [[lein-localrepo "0.5.2"]])

我已经在 Maven 的存储库中添加了一个本地 jar,但是当我运行时

lein deps

这是我得到的错误

C:\Users\pvmd\git\mashup-dsl\mashup-dsl>lein deps
Could not transfer artifact camelclojure:camelclojure:pom:0.0.1-SNAPSHOT from/to
local (C:/Users/pvmd/.m2/repository): No connector available to access reposito
ry local (C:/Users/pvmd/.m2/repository) of type default using the available factories      FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

我没有使用代理,所以它肯定是一个依赖问题,我只是找不到原因......

【问题讨论】:

    标签: clojure leiningen


    【解决方案1】:

    您从哪里获得 camelclojure?我没有在 MVNRepositories 中找到它,也没有在 Clojars 中找到它。也许该项目已重命名为其他名称?

    无论如何,您也应该包含 groupId

    [info.kovanovic/camelclojure "0.0.1-SNAPSHOT"]
    

    但是,我仍然建议检查项目的当前状态。在我看来它已重命名。

    【讨论】:

    • camelclojure 是来自我的同事创建的项目的本地 jar
    • 它现在可以工作了,谢谢,但现在我似乎无法从中加载命名空间:user=> (require 'info.kovanovic.camelclojure.dsl) FileNotFoundException 找不到 info/kovanovic /camelclojure/dsl__init.class 或 info/kovanovic/camelclojure/dsl.clj 在类路径上:clojure.lang.RT.load (RT.java:443)
    • 也许你的同事将 dsl.clj 重命名/移动到了别的东西。
    • 不,不是这样,jar 是本地的,我已经使用 mvn install 命令安装了它,它在我的本地存储库中......这可能是名称的问题......我'会尝试别的东西
    猜你喜欢
    • 1970-01-01
    • 2012-01-14
    • 2012-07-07
    • 1970-01-01
    • 2021-02-20
    • 2011-01-25
    • 2013-07-08
    • 2012-02-03
    • 1970-01-01
    相关资源
    最近更新 更多