Show TOC

Generating Javadoc for Large Software UnitsLocate this document in the navigation structure

Use

The JDAR archive format allows you to compose Javadoc for arbitrary sets of public parts, for example for a selected set of public parts of a software component that together form the public API of the software component. Links between symbols from different JDAR archives are resolved and global indexes and overview are generated for the whole set of symbols.

Procedure

Using the Build Plug-in Extension tc/bi/jdoctech

This build plug-in extension can be attached to a DC of type Java Library . It collects JDAR archives from all referenced compilation public parts and generates HTML documentation.

Steps to include Javadoc in a Web Module

  1. Create a DC of type J2EE Web Module , or select an already existing DC as the container for the Javadoc results.

  2. Create a build-time dependency to tc/bi/jdoctech , the public part def (part of SAP_BUILDT)

  3. Create build-time dependencies to all public parts for which Javadoc is to be generated. Note that if the target DC is a member of a different SC, it might be necessary to introduce an additional SC dependency in the track definition.

  4. ( Optional ) Create a build.properties file in the cfg folder.

    Define a path prefix for the generated Javadoc content using the build option com.sap.javadoc.resourcepath=<URL path prefix> . The default value is javadoc .

    Define more Javadoc options in the build.properties file, if needed.

    For more information about the supported Doclet options, see Configuring Javadoc Generation .

  5. ( Optional ) Add other content to the Web module, such as servlets or JSP pages.

  6. Sync all used DCs in the Component Browser to ensure that all JDAR archives are available locally.

  7. Build the DC.

    If the build is successful, the resulting WAR archive contains Javadoc as static HTML content. If the Web module is deployed as part of a J2EE Enterprise Application, the Javadoc start page can be accessed by the URL:

    http://<host>:<port>/javadoc/index.html or by http://<host>:<port>/<resource path>/index.html , if the build option com.sap.javadoc.resourcepath has been defined.

For more information about managing the build options, see Managing Build Options .

Steps to create a standalone javadoc.zip archive

  1. Create a DC of type Java Library , or select an already existing DC as a container for the Javadoc results.

  2. Create a build-time dependency to tc/bi/jdoctech , the public part def (part of SAP_BUILDT)

  3. Create build-time dependencies to all public parts for which Javadoc is to be generated. Note that if the target DC is a member of a different SC, it might be necessary to introduce an additional SC dependency in the track definition.

  4. Create a build.properties file in the cfg folder and define the build option com.sap.javadoc.standalone=true .

    Define more Javadoc options in the build.properties file, if needed.

  5. Define an assembly public part with the name javadoc (recommended). You may use a different name by setting the build option com.sap.javadoc.javadocPP=<public-part-name> .

    For more information about the supported Doclet options, see Configuring Javadoc Generation .

  6. Sync all used DCs in the Component Browser to ensure that all JDAR archives are available locally.

  7. Build the DC.

    If the build was successful, the results can be found in the gen/default/<public part name>/doc/java folder.

    If the DC is built with CBS, the result is included in the Public Part Archive (*.ppa file), which can be downloaded either using the CBS Web UI or using the CBS command line tool (command downloaddcarc) .

    For more information, see Starting the CBS Web UI and CBS Command Line Tool .

Using the Javadoc Command Line Tool

For information about generating Javadoc using the command line tool, see Javadoc Generation Command Line Tool .