Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify Javadoc HTML version with Maven?

Tags:

maven

javadoc

When setting up Maven to generate Javadoc, I got this warning:

javadoc: warning - You have not specified the version of HTML to use. The default is currently HTML 4.01, but this will change to HTML5 in a future release. To suppress this warning, please specify the version of HTML used in your documentation comments and to be generated by this doclet, using the -html4 or -html5 options.

How do I do this?

like image 239
Matthew Cline Avatar asked Feb 03 '23 22:02

Matthew Cline


1 Answers

I did this by adding additionalOptions to the configuration section of the Javadoc plugin:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.1</version>
            <configuration>
                <additionalOptions>-html5</additionalOptions>
            </configuration>
        </plugin>
    </plugins>
</build>
like image 188
Matthew Cline Avatar answered Feb 27 '23 11:02

Matthew Cline