Maven Javadoc No source files for package with my test directory structure

50 Views Asked by At

I have a small open source project on github TemplateEngine where maybe my test directory structure is a little bit special at the moment:

  1. test/java/de/powerstat/templateengine/
  2. test/java/de/powerstat/templateengine/test/
  3. test/java/de/powerstat/templateengine/intern/test/

So, the "test" directories here are to make the default package accessibility invisible for the unit tests. The JUnit 5 tests are in 2. and 3. But within 1. I placed my cucumber tests.

This works fine, except when calling mvn site. This results into the following when generating the test javadocs:

[ERROR] Error while creating javadoc report:
Exit code: 2
error: No source files for package de.powerstat.phplib.templateengine
1 error
Command line was: cmd.exe /X /C ""C:\Program Files\Java\jdk-17\bin\javadoc.exe" @options @packages"

Refer to the generated Javadoc files in 'C:\Users\PowerStat\Documents\TemplateEngine\target\site\testapidocs' dir.

org.apache.maven.reporting.MavenReportException:
Exit code: 2
error: No source files for package de.powerstat.phplib.templateengine
1 error
Command line was: cmd.exe /X /C ""C:\Program Files\Java\jdk-17\bin\javadoc.exe" @options @packages"

Refer to the generated Javadoc files in 'C:\Users\PowerStat\Documents\TemplateEngine\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)

So my question is: how best to avoid this error message (which should only be a warning in my opinion)?

0

There are 0 best solutions below