需要帮助解决SBT中的依赖问题

时间:2015-11-14 05:03:59

标签: scala amazon-web-services sbt

我正在尝试使用java-aws-mturk(Mechanical Turk API)库并且在SBT中存在依赖性问题。

build.sbt

    resolvers ++= Seq(
        "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
        "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
        "Sonatype OSS Public" at "https://oss.sonatype.org/content/repositories/public",
        "Clojars" at "http://clojars.org/repo"
    )

    libraryDependencies += "log4j" % "log4j" % "1.2.17"

    libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.37"

    libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.0.1"

    libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.6.1"

    libraryDependencies += "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.1"

    libraryDependencies += "com.github.scopt" %% "scopt" % "3.3.0"

    libraryDependencies += "org.clojars.zaxtax" % "java-aws-mturk" % "1.6.2"

构建错误:

Error:Error while importing SBT project:
...
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] sbt.ResolveException: unresolved dependency: apache-xerces#xml-apis;2.9.1: not found
[error] unresolved dependency: apache-xerces#resolver;2.9.1: not found
[error] unresolved dependency: apache-xerces#xercesImpl;2.9.1: not found
[error] unresolved dependency: org.apache.commons#not-yet-commons-ssl;0.3.7: not found
[error] Use 'last' for the full log.

See complete log in /Users/marcin/Library/Logs/IdeaIC14/sbt.last.log

SBT日志:

[info] Resolving org.scala-lang#scala-library;2.11.7 ...
[info] Resolving log4j#log4j;1.2.17 ...
[info] Resolving mysql#mysql-connector-java;5.1.37 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.1 ...
[info] Resolving com.fasterxml.jackson.module#jackson-module-scala_2.11;2.6.1 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.7 ...
[info] Resolving com.fasterxml.jackson.core#jackson-core;2.6.1 ...
[info] Resolving com.fasterxml.jackson.core#jackson-annotations;2.6.1 ...
[info] Resolving com.fasterxml.jackson.core#jackson-databind;2.6.1 ...
[info] Resolving com.fasterxml.jackson.module#jackson-module-paranamer;2.6.1 ...
[info] Resolving com.thoughtworks.paranamer#paranamer;2.6 ...
[info] Resolving com.github.scopt#scopt_2.11;3.3.0 ...
[info] Resolving apache-xerces#xml-apis;2.9.1 ...
[info] Resolving apache-xerces#xml-apis;2.9.1 ...
[warn]  module not found: apache-xerces#xml-apis;2.9.1
[warn] ==== local: tried
[warn]   /Users/marcin/.ivy2/local/apache-xerces/xml-apis/2.9.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.pom
[warn] ==== Typesafe repository: tried

1 个答案:

答案 0 :(得分:1)

Google提供了这个元页面:https://www.versioneye.com/java/apache-xerces:xml-apis/2.9.1

在底部的存储库链接之后,我认为这两个会有工件:

http://repo.jfrog.org/artifactory/libs-releases/
http://repository.jboss.org/nexus/content/groups/public-jboss/

所以你可能只需要添加另一个带有这些URL的解析器。