在sbt项目中使用来自maven central的处理库时出现奇怪错误

时间:2015-08-28 10:11:34

标签: scala maven sbt processing

我正在尝试在sbt项目中使用processing java library,所以我在build.sbt中添加了一行:

name := "testJson"

version := "1.0"

scalaVersion := "2.11.7"

//libraryDependencies += "io.spray" %%  "spray-json" % "1.3.2"

libraryDependencies += "org.processing" % "processing-complete" % "3.0b5"

我收到了一个错误:

[warn] 
[FAILED ] org.processing#processing-complete;3.0b5!processing-complete.jar: (0ms) 
[warn] ==== local: tried 
[warn] /Users/kaiyin/.ivy2/local/org.processing/processing-complete/3.0b5/jars/processing-complete.jar 
[warn] ==== activator-launcher-local: tried 
[warn] /Users/kaiyin/.activator/repository/org.processing/processing-complete/3.0b5/jars/processing-complete.jar 
[warn] ==== activator-local: tried 
[warn] /Users/kaiyin/opt/activator-dist-1.3.5/repository/org.processing/processing-complete/3.0b5/jars/processing-complete.jar 
[warn] ==== public: tried 
[warn] https://repo1.maven.org/maven2/org/processing/processing-complete/3.0b5/processing-complete-3.0b5.jar 
[warn] ==== typesafe-releases: tried 
[warn] http://repo.typesafe.com/typesafe/releases/org/processing/processing-complete/3.0b5/processing-complete-3.0b5.jar 
[warn] ==== typesafe-ivy-releasez: tried 
[warn] http://repo.typesafe.com/typesafe/ivy-releases/org.processing/processing-complete/3.0b5/jars/processing-complete.jar 
[warn] 
[FAILED ] org.processing#processing-complete;3.0b5!processing-complete.jar(src): (0ms) 
[warn] ==== local: tried 
[warn] /Users/kaiyin/.ivy2/local/org.processing/processing-complete/3.0b5/srcs/processing-complete-sources.jar 
[warn] ==== activator-launcher-local: tried 
[warn] /Users/kaiyin/.activator/repository/org.processing/processing-complete/3.0b5/srcs/processing-complete-sources.jar 
[warn] ==== activator-local: tried 
[warn] /Users/kaiyin/opt/activator-dist-1.3.5/repository/org.processing/processing-complete/3.0b5/srcs/processing-complete-sources.jar 
[warn] ==== public: tried 
[warn] https://repo1.maven.org/maven2/org/processing/processing-complete/3.0b5/processing-complete-3.0b5-sources.jar 
[warn] ==== typesafe-releases: tried 
[warn] http://repo.typesafe.com/typesafe/releases/org/processing/processing-complete/3.0b5/processing-complete-3.0b5-sources.jar 
[warn] ==== typesafe-ivy-releasez: tried 
[warn] http://repo.typesafe.com/typesafe/ivy-releases/org.processing/processing-complete/3.0b5/srcs/processing-complete-sources.jar 
[warn] 
[FAILED ] org.processing#processing-complete;3.0b5!processing-complete.jar(doc): (0ms) 
[warn] ==== local: tried 
[warn] /Users/kaiyin/.ivy2/local/org.processing/processing-complete/3.0b5/docs/processing-complete-javadoc.jar 
[warn] ==== activator-launcher-local: tried 
[warn] /Users/kaiyin/.activator/repository/org.processing/processing-complete/3.0b5/docs/processing-complete-javadoc.jar 
[warn] ==== activator-local: tried 
[warn] /Users/kaiyin/opt/activator-dist-1.3.5/repository/org.processing/processing-complete/3.0b5/docs/processing-complete-javadoc.jar 
[warn] ==== public: tried 
[warn] https://repo1.maven.org/maven2/org/processing/processing-complete/3.0b5/processing-complete-3.0b5-javadoc.jar 
[warn] ==== typesafe-releases: tried 
[warn] http://repo.typesafe.com/typesafe/releases/org/processing/processing-complete/3.0b5/processing-complete-3.0b5-javadoc.jar 
[warn] ==== typesafe-ivy-releasez: tried 
[warn] http://repo.typesafe.com/typesafe/ivy-releases/org.processing/processing-complete/3.0b5/docs/processing-complete-javadoc.jar 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: FAILED DOWNLOADS :: 
[warn] :: ^ see resolution messages for details ^ :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: org.processing#processing-complete;3.0b5!processing-complete.jar 
[warn] :: org.processing#processing-complete;3.0b5!processing-complete.jar(src) 
[warn] :: 

它是什么意思,怎么解决?

3 个答案:

答案 0 :(得分:2)

你没有定义任何解析器。

您可能想尝试将此行添加到build.sbt

resolvers += Resolver.sonatypeRepo("releases")

或者查看此页面以更详细地解释解析器:http://www.scala-sbt.org/0.13/docs/Resolvers.html

答案 1 :(得分:2)

虽然pom在那里,但神器还没有。见http://search.maven.org/#search%7Cga%7C1%7Corg.processing。在这里,您可以看到哪些文物可用于哪些poms。我怀疑核心工件可能就是你想要的。

答案 2 :(得分:1)

The processing-complete module只是一个描述processing.org提供的模块的元文件。我原以为sbt / ivy能够解析 pom 文件中定义的模块。但是,如果没有(我没有下载除了 pom 之外的任何内容),我建议您单独添加实际模块:

libraryDependencies += "org.processing" % "core" % "3.0b5"

libraryDependencies += "org.processing" % "net" % "3.0b5"

libraryDependencies += "org.processing" % "video" % "3.0b5"

libraryDependencies += "org.processing" % "serial" % "3.0b5"

libraryDependencies += "org.processing" % "pde" % "3.0b5"

libraryDependencies += "org.processing" % "pdf" % "3.0b5"

对我来说很顺利。