JDK-8220702 : compiling in the context of an automatic module disallows --add-modules ALL-MODULE-PATH
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 13
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2019-03-13
  • Updated: 2021-07-14
  • Resolved: 2019-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b23Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
JDK 13 build 11

A DESCRIPTION OF THE PROBLEM :
1. Extract testcase
2. Run "mvn clean install javadoc:jar" under JDK 13-ea+11
3. Build fails with: --add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module

REGRESSION : Last worked in version 12


FREQUENCY : always



Comments
I am a bit confused. The maven-javadoc-plugin has 3 integration-tests related to this issue. On Windows + Oracle OpenJDK 11.0.11 these fail, while on Linux + Oracle OpenJDK 11.0.11 these succeed. Can anyone explain this difference or should I provide more information?
14-07-2021

It looks like regression introduced by task JDK-8217868.
15-03-2019

This is a regression introduced in JDK 13+11. Windows 10, 64-bit ================= 12+27 : Pass 13+10 : Pass 13+11 : Fail <-- regression 13+12 : Fail Getting below error: ================ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:jar (default-cli) on project mojo: MavenReportException: Error while generating Javadoc: [ERROR] Exit code: 1 - error: --add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module [ERROR] [ERROR] Command line was: D:\JDK\13\13+12\jdk-13\bin\javadoc.exe -J-Dhttp.proxyHost=www-proxy.idc.oracle.com -J-Dhttp.proxyPort=80 -J-Dhttps.proxyHost=www-proxy.idc.oracle.com -J-Dhttps.proxyPort=80 @options @packages [ERROR] [ERROR] Refer to the generated Javadoc files in 'D:\TestCases\javadoc\javadoc-mojo-requires-module\mojo\target\apidocs' dir.
15-03-2019

More info from submitter: JDK 13 build 5 works fine so this is likely a regression.
14-03-2019