hadoop 2.2.0 编译报错: [ERROR] class file for org.mortbay.component.AbstractLifeCycle not found

[ERROR]  class file for org.mortbay.component.AbstractLifeCycle not found

错误堆栈如下:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/hduser/code/hadoop-2.2.-src/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[,] error: cannot access AbstractLifeCycle
[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found
/home/hduser/code/hadoop-2.2.-src/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[,] error: cannot access LifeCycle
[ERROR] class file for org.mortbay.component.LifeCycle not found

编辑hadoop-common-project/hadoop-auth/pom.xml文件,添加依赖:

    <dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>

再次编译,这个错误解决了。

上一篇:Java中的自定义数组队列


下一篇:POJ1185 炮兵阵地 —— 状压DP