加载类文件

时间:2016-07-30 03:03:31

标签: compiler-errors sbt classpath

我有一个多模块SBT项目,其模块名为commons,teradata,mysql,postgres等。 正如预期的那样,公共模块是每个其他模块所依赖的通用模块。 我在编译时只为模块teradata得到以下错误。 公共和其余模块编译正常,没有任何错误。

[error] missing or invalid dependency detected while loading class file 'HDFSUtil.class'.
[error] Could not access term hadoop in package org.apache,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'HDFSUtil.class' was compiled against an incompatible version of org.apache.
[error] missing or invalid dependency detected while loading class file 'HDFSUtil.class'.
[error] Could not access term io in value org.apache.hadoop,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'HDFSUtil.class' was compiled against an incompatible version of org.apache.hadoop.
[error] two errors found
[error] (teradata/compile:compileIncremental) Compilation failed
[error] Total time: 5 s, completed Jul 29, 2016 7:48:50 PM

commons模块依赖于HDFS库,其库依赖范围设置如下所示。

"org.apache.hadoop" % "hadoop-client" % "2.7.1" % "provided",

如果删除提供的范围,则上述编译时错误消失。

除了对teradata jdbc和commons模块的非托管依赖之外,teradata模块本身并没有任何依赖性。 我已经尝试删除我的.sbt和.iv2文件并再次进行干净的构建,但错误不会消失。 这可能有什么不妥?

0 个答案:

没有答案
相关问题