You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Cody Littley (Jira)" <ji...@apache.org> on 2019/11/18 21:46:00 UTC
[jira] [Created] (MJAVADOC-629) mvn javadoc:javadoc fails when
module-info.java is present
Cody Littley created MJAVADOC-629:
-------------------------------------
Summary: mvn javadoc:javadoc fails when module-info.java is present
Key: MJAVADOC-629
URL: https://issues.apache.org/jira/browse/MJAVADOC-629
Project: Maven Javadoc Plugin
Issue Type: Bug
Components: javadoc
Affects Versions: 3.1.1
Reporter: Cody Littley
Attachments: dummy.tar
I have a simple project that exports a single module.
When I execute the command *mvn javadoc:javadoc* I get a "Exit code: 1 - error: module not found:" error for the module that is being exported.
If I remove the *module-info.java* file and run the command again then everything works as expected.
When the *mvn javadoc:javadoc* command fails it dumps configuration options into some text files in *target/site/apidocs*. If I delete the *--module-source-path* flag from the options file and re-run the command it works without problem.
----
Here is how to reproduce this problem. I've attached a tarball containing a simple project that invokes the error. [^dummy.tar]
I have a directory structure as described below, a simple hello-world that exports a single module.
{code:java}
dummy
| - pom.xml
| - src
| - main
| - java
| - module-info.java
| - dummy
| - foobar
| - HelloWorld.java
{code}
My module-info.java looks like this:
{code:java}
module dummy {
exports dummy.foobar;
}
{code}
My maven-javadoc-plugin configuration looks like this:
{code:java}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable
<show>public</show>
<windowtitle>This is a test</windowtitle>
<doctitle>Just testing here</doctitle>
</configuration>
</plugin>
{code}
In the root directory of the project, run *mvn javadoc:javadoc*. You should see an error that looks something like this:
{code:java}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.196 s
[INFO] Finished at: 2019-11-18T15:43:35-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:javadoc (default-cli) on project dummy: An error has occurred in Javadoc report generation:
[ERROR] Exit code: 1 - error: module not found: dummy
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/bin/javadoc @options @packages @argfile
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/Users/codylittley/ws/dummy/target/site/apidocs' dir.
{code}
If *src/main/java/module-info.java* is deleted then the docs are built as expected.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)