Help Us Improve. Please let us know if you were asked any question in your interview.

More Questions

ERROR - Maven - JavaDoc Errors while using Java 8

Problem


JavaDoc Errors while using Java 8

Cause

Java 8 uses DocLint which is a new feature introduced to detect Javadoc comments errors.

Resolution

Either you can fix those errors or Ignore them. 

To ignore, add the following code to the Pom file within plugins tags -

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.9</version>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
            <configuration>
                <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
        </execution>
     </executions>

</plugin>

or add following within properties tags -

<additionalparam>-Xdoclint:none</additionalparam>


** This feature will give Warnings instead of errors with Java 9. Objective is to allow the build to complete successfully even if doclint hasn't been ignored within pom file. JEP - http://openjdk.java.net/jeps/212
Stay updated with Java posts in your email.

Enter your email address:


Delivered by FeedBurner
Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus




×

Would like to try our new Java Interview Questions Search Tool.

There are more than 1000 questions with practice tests. It's updated daily and It's Awesome.


×

Would like to try our new Java Practice Test tool.

There are more than 100 questions currently and expanding quickly. It's updated daily and It's Awesome.