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

javadoc fails to link to docs with non-matching modularity

XMLWordPrintable

        Note: this bug was originally filed for modular jars linking to non-modular documentation. It was updated to include the inverse case as well.

        The javadoc tool fails with "The code being documented uses modules but the packages defined in $URL are in the unnamed module." when it consumes Java modules which published their API documentation in a non-modular fashion.

        "javadoc ... -link https://ota4j-team.github.io/opentest4j/docs/1.2.0/api" fails
        due to:
        - Module "org.opentest4j" ships with a compiled module descriptor
        - Its API documentation is generated and published without modules

        Being in the transition phase from the non-modular to the modular world, this kind of work-around will show up more often. Library authors will inject "module-info.class" files into their library JAR files ... without producing modular API documentation at the same time, for a while.

        Perhaps, javadoc may try to fall-back to the non-modular API input format, if it cosumes a "-link"ed module that lacks modular API documentation files.

        Modular example project:
        https://github.com/sormuras/sandbox/tree/master/javadoc-link-non-modular

        Log with the error messages:
        https://github.com/sormuras/sandbox/runs/471844267#step:5:28

              hannesw Hannes Wallnoefer
              cstein Christian Stein
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: