scala (sbt도) 및 hadoop을 설치해야하는 (활성) git 프로젝트를 다운로드했습니다. 내가 sbt (sbt 어셈블리)를 통해 빌드하려고 시도하면 에 대한 경고 톤이 생성됩니다.. 프로젝트 공급 업체와 연락을 시도했지만 적절한 응답을 제공하지 않았습니다. 그냥 자신의 컴퓨터에서 작동하고 있다고 나에게 말하면됩니다.sbt 어셈블리와의 자동 종속성
[info] Resolving jline#jline;2.12 ...
[info] Done updating.
[warn] Found intransitive dependency (org.apache.hadoop:hadoop-common:2.6.0) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects.
[warn]
[warn] Found intransitive dependency (org.apache.hadoop:hadoop-mapreduce-client-core:2.6.0) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects.
[warn]
[warn] Found intransitive dependency (org.apache.hadoop:hadoop-mapreduce-client-common:2.6.0) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects.
[warn]
[warn] Found intransitive dependency (org.apache.hadoop:hadoop-annotations:2.6.0) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects.
[warn]
[warn] Found intransitive dependency (org.apache.hadoop:hadoop-auth:2.6.0) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects.
[warn]
[warn] Found intransitive dependency (org.apache.hadoop:hadoop-yarn-common:2.6.0) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects.
[warn]
[warn] Found intransitive dependency (org.apache.hbase:hbase-server:0.96.2-hadoop2) while publishMavenStyle is true, but Maven repositories
[warn] do not support intransitive dependencies. Use exclusions instead so transitive dependencies
[warn] will be correctly excluded in dependent projects ...
을 그리고 필요 프로젝트의 모든 종속성이 포함 된 build.sbt 파일이 : 나는 "SBT 어셈블리를"때
내가 얻을 난에 무엇을해야
libraryDependencies ++= Seq(
"com.beust" % "jcommander" % "1.35",
"org.apache.hadoop" % "hadoop-common" % "2.6.0" intransitive(),
"org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.6.0" intransitive(),
"org.apache.hadoop" % "hadoop-mapreduce-client-common" % "2.6.0" intransitive(),
"org.apache.hadoop" % "hadoop-annotations" % "2.6.0" intransitive(),
"org.apache.hadoop" % "hadoop-auth" % "2.6.0" intransitive(),
"org.apache.hadoop" % "hadoop-yarn-common" % "2.6.0" intransitive(),
"org.apache.hadoop" % "hadoop-yarn-api" % "2.6.0",
"org.apache.hbase" % "hbase-server" % "0.96.2-hadoop2" intransitive(),
"org.apache.hbase" % "hbase-common" % "0.96.2-hadoop2" intransitive(),
"org.apache.hbase" % "hbase-client" % "0.96.2-hadoop2" intransitive(),
"org.apache.hbase" % "hbase-protocol" % "0.96.2-hadoop2",
"org.cloudera.htrace" % "htrace-core" % "2.04" intransitive(),
"commons-configuration" % "commons-configuration" % "1.6" exclude("commons-beanutils", "commons-beanutils-core"),
"commons-httpclient" % "commons-httpclient" % "3.1",
"commons-io" % "commons-io" % "2.4",
"com.google.guava" % "guava" % "11.0.2",
"log4j" % "log4j" % "1.2.16",
"org.slf4j" % "slf4j-log4j12" % "1.7.5",
"org.codehaus.jackson" % "jackson-jaxrs" % "1.9.13",
"org.apache.avro" % "avro" % "1.7.4",
"junit" % "junit" % "4.11" % "it,test",
"com.novocode" % "junit-interface" % "0.10" % "it,test",
"com.jsuereth" % "scala-arm_2.11" % "1.4" % "it,test",
"org.scalatest" % "scalatest_2.11" % "2.2.1" % "it,test"
)
assemblyMergeStrategy in assembly := {
case PathList("org", "apache", "hadoop", "yarn", xs @ _*) => MergeStrategy.first
case x => val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp filter {_.data.getName == "commons-beanutils-1.7.0.jar"}
}
scalaVersion := "2.11.4"
// output jar is here: target/ruleXtract.jar
assemblyOutputPath in assembly := file("target/ruleXtract.jar")
// we want a jar without a main class so we can run it as "hadoop jar class args"
mainClass in (Compile, packageBin) := None
은 작동하게하려면? 나는 "sbt assembly"없이이 프로젝트를 어떻게 구축 할 수 있을지 전혀 모른다. 내가 sbt에 대한 자습서를 확인하고 build.sbt 괜찮아 보이지만 - 정말 모르겠지만. 문제가 무엇입니까? 그것을 해결할 제안이 있습니까?
B.R.
왜 SBT 어셈블리를? sbt 패키지를 사용해 보셨습니까? – LynxZh
튜토리얼의 지침에서 'sbt assembly'로 작성 되었기 때문입니다. 그건 그렇고 아직도 나에게 같은 오류 목록을 제공합니다. –