Can't build Hadoop 2.4.1 with Java8 Can't build Hadoop 2.4.1 with Java8 hadoop hadoop

Can't build Hadoop 2.4.1 with Java8


Alternatively to Stuarts suggestion (I had a difficult time finding out where to put the additionalparam): In order to skip javadoc generation altogether, just run

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


This is an error reported by javadoc. The javadoc version in Java 8 is considerably more strict than the one in earlier version. It now signals an error if it detects what it considers to be invalid markup, including the presence of an end tag where one isn't expected.

To turn off this checking in javadoc, add the -Xdoclint:none flag to the javadoc command line. For information about how to do this in a maven environment, see Stephen Colebourne's blog entry on this topic. Specifically, add

<additionalparam>-Xdoclint:none</additionalparam>

to an appropriate properties or configuration file.

There are a couple weird things going on, though. The current (trunk) version of this file seems to have the </ul> end tag in the right place. The history of this file indicates that the previously-missing end tag was added fairly recently, but it does appear to be in Hadoop 2.4. And this file by itself is processed successfully by JDK 8u5 javadoc, without having to suppress any errors.

Has a patch been applied somewhere that added the formerly-missing </ul> end tag, which is now redundant since the end tag has been added to the original source? An extra end tag will cause javadoc to fail with this error.

UPDATE

I had been looking at the wrong branch. The 2.4.1 version of this file clearly has an extra </ul> end tag. My conjecture about an errant patch was sort-of right. The history of the file on the trunk shows that a bunch of javadoc comments were added back in June 2012 by HADOOP-8059. These new additions were missing the </ul> end tag. In January 2014, HADOOP-10320 added the missing end tag. The patch for HADOOP-10320 was transplanted to the 2.4.1 branch, but the new javadocs from HADOOP-8059 were not transplanted, resulting in malformed markup.