我确信之前已经提出这个问题,但我似乎无法找到答案。所以,请原谅我是否重复。
我需要链接到http://oss.sonatype.org/content/repositories/snapshots上可用的依赖项"org.nd4j" % "nd4j-native-platform" % "0.8.1-SNAPSHOT"
为此,我已将以下内容添加到build.sbt文件中
resolvers ++= Seq(
"Sonatype Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
)
libraryDependencies += "org.nd4j" % "nd4j-native-platform" % "0.8.1-SNAPSHOT"
然而,在构建我的代码时,我收到错误
sbt.ResolveException: unresolved dependency: org.nd4j#nd4j-native-platform;0.8.1-SNAPSHOT: not found
并且sbt输出是
[warn] Executing in batch mode.
[warn] For better performance, hit [ENTER] to switch to interactive mode, or
[warn] consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading project definition from /home/p/projects/genia/sim/project
[info] Updating {file:/home/p/projects/genia/sim/project/}sim-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to sim (in build file:/home/p/projects/genia/sim/)
[info] Updating {file:/home/p/projects/genia/sim/}sim...
[info] Resolving org.nd4j#nd4j-native-platform;0.8.1-SNAPSHOT ...
[warn] module not found: org.nd4j#nd4j-native-platform;0.8.1-SNAPSHOT
[warn] ==== local: tried
[warn] /home/p/.ivy2/local/org.nd4j/nd4j-native-platform/0.8.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/nd4j/nd4j-native-platform/0.8.1-SNAPSHOT/nd4j-native-platform-0.8.1-SNAPSHOT.pom
[warn] ==== local-preloaded-ivy: tried
[warn] /home/p/.sbt/preloaded/org.nd4j/nd4j-native-platform/0.8.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////home/p/.sbt/preloaded/org/nd4j/nd4j-native-platform/0.8.1-SNAPSHOT/nd4j-native-platform-0.8.1-SNAPSHOT.pom
[warn] ==== Sonatype Snapshots: tried
[warn] http://oss.sonatype.org/content/repositories/snapshots/org/nd4j/nd4j-native-platform/0.8.1-SNAPSHOT/nd4j-native-platform-0.8.1-SNAPSHOT.pom
[info] Resolving jline#jline;2.14.3 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.nd4j#nd4j-native-platform;0.8.1-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.nd4j:nd4j-native-platform:0.8.1-SNAPSHOT (/home/p/projects/genia/sim/build.sbt#L13-14)
[warn] +- default:sim_2.11:1.0
sbt.ResolveException: unresolved dependency: org.nd4j#nd4j-native-platform;0.8.1-SNAPSHOT: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
如果我将此依赖项添加到build.xml并使用maven,那么它的工作正常,但不是在sbt中。有什么我做错了吗? 我有什么事吗