Search code examples
javamaven-3hadoop2

Maven exception in compiling Hadoop for 64bits


I'm compilling hadoop 2.4.0 on Ubunto 64bit using Maven here is the information about versions of Maven and JDK

$ mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T19:49:05Z)
Maven home: /opt/apache-maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-29-generic", arch: "amd64", family: "unix"

I followed the tutorial bellow in github: Hadoop tuto

However, this command failed:

mvn package -Pdist,native -DskipTests -Dtar

The error is:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (module-javadocs) on project hadoop-annotations: MavenReportException: Error while creating archive: [ERROR] Exit code: 1 - /home/ihocine/protobuf-2.5.0/hadoop-common/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceStability.java:27: error: unexpected end tag: </ul> 
[ERROR]  * </ul> 
[ERROR]    ^ 
[ERROR] 
[ERROR] Command line was: /usr/lib/jvm/java-8-oracle/jre/../bin/javadoc @options @packages 
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/ihocine/protobuf-2.5.0/hadoop-common/hadoop-common-project/hadoop-annotations/target' dir. 
[ERROR]
[ERROR] -> [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 :hadoop-annotations

Solution

  • The problem is in creating the javadoc, So the solution is just to specify to the command mvn in order to skip the javadoc generation using an additional parameter Dmaven.javadoc.skip=true as below:

    mvn clean package -Pdist,native-win -DskipTests -Dtar -Dmaven.javadoc.skip=true
    

    Credits here