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

javadoc fails with maven.compiler.release=8 and Automatic-Module-Name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.1
    • javadoc
    • None

    Description

      In a module, which defines an Automatic-Module-Name and (inherits) maven.compiler.release=8, but does not set source=8, javadoc generation fails with:

      16052 [ERROR] Exit code: 2 - error: option --module-path not allowed with target 8
      16052 [ERROR] error: option --add-modules not allowed with target 8
      16052 [ERROR] error: option --patch-module not allowed with target 8
      16053 [ERROR]
      16053 [ERROR] Command line was: /home/nite/jdk-12/bin/javadoc @options @packages
      
      

      This occurs with both  javadoc-11.0.2 and javadoc-12. Using either maven-javadoc-plugin-3.0.1, defining source=8 or removing Automatic-Module-Name works just fine.

      I think the problem is that maven.compiler.release is propagated to release property, but that is not taken into account when --add-modules is generated and propagated.

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              nite Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m