0
votes

Trying to build oozie for hadoop 2 in linux.

[INFO] Apache Oozie Examples ............................. SUCCESS [3.476s]
[INFO] Apache Oozie Share Lib ............................ SUCCESS [7.252s]
[INFO] Apache Oozie Tools ................................ FAILURE [5.003s]
[INFO] Apache Oozie MiniOozie ............................ SKIPPED
[INFO] Apache Oozie Distro ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:55.250s
[INFO] Finished at: Tue Nov 18 14:44:00 IST 2014
[INFO] Final Memory: 342M/986M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project oozie-tools: Compilation failure: Compilation failure:
[ERROR] /home/hduser/oozie-4.0.1/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java:[52,25] error: package org.mockito does not exist
[ERROR] /home/hduser/oozie-4.0.1/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java:[109,27] error: cannot find symbol
[ERROR] class FakeConnection

Don't know why error occurs in oozie-tools. Build successful for hadoop 1.1.1 when trying to build for hadoop 2, the above error occurs.

1

1 Answers

1
votes

The oozie-tools POM is missing a dependency to Mockito (see this bug: https://issues.apache.org/jira/browse/OOZIE-1631).

Simply add the following dependency to the oozie-tools pom and it should then build successfully:

<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-all</artifactId>
    <scope>test</scope>
</dependency>