Maven can't find target/class directory using code from Hadoop: the definitive guide 4th edition

By | October 3, 2018
Questions:

Recently I am learning Hadoop: the definitive guide 4th edition and trying to run the code (available on https://github.com/tomwhite/hadoop-book). But after installing hadoop, maven, and type the
% mvn package -DskipTests
I encounter the following problem:

[INFO] Hadoop: The Definitive Guide, Project .............. SUCCESS [  1.336 s]
[INFO] Common Code ........................................ FAILURE [  3.347 s]
[INFO] Chapter 2: MapReduce ............................... SKIPPED
[INFO] Chapter 3: The Hadoop Distributed Filesystem ....... SKIPPED
[INFO] Chapter 5: Hadoop I/O .............................. SKIPPED
[INFO] Chapter 6: Developing a MapReduce Application ...... SKIPPED
[INFO] Chapter 8: MapReduce Types and Formats ............. SKIPPED
[INFO] Chapter 9: MapReduce Features ...................... SKIPPED
[INFO] Chapter 12: Avro ................................... SKIPPED
[INFO] Chapter 13: Parquet ................................ SKIPPED
[INFO] Chapter 15: Sqoop .................................. SKIPPED
[INFO] Chapter 16: Pig .................................... SKIPPED
[INFO] Chapter 17: Hive ................................... SKIPPED
[INFO] Chapter 18: Crunch ................................. SKIPPED
[INFO] Chapter 19: Spark .................................. SKIPPED
[INFO] Chapter 20: HBase .................................. SKIPPED
[INFO] Chapter 21: ZooKeeper .............................. SKIPPED
[INFO] Chapter 22: Case Studies ........................... SKIPPED
[INFO] Hadoop Examples JAR ................................ SKIPPED
[INFO] Snippet testing .................................... SKIPPED
[INFO] Hadoop: The Definitive Guide, Example Code ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.287 s
[INFO] Finished at: 2018-07-26T08:07:26+00:00
[INFO] Final Memory: 19M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project common: Fatal error compiling: directory not found: /home/lizunks/practise/hadoop-book-master/common/target/classes -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :common

How can I solve it? My environment is on the ubuntu 16.04 subsystem on Windows. Jdk 1.7, hadoop 2.6.5 and Maven 3.3.9

Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *