Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-856

NullPointer on org.apache.maven.plugins.site.render.SiteMap.relativePath

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8.2
    • Fix Version/s: 3.9.1
    • Component/s: site descriptor
    • Labels:
    • Environment:
      windows

      Description

      Hello,

       

      In the site.xml description, inside a menu, if you forget to set the href of an item, the following error will occurs : 

       

      Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project investigation-core: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site failed. NullPointerException -> [Help 1]Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project investigation-core: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site failed. NullPointerException -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project investigation-core: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site failed. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215) 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:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site failed. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) ... 20 moreCaused by: java.lang.NullPointerException at org.apache.maven.plugins.site.render.SiteMap.relativePath(SiteMap.java:188) at org.apache.maven.plugins.site.render.SiteMap.extractItems(SiteMap.java:175) at org.apache.maven.plugins.site.render.SiteMap.extract(SiteMap.java:154) at org.apache.maven.plugins.site.render.SiteMap.generate(SiteMap.java:120) at org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:204) at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:147) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)

       

      To reproduce the error, juste add the following menu on a site.xml description : 

       

      <menu name="My Menu">
        <item name="My first item"/>
      </menu>

       

      I think that a syntax error should be raised rather than a null pointer.

       

      Thanks

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elharo Elliotte Rusty Harold
                Reporter:
                clement.bareth clement bareth
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: