Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-498

"module not found" when Java 9 module-info present

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-M1
    • Fix Version/s: 3.0.0
    • Component/s: javadoc
    • Labels:
      None
    • Environment:

      Description

      Using my project at https://github.com/meterware/simplestub/tree/287794112a6c2c932f2dbd6747a6339b73ab3718

      running javadoc:javadoc yields:

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:javadoc (default-cli) on project simplestub: An error has occurred in Javadoc report generation: 
      Exit code: 1 - /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: error: module not found: org.objectweb.asm.commons
          requires org.objectweb.asm.commons;
                                    ^
      /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: error: module not found: javassist
          requires javassist;
                   ^
      
      Command line was: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc @options @packages @argfile
      
      Refer to the generated Javadoc files in '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
      
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	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:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	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)
      Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Javadoc report generation: 
      Exit code: 1 - /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: error: module not found: org.objectweb.asm.commons
          requires org.objectweb.asm.commons;
                                    ^
      /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: error: module not found: javassist
          requires javassist;
                   ^
      
      Command line was: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc @options @packages @argfile
      
      Refer to the generated Javadoc files in '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
      
      	at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.failOnError(AbstractJavadocMojo.java:5954)
      	at org.apache.maven.plugins.javadoc.JavadocReport.doExecute(JavadocReport.java:322)
      	at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute(AbstractJavadocMojo.java:1889)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 20 more
      Caused by: org.apache.maven.reporting.MavenReportException: 
      Exit code: 1 - /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: error: module not found: org.objectweb.asm.commons
          requires org.objectweb.asm.commons;
                                    ^
      /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: error: module not found: javassist
          requires javassist;
                   ^
      
      Command line was: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc @options @packages @argfile
      
      Refer to the generated Javadoc files in '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
      
      	at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine(AbstractJavadocMojo.java:5075)
      	at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:2093)
      	at org.apache.maven.plugins.javadoc.JavadocReport.generate(JavadocReport.java:130)
      	at org.apache.maven.plugins.javadoc.JavadocReport.doExecute(JavadocReport.java:318)
      	... 23 more
      [ERROR] 
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      /Users/rgold/projects/meterware/simplestub> 

      Building the project works

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rfscholte Robert Scholte
                Reporter:
                russgold Russell Gold
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: