Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219959

Automatically load taglets from a jar file

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 13
    • tools
    • None
    • behavioral
    • low
    • This is a new feature being added; it is highly unlikely that there is any existing conflicting usage of such configuration files.
    • add/remove/modify command line option, File or wire format

      Summary

      Provide the ability to automatically load taglets from a jar file.

      Problem

      Users have asked to be able to put multiple taglets in a single jar file and to have the javadoc tool load them automatically, rather than having to call out each taglet separately using the -taglet command-line option.

      Solution

      Support the use of a standard service-provider configuration file in jar files found on the taglet path.

      Within the javadoc tool, the TagletManager class will use java.util.ServiceLoader class to automatically load all the taglet classes specified in the configuration file.

      Specification

      This behavior will be enabled when a jar file containing a suitable service-provider configuration file is found on the taglet path.

      • The file must be named jdk.javadoc.doclet.Taglet and placed in the META-INF/services directory in the jar file.

      • The file must contain the fully qualified name of each of the taglet implementation classes that are to be loaded automatically.

      The taglet manager will load all the taglets specified in the serice-provider configuration file. There is no need to used the -taglet option for individual taglets specified in that file.

            pmuthuswamy Priya Lakshmi Muthuswamy (Inactive)
            pmuthuswamy Priya Lakshmi Muthuswamy (Inactive)
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: