[
https://issues.apache.org/jira/browse/MJAVADOC-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865728#comment-17865728
]
Michael Osipov edited comment on MJAVADOC-778 at 7/13/24 10:02 PM:
-------------------------------------------------------------------
Is this one still valid because I was able to build the site from
0df4e6ba2ae503efd7612c17d4f959b69203e3f0:
{noformat}
[INFO] Writing report to:
D:\Entwicklung\Projekte\Validation\target\site\dependency-check-report.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:27 min
[INFO] Finished at: 2024-07-14T00:00:28+02:00
[INFO] ------------------------------------------------------------------------
D:\Entwicklung\Projekte\Validation [master ≡]> mvn site
{noformat}
was (Author: michael-o):
Is this one still valid because I was able to build the site:
{noformat}
[INFO] Writing report to:
D:\Entwicklung\Projekte\Validation\target\site\dependency-check-report.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:27 min
[INFO] Finished at: 2024-07-14T00:00:28+02:00
[INFO] ------------------------------------------------------------------------
D:\Entwicklung\Projekte\Validation [master ≡]> mvn site
{noformat}
> Module not visible when creating test javadocs
> ----------------------------------------------
>
> Key: MJAVADOC-778
> URL: https://issues.apache.org/jira/browse/MJAVADOC-778
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Affects Versions: 3.6.0
> Environment: maven, java 17, windows 10
> Reporter: Kai Hofmann
> Priority: Major
> Labels: JavaDoc, Modules, java
> Fix For: waiting-for-feedback
>
>
> I have an open source java project with java module system on github:
> [https://github.com/PowerStat/Validation]
> When doing a
> {code:java}
> mvn site{code}
> This will result in the following:
>
>
> {code:java}
> [INFO] Generating "Test Javadoc" report ---
> maven-javadoc-plugin:3.6.0:test-aggregate-no-fork
> [INFO] Configuration changed, re-generating javadoc.
> [ERROR] Error while creating javadoc report:
> Exit code: 1
>
> C:\Users\PowerStat\Documents\Validation\src\test\java\de\powerstat\comparators\test\ComparatorEMailByDomainTests.java:7:
> error: package org.junit.jupiter.api is not visible
> import static org.junit.jupiter.api.Assertions.assertEquals;
> ^
> (package org.junit.jupiter.api is declared in the unnamed module, but
> module de.powerstat.validation does not read it)
>
> C:\Users\PowerStat\Documents\Validation\src\test\java\de\powerstat\comparators\test\ComparatorEMailByDomainTests.java:7:
> error: static import only from classes and interfaces
> import static org.junit.jupiter.api.Assertions.assertEquals;
> ^
> [...]
> 100 errors
> Command line was: cmd.exe /X /C ""C:\Program
> Files\Java\jdk-17\bin\javadoc.exe" @options @argfile"
>
> Refer to the generated Javadoc files in
> 'C:\Users\PowerStat\Documents\Validation\target\site\testapidocs' dir.
>
> org.apache.maven.reporting.MavenReportException:
> Exit code: 1
>
> C:\Users\PowerStat\Documents\Validation\src\test\java\de\powerstat\comparators\test\ComparatorEMailByDomainTests.java:7:
> error: package org.junit.jupiter.api is not visible
> import static org.junit.jupiter.api.Assertions.assertEquals;
> ^
> (package org.junit.jupiter.api is declared in the unnamed module, but
> module de.powerstat.validation does not read it)
>
> C:\Users\PowerStat\Documents\Validation\src\test\java\de\powerstat\comparators\test\ComparatorEMailByDomainTests.java:7:
> error: static import only from classes and interfaces
> import static org.junit.jupiter.api.Assertions.assertEquals;
> ^
> [...]
> 100 errors
> Command line was: cmd.exe /X /C ""C:\Program
> Files\Java\jdk-17\bin\javadoc.exe" @options @argfile"
>
> Refer to the generated Javadoc files in
> 'C:\Users\PowerStat\Documents\Validation\target\site\testapidocs' dir.
> at
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.doExecuteJavadocCommandLine
> (AbstractJavadocMojo.java:5183)
> at
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine
> (AbstractJavadocMojo.java:5068)
> at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport
> (AbstractJavadocMojo.java:2028)
> at org.apache.maven.plugins.javadoc.TestJavadocReport.executeReport
> (TestJavadocReport.java:153)
> at org.apache.maven.plugins.javadoc.JavadocReport.generate
> (JavadocReport.java:135)
> at
> org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument
> (ReportDocumentRenderer.java:226)
> at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render
> (DefaultSiteRenderer.java:348)
> at org.apache.maven.plugins.site.render.SiteMojo.renderLocale
> (SiteMojo.java:194)
> at org.apache.maven.plugins.site.render.SiteMojo.execute
> (SiteMojo.java:143)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:210)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:77)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:568)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:356)
> {code}
>
>
> I am assuming that the maven-javadoc-plugin is not using the
> {code:java}
> /src/test/java/module-info.test{code}
> module descriptor, because this one contains
> {code:java}
> requires org.junit.jupiter.api;{code}
> Which should solve the problem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)