1

我正在尝试在 Eclipse 中创建一个新的 Akka 项目。我按照这里的步骤

但我收到有关未找到 Akka 依赖项的错误消息。

感谢您的帮助。这是输出。

C:\Users\*\workspace\akka-project-in-scala>sbt
[info] Loading global plugins from C:\Users\*\.sbt\plugins
[info] Loading project definition from C:\Users\*\workspace\akka-project-in-scala\project
[info] Set current project to Akka Project In Scala (in build file:/C:/Users/*/workspace/akka-project-in-scala/)
> scala-version
[info] 2.10.1
> eclipse
[info] About to create Eclipse project files for your project(s).
Getting Scala 2.10.1 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.1/scala-compiler-2.10.1.jar ...
        [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.1!scala-compiler.jar (45634ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.1/scala-library-2.10.1.jar ...
        [SUCCESSFUL ] org.scala-lang#scala-library;2.10.1!scala-library.jar (21811ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.1/scala-reflect-2.10.1.jar ...
        [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.1!scala-reflect.jar (10590ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/jline/2.10.1/jline-2.10.1.jar ...
        [SUCCESSFUL ] org.scala-lang#jline;2.10.1!jline.jar (1691ms)
:: retrieving :: org.scala-sbt#boot-scala
        confs: [default]
        5 artifacts copied, 0 already retrieved (24386kB/71ms)
[info] Updating {file:/C:/Users/*/workspace/akka-project-in-scala/}akka-project-in-scala...
[info] Resolving org.scala-lang#scala-library;2.10.1 ...
  [info] Resolving com.typesafe.akka#akka-actor;2.1.2 ...
[warn]  module not found: com.typesafe.akka#akka-actor;2.1.2
[warn] ==== local: tried
[warn]   C:\Users\*\.ivy2\local\com.typesafe.akka\akka-actor\2.1.2\ivys\ivy.xml
[warn] ==== Typesafe Releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.akka#akka-actor;2.1.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor;2.1.2: not found
[info] Updating {file:/C:/Users/*/workspace/akka-project-in-scala/}akka-project-in-scala...
[info] Resolving org.scala-lang#scala-library;2.10.1 ...
  [info] Resolving com.typesafe.akka#akka-actor;2.1.2 ...
[warn]  module not found: com.typesafe.akka#akka-actor;2.1.2
[warn] ==== local: tried
[warn]   C:\Users\*\.ivy2\local\com.typesafe.akka\akka-actor\2.1.2\ivys\ivy.xml
[warn] ==== Typesafe Releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.akka#akka-actor;2.1.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor;2.1.2: not found
[info] Updating {file:/C:/Users/*/workspace/akka-project-in-scala/}akka-project-in-scala...
[info] Resolving org.scala-lang#scala-library;2.10.1 ...
  [info] Resolving com.typesafe.akka#akka-actor;2.1.2 ...
[warn]  module not found: com.typesafe.akka#akka-actor;2.1.2
[warn] ==== local: tried
[warn]   C:\Users\*\.ivy2\local\com.typesafe.akka\akka-actor\2.1.2\ivys\ivy.xml
[warn] ==== Typesafe Releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.akka#akka-actor;2.1.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor;2.1.2: not found
[info] Updating {file:/C:/Users/*/workspace/akka-project-in-scala/}akka-project-in-scala...
[info] Resolving org.scala-lang#scala-library;2.10.1 ...
  [info] Resolving com.typesafe.akka#akka-actor;2.1.2 ...
[warn]  module not found: com.typesafe.akka#akka-actor;2.1.2
[warn] ==== local: tried
[warn]   C:\Users\*\.ivy2\local\com.typesafe.akka\akka-actor\2.1.2\ivys\ivy.xml
[warn] ==== Typesafe Releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.akka#akka-actor;2.1.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor;2.1.2: not found
[error] Could not create Eclipse project files:
[error] Error evaluating task 'external-dependency-classpath': error
[error] Error evaluating task 'update': error
[error] Error evaluating task 'external-dependency-classpath': error
[error] Error evaluating task 'update': error
>
4

1 回答 1

1

所以这不起作用(404):http ://repo1.maven.org/maven2/com/typesafe/akka/akka-actor/2.1.2/akka-actor-2.1.2.pom

但这确实有效:http ://repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.10/2.1.2/akka-actor_2.10-2.1.2.pom

查看 g8 模板(第 16 行):

"com.typesafe.akka" % "akka-actor"      % "$akka_version$",

我猜你需要编辑你的project/Build.scala,所以它说:

"com.typesafe.akka" % "akka-actor_2.10"      % "2.1.2",

让我知道这是否有效。

于 2013-04-21T16:19:30.863 回答