提问人:piokuc 提问时间:8/19/2017 更新时间:8/19/2017 访问量:467
Leiningen:使用本地 git 存储库
Leiningen: working with local git repo
问:
我想在 incanter 中更改一些东西,所以我在 github 上创建了一个分支,并在我的笔记本电脑上克隆了它。现在,当我尝试运行测试时,我收到以下错误:lein test
/Users/me/work/incanter$ lein test
Could not find artifact incanter:incanter-core:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-io:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-charts:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-mongodb:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-pdf:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-svg:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-latex:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-excel:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-sql:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact incanter:incanter-zoo:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
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.
/Users/me/work/incanter$
我还没有改变任何东西,这里是:project.clj
(defproject incanter "1.5.8-SNAPSHOT"
:description "Incanter is a Clojure-based, R-like statistical programming and data visualization environment."
:url "http://incanter.org/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm {:name "git" :url "https://github.com/incanter/incanter"}
:min-lein-version "2.0.0"
:dependencies [[incanter/incanter-core "1.5.8-SNAPSHOT"]
[incanter/incanter-io "1.5.8-SNAPSHOT"]
[incanter/incanter-charts "1.5.8-SNAPSHOT"]
[incanter/incanter-mongodb "1.5.8-SNAPSHOT"]
[incanter/incanter-pdf "1.5.8-SNAPSHOT"]
[incanter/incanter-svg "1.5.8-SNAPSHOT"]
[incanter/incanter-latex "1.5.8-SNAPSHOT"]
[incanter/incanter-excel "1.5.8-SNAPSHOT"]
[incanter/incanter-sql "1.5.8-SNAPSHOT"]
[incanter/incanter-zoo "1.5.8-SNAPSHOT"]
[org.clojure/clojure "1.5.1"]
]
:profiles {:dev {:resource-paths ["data"]}
:debug {:debug true}
:uberjar {:aot :all
:main incanter.main
:dependencies [[reply "0.3.0" :exclusions [org.clojure/clojure]]
[swingrepl "1.3.0"
:exclusions [org.clojure/clojure org.clojure/clojure-contrib]]
]
}
}
:repl-options {:init-ns incanter.irepl
:resource-paths ["data"]
:init (do
(set! *print-length* 500)
(use 'clojure.repl))
}
:jvm-opts ["-Xmx1g" "-Djsse.enableSNIExtension=false"
~(str "-Dincanter.home=" (System/getProperty "user.dir"))]
)
任何帮助将不胜感激。
答:
1赞
Ertuğrul Çetin
8/19/2017
#1
您可以使用此方法:
创建这些项目的 jar(lein uberjar
)
然后对每个 jar 使用命令:
mvn install:install-file \
-Dfile=maven_repository/my-project.jar \ ;;path to your jar(this is example)
-DgroupId= incanter \
-DartifactId= incanter \
-Dversion=0.1.0 \
-Dpackaging=jar \
-DgeneratePom=true
然后将 deps 添加到您的并刷新 leiningen:project.clj
[incanter/incanter "0.1.0"]
[groupId/artifactId "your-version"]
...
评论
0赞
piokuc
8/19/2017
非常感谢。不幸的是,当我运行时,我收到错误,最终它说:lein uberjar
Could not find artifact incanter:incanter-core:jar:1.5.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Uberjar aborting because jar failed: Could not resolve dependencies
0赞
piokuc
8/19/2017
请注意,依赖项是 incanter 的子模块。
0赞
Ertuğrul Çetin
8/19/2017
您可以转到 clojars.org/incanter/incanter-core 并搜索每个模块的最新版本并据此进行更新,然后尝试再次运行lein test?让我知道它是怎么回事
0赞
Ertuğrul Çetin
8/19/2017
这些版本似乎不再存在
0赞
piokuc
8/19/2017
问题是,我想更改其中一个模块(也许更多),所以理想情况下,我希望 lein 从 incanter 存储库(我的本地克隆)中的源代码构建所有模块并使用它们,而不是来自 clojars 的任何其他版本。
3赞
Minh Tuan Nguyen
8/19/2017
#2
我看了一下这个项目。您必须在 /modules 下构建任何项目,以便 snapshot-version 1.5.8-SNAPSHOT 将构建在本地 .m2/ 上
cd modules
cd incanter-core
lein install
...
然后我认为它应该有效。或者,您可以将依赖项减少到 1.5.7。
上一个:垂直对齐多个时间序列图
下一个:Clojure 中的小数矩阵幂
评论
lein install
develop
sub
modules
lein sub test
test