我正在用sbt 0.11.2
和sbt-idea创建Scala项目,我在gen-idea
任务中获得UNRESOLVED DEPENDENCIES
。什么是sbt 0.11的sbt-idea的正确设置?
我刚刚安装了sbt(根据wiki中的指示下载了jar并创建了脚本),然后执行sbt-idea setup here,为我的项目创建了一个空目录,然后运行sbt,然后运行gen-idea
任务。
它找不到依赖关系,因为它只使用内置回购。我如何告诉sbt检查另一个回购?
当我放置build.sbt
文件中的plugins
目录并运行SBT它开始解决的事情,其中之一就是Resolving com.github.mpeltonen#sbt-idea;0.11.0 ...
在后面的过程中它成功地下载它:
[info] downloading http://mpeltonen.github.com/maven/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.jar ...
[info] [SUCCESSFUL ] com.github.mpeltonen#sbt-idea;0.11.0!sbt-idea.jar (592ms)
当我运行gen-idea
任务时,首先看起来不错...
> gen-idea
[info] Trying to create an Idea module default-b91f2c
它继续创建.idea
目录等,这似乎创建得很好。然后,它开始再次解决的事情(Scala的工具,SBT,commens- *等)
最终尝试解析sbt-idea
:
[warn] module not found: com.github.mpeltonen#sbt-idea;0.11.0
[warn] ==== local: tried
[warn] /home/scaladev/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.9.1/sbt_0.11.2/0.11.0/ivys/ivy.xml
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.github.mpeltonen/sbt-idea/0.11.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.pom
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn] http://scala-tools.org/repo-releases/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.pom
[warn] ==== Scala-Tools Maven2 Snapshots Repository: tried
[warn] http://scala-tools.org/repo-snapshots/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.pom
[info] Resolving commons-io#commons-io;2.0.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.mpeltonen#sbt-idea;0.11.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.github.mpeltonen:sbt-idea:0.11.0 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn]
我的理解,它不会在这些地方找到它,但我不明白为什么它没有尝试github repo,就像配置插件时一样。我期待看到一行看起来像这样:
[warn] ==== sbt-idea-repo: tried
我试过使用sbt 0.11.1和sbt-idea 0.11.1-SNAPSHOT,我得到了相同的结果。错误与上述相同,只是当然版本号不同。当它解决sbt-idea它不检查github repo,它实际上居住的唯一的地方时,问题仍然看起来到最后。 – 2011-12-31 14:37:19
@JackDreep看起来很奇怪,因为它适合我。有时当我无法访问互联网时,我遇到了这种错误,但似乎并非如此。您可以添加使用sbt 0.11.1和sbt-idea 0.11.1-SNAPSHOT时获得的跟踪吗? – David 2011-12-31 14:50:21
我很乐意添加追踪,但我不确定你的意思。你只是指我对原始帖子所做的修改,还是更多? – 2012-01-01 21:55:19