Maven Site Plugin
  1. Maven Site Plugin
  2. MSITE-619

Method calculateLink threw exception for reference $PathTool

    Details

    • Type: Bug Bug
    • Status: Reopened Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Maven 3, site descriptor
    • Labels:
      None
    • Environment:
      Maven 3.0.3, MacOS-X 10.6.8
    • Number of attachments :
      0

      Description

      After running 'mvn site:site' I get the following errors after upgrading to maven-site-plugin 3.0 (with 3.0-beta-3 this error does not happen!):

      ...
      [ERROR] Method calculateLink threw exception for reference $PathTool in template org/apache/maven/doxia/siterenderer/resources/default-site.vm at [2,31]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 34.451s
      [INFO] Finished at: Sun Nov 20 20:29:56 CET 2011
      [INFO] Final Memory: 22M/81M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-cli) on project patterntesting-rt: Error during page generation: Error while generating code. Invocation of method 'calculateLink' in class org.codehaus.plexus.util.PathTool threw exception java.lang.NullPointerException @ org/apache/maven/doxia/siterenderer/resources/default-site.vm[2,41] -> [Help 1]
      ...

      These are the POMs which are used:

        Activity

        Hide
        Lukas Theussl added a comment -

        There is a breadcrumb without an href in your site.xml, please check if this fixes it. Note that all <item> elements in site.xml require a href.

        Show
        Lukas Theussl added a comment - There is a breadcrumb without an href in your site.xml, please check if this fixes it. Note that all <item> elements in site.xml require a href.
        Hide
        Oliver Boehm added a comment -

        That's it - thank you for the tip.
        But nevertheless - it's a strange error message

        Show
        Oliver Boehm added a comment - That's it - thank you for the tip. But nevertheless - it's a strange error message
        Hide
        Jakub Skoczen added a comment -

        Closed? Are you for real? NPE is a default way to report parsing errors in your coding style??

        Show
        Jakub Skoczen added a comment - Closed? Are you for real? NPE is a default way to report parsing errors in your coding style??
        Hide
        Johannes Schneider added a comment -

        I just run into that exception.
        This worked fine some time ago. I think a recent update to the site plugin triggered that bug.

        Please, please - at least add a better exception message...

        Show
        Johannes Schneider added a comment - I just run into that exception. This worked fine some time ago. I think a recent update to the site plugin triggered that bug. Please, please - at least add a better exception message...
        Hide
        Lukas Theussl added a comment -

        I doubt that this worked with any recent version of the site plugin. Unfortunately, the Exception message comes from the Velocity parser, so we'd have to manually check for null hrefs in the vm script. I still maintain that a href is required, so the Exception is valid, but I'd be happy to apply a patch to log a better error message.

        Show
        Lukas Theussl added a comment - I doubt that this worked with any recent version of the site plugin. Unfortunately, the Exception message comes from the Velocity parser, so we'd have to manually check for null hrefs in the vm script. I still maintain that a href is required, so the Exception is valid, but I'd be happy to apply a patch to log a better error message.
        Hide
        Johannes Schneider added a comment -

        What about changing the xsd? Marking "href" as required could help.

        Show
        Johannes Schneider added a comment - What about changing the xsd? Marking "href" as required could help.

          People

          • Assignee:
            Unassigned
            Reporter:
            Oliver Boehm
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: