Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-506

Javadoc plugin broken on Java 8 when module-info.java present

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.2
    • Component/s: javadoc
    • Labels:
      None

      Description

      The fix to MJAVADOC-498 causes the command line flag `--class-path` to be used on Java 8, a flag that is not recognised. This happens when the project contains `module-info.java`, but the module-info file is excluded by the configuration of the plugin.

      The problem is here:
      http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java?r1=1802722&r2=1813672&pathrev=1813672
      where the code checks whether `src/main/java/module-info.java` exists without considering whether the file has been excluded by configuration. (I am simply trying to setup a build that uses Java 9 tooling on Java 9 and Java 8 tooling when running on Java 8)

      There is no workaround to this in v3.0.0 that I can see, so I have to rollback to v3.0.0-M1. The solution is to check the includes/excludes when trying to obtain the module-info file. Or to check what version of the Javadoc tool is being used (as per MJAVADOC-499).

        Attachments

          Activity

            People

            • Assignee:
              rfscholte Robert Scholte
              Reporter:
              scolebourne@joda.org Stephen Colebourne
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: