Generating javadocs

We often need to generate API documentation of our code base. Having an API documentation increases collaboration, understanding, migration, and the transfer of knowledge becomes handy. To generate javadocs, add the following dependency in the reporting element as follows:

<reporting>
    <plugins>
  …...
  <!-- For Javadoc generation-->
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
       </plugin> 
  </plugins>
</reporting>

After making the preceding changes to the pom file, run the site phase from the previous section. The APIs will be generated in the apidocs and testapidocs folders under target/site. This can be navigated in the index.html file, under the Project Reports head with JavaDocs and the Test JavaDocs label, along with Surefire-Reports as shown in the following screenshot:

Generating javadocs
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.105.159