我差不多空SBT project here只有一个依赖:
"org.apache.hadoop" % "hadoop-yarn-server-nodemanager" % "2.2.0"
检查此类工件的the pom,似乎它不依赖于任何guice-servlet
工件。
然而,当我运行sbt dependency-tree
时,我看到了不同的东西,它确实取决于guice-servlet
神器:
user@laptop:~/workspace/pack$ sbt dependency-tree
[info] Loading project definition from /home/user/workspace/pack/project
[info] Set current project to pack (in build file:/home/user/workspace/pack/)
[info] eu.pepot.eu:pack_2.10:0.1 [S]
[info] +-org.apache.hadoop:hadoop-yarn-server-nodemanager:2.2.0
[info] +-com.google.inject.extensions:guice-servlet:3.0
[info] | +-com.google.inject:guice:3.0
[info] | +-aopalliance:aopalliance:1.0
[info] | +-javax.inject:javax.inject:1
...
我错过了什么?
答案 0 :(得分:1)
此依赖关系来自父pom,hadoop-yarn。
hadoop-yarn-server-nodemanager
使用使用hadoop-yarn-server
的{{1}}。这个pom有很多依赖,包括Guice。