O'Reilly logo

Maven for Eclipse by Sanjay Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required