我试图将项目从leiningen部署到本地archiva实例。
我的project.clj设置正确(我认为)
:repositories ^:replace [["snapshots" {:url "http://localhost:8080/archiva/repository/snapshots"}]
["releases" {:url "http://localhost:8080/archiva/repository/internal"}]]
当我运行'lein deploy snapshots'时,我收到以下错误。没有开始尝试追踪代码,有没有人知道这里出了什么问题?
java.lang.UnsupportedOperationException: nth not supported on this type: Character
at clojure.lang.RT.nthFrom(RT.java:846)
at clojure.lang.RT.nth(RT.java:796)
at leiningen.core.user$resolve_credential.invoke(user.clj:67)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:603)
at clojure.core$partial$fn__4070.doInvoke(core.clj:2343)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.core.protocols$fn__5888.invoke(protocols.clj:105)
at clojure.core.protocols$fn__5854$G__5849__5863.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31)
at clojure.core.protocols$fn__5879.invoke(protocols.clj:42)
at clojure.core.protocols$fn__5828$G__5823__5841.invoke(protocols.clj:13)
at clojure.core$reduce.invoke(core.clj:6030)
at leiningen.core.user$resolve_credentials.invoke(user.clj:93)
at leiningen.core.classpath$add_repo_auth.invoke(classpath.clj:85)
at leiningen.deploy$repo_for.invoke(deploy.clj:40)
at leiningen.deploy$deploy.invoke(deploy.clj:84)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:603)
at leiningen.core.main$resolve_task$fn__1602.doInvoke(main.clj:132)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:603)
at leiningen.core.main$apply_task.invoke(main.clj:167)
at leiningen.core.main$_main$fn__1661.invoke(main.clj:236)
at leiningen.core.main$_main.doInvoke(main.clj:221)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:601)
at clojure.main$main_opt.invoke(main.clj:324)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:427)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
答案 0 :(得分:0)
当您尝试将lein2:repositoris格式与leiningen 1.x一起使用时,会发生此错误。可能还有其他原因。
对于lein2,格式为:
:repositories [["java.net" "http://download.java.net/maven/2"]
["sonatype" {:url "http://oss.sonatype.org/content/repositories/releases"]]
对于lein1,格式为:
:repositories {"java.net" "http://download.java.net/maven/2"
"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases"}}