[
https://issues.apache.org/jira/browse/MJAVADOC-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16944341#comment-16944341
]
Hendrik Schreiber commented on MJAVADOC-620:
--------------------------------------------
The problem occurs when you introduce a dependency that has classes (perhaps
resources are enough, don't know) in the _default_ package.
I have attached two minimal projects to reproduce.
[^BuildMeFirst.zip] - this is a very simple project containing a class in a
package and a class in the default package.
[^ThenBuildThisSite.zip] - this is a multi-module project that has a dependency
to project 1 in its sub-module. I'm not sure whether multi-module is a
necessity.
To reproduce, first build the "BuildMeFirst" project:
{{mvn clean install}}
Then build the site for "ThenBuildThisSite":
{{mvn clean site:site}}
You should see:
{{ [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-cli) on project
ardor3d: Error generating maven-javadoc-plugin:3.1.1:aggregate report:}}
{{ [ERROR] Exit code: 1 -
/Somepath/test-submodule/src/main/java/org/jogamp/simple/MyTest.java:3: error:
package pack does not exist}}
{{ [ERROR] import pack.PackPackageClass;}}
When inspecting the {{options}} file, you'll notice that the {{jar}} for the
first project (the dependency) is missing from the {{--class-path}} argument to
{{javadoc}}.
So for some reason dependencies that have something in the default packages are
dropped from the {{javadoc}} invocation.
Now remove the class from the default package in the first project and re-run
{{mvn clean install}}
for it.
Then re-run
{{mvn clean site:site}}
for the 2nd project and things should be fine.
> Maven Javadoc Plugin fails to resolve the dependencies when used with Java 11
> -----------------------------------------------------------------------------
>
> Key: MJAVADOC-620
> URL: https://issues.apache.org/jira/browse/MJAVADOC-620
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: javadoc
> Affects Versions: 3.1.0, 3.1.1
> Environment: Mageia Linux 7, AdoptOpenJDK 11.0.1
> Reporter: Julien Gouesse
> Priority: Major
> Attachments: BuildMeFirst.zip, MavenTest.zip, ThenBuildThisSite.zip
>
>
> Maven Javadoc Plugin fails to resolve the dependencies that are inherited by
> all sub-modules in the parent pom file and the dependencies specific to some
> sub-modules if and only if it's used with Java 11 whereas it works flawlessly
> with Java 8. This bug is reproducible with this project:
> [https://jogamp.org/cgit/ardor3d.git/tree/]
> Enter "mvn site" and you'll get the following error message:
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-site) on
> project ardor3d: Error generating maven-javadoc-plugin:3.1.1:aggregate
> report: [ERROR] Exit code: 1 -
> Ardor3D/ardor3d-swt/src/test/java/com/ardor3d/input/swt/TestSwtMouseWrapper.java:23:
> error: package org.eclipse.swt.events does not exist
> Note that "mvn install" works with Java 11, this problem of dependency
> management only occurs while generating the Java API documentation with Java
> 11.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)