[ https://issues.apache.org/jira/browse/MJAVADOC-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17958078#comment-17958078 ]
Olivier Lamy commented on MJAVADOC-698: --------------------------------------- This project has moved from Jira to GitHub Issues. This issue was migrated to [apache/maven-javadoc-plugin#1077|https://github.com/apache/maven-javadoc-plugin/issues/1077]. Please visit the GitHub issue to view further activity, add comments, or subscribe to receive notifications. > javadoc:javadoc fails for non-JPMS mojo > --------------------------------------- > > Key: MJAVADOC-698 > URL: https://issues.apache.org/jira/browse/MJAVADOC-698 > Project: Maven Javadoc Plugin (Moved to GitHub Issues) > Issue Type: Bug > Components: javadoc > Affects Versions: 3.3.1 > Reporter: Gili > Priority: Major > Labels: jpms > > I upgraded maven-javadoc-plugin from version 3.2.0 to 3.3.1. At the same > time, I upgraded from JDK 11 to 17. All of a sudden I am getting the > following build failure I was not getting before: > {code:java} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-javadoc-plugin:3.3.1:jar (attach-javadocs) on > project maven_plugin: MavenReportException: Error while generating Javadoc: > [ERROR] Exit code: 1 - Loading source file > C:\Users\Gili\Documents\requirements.java\maven_plugin\src\main\java\com\github\cowwoc\requirements\maven\AbstractGeneratorMojo.java... > [ERROR] Loading source file > C:\Users\Gili\Documents\requirements.java\maven_plugin\src\main\java\com\github\cowwoc\requirements\maven\GenerateApiMojo.java... > [ERROR] Loading source file > C:\Users\Gili\Documents\requirements.java\maven_plugin\src\main\java\com\github\cowwoc\requirements\maven\OptimizeExceptionsMojo.java... > [ERROR] Loading source file > C:\Users\Gili\Documents\requirements.java\maven_plugin\src\main\java\com\github\cowwoc\requirements\maven\package-info.java... > [ERROR] Loading source file > C:\Users\Gili\Documents\requirements.java\maven_plugin\src\main\java\com\github\cowwoc\requirements\maven\UnpackMojo.java... > [ERROR] Loading source file > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java... > [ERROR] Loading source files for package > com.github.cowwoc.requirements.maven... > [ERROR] Constructing Javadoc information... > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:8: > error: package org.w3c.dom is not visible > [ERROR] import org.w3c.dom.Document; > [ERROR] ^ > [ERROR] (package org.w3c.dom is declared in module java.xml, but module > com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:9: > error: package org.w3c.dom is not visible > [ERROR] import org.w3c.dom.Element; > [ERROR] ^ > [ERROR] (package org.w3c.dom is declared in module java.xml, but module > com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:10: > error: package org.w3c.dom is not visible > [ERROR] import org.w3c.dom.Node; > [ERROR] ^ > [ERROR] (package org.w3c.dom is declared in module java.xml, but module > com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:11: > error: package org.w3c.dom is not visible > [ERROR] import org.w3c.dom.NodeList; > [ERROR] ^ > [ERROR] (package org.w3c.dom is declared in module java.xml, but module > com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:12: > error: package org.xml.sax is not visible > [ERROR] import org.xml.sax.SAXException; > [ERROR] ^ > [ERROR] (package org.xml.sax is declared in module java.xml, but module > com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:14: > error: package javax.xml.parsers is not visible > [ERROR] import javax.xml.parsers.DocumentBuilder; > [ERROR] ^ > [ERROR] (package javax.xml.parsers is declared in module java.xml, but > module com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:15: > error: package javax.xml.parsers is not visible > [ERROR] import javax.xml.parsers.DocumentBuilderFactory; > [ERROR] ^ > [ERROR] (package javax.xml.parsers is declared in module java.xml, but > module com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] > C:\Users\Gili\Documents\requirements.java\maven_plugin\target\generated-sources\plugin\com\github\cowwoc\requirements\maven\HelpMojo.java:16: > error: package javax.xml.parsers is not visible > [ERROR] import javax.xml.parsers.ParserConfigurationException; > [ERROR] ^ > [ERROR] (package javax.xml.parsers is declared in module java.xml, but > module com.github.cowwoc.requirements.maven_plugin does not read it) > [ERROR] 8 errors > [ERROR] > [ERROR] Command line was: cmd.exe /X /C > "C:\Users\Gili\.jdks\openjdk-17.0.1\bin\javadoc.exe @options @packages > @argfile" > [ERROR] > [ERROR] Refer to the generated Javadoc files in > 'C:\Users\Gili\Documents\requirements.java\maven_plugin\target\apidocs' dir. > [ERROR] > [ERROR] -> [Help 1]{code} > The Mojo in question did not change at all. It is not a Java Module so I > don't understand why the Javadoc engine is treating it as such. I would be > more than happy to upgrade the Mojo to a Java Module but at last check this > isn't technically possible (I get {{Error: the unnamed module reads package > org.apache.maven.plugin from both maven.core and maven.plugin.api}}). > Any ideas? -- This message was sent by Atlassian Jira (v8.20.10#820010)