Hi Thomas,

I tested your configuration and found the same issue – however, it may
not be an issue after all.

You configured your javadoc plugin as part of the reporting section.
This usually requires the compile goal.

Even if you add the jar goal to the default build->plugin section, it
will still require compile to be executed. This is expected and
documented in [2]:
"Requires dependency resolution of artifacts in scope: compile. &&
Binds by default to the lifecycle phase: package."

Same description for the javadoc:javadoc goal.

"mvn package site" will work because "package" includes the "compile"
goal from the default lifecycle.

site (on its own) however is it's own lifecycle and goal and does not
contain the default's lifecycle compile goal. See [1].

Everything you reported works as expected. From what I can tell it
shouldn’t have worked with other java versions and/or other javadoc
plugin versions either.

Does this help you? If not, maybe you might want to explain your
execution idea instead. This will help us getting an idea of what you
are trying to achieve.

Best regards,
Ben

[1] 
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
[2] https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html

Am Mo., 26. Okt. 2020 um 12:49 Uhr schrieb Thomas Scheffler
<thomas.scheff...@uni-jena.de>:
>
> Hi,
>
> I have serious problems getting any maven-javadoc-plugin >= 3.1.0 to work 
> with simply Java 11 test case:
>
> Neither will „mvn javadoc:javadoc“ nor „mvn javadoc:jar“ nor „mvn site“ work 
> out-of-the-box. I have to add „compile“ in the middle to get the 
> javadoc-plugin work but this will not fix the site generation.
>
> What’s wrong with the pom.xml or with maven (using version 3.6.3)?
>
> I created a small test project on github: 
> https://github.com/yagee-de/javadoc-test
>
> The output I get is like:
>
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (default-cli) on 
> project test: MavenReportException: Error while generating Javadoc:
> [ERROR] Exit code: 1 - error: module not found: de.yagee.test
> [ERROR]
> [ERROR] Command line was: /Users/yagee/Java/Home/11/bin/javadoc @options 
> @packages @argfile
> [ERROR]
> [ERROR] Refer to the generated Javadoc files in 
> '/Users/yagee/git/javadoc-test/target/apidocs' dir.
> [ERROR]
> [ERROR] -> [Help 1]
>
> Any help is highly appreciated!
>
> Kind regards,
>
> Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to