Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-367

Exception while parsing .apt (probably due to snippet macro)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Maven plugin
    • Labels:
      None

      Description

      Hello

      I got the following:

      $ mvn site
      ...
      [INFO] Generating "Issue Tracking" report.
      [INFO] Generating "Surefire Report" report.
      [WARNING] Unable to locate Test Source XRef to link to - DISABLED
      [INFO] Generating "Project License" report.
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] 1
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.ArrayIndexOutOfBoundsException: 1
      at org.apache.maven.doxia.module.apt.AptParser$MacroBlock.traverse(AptParser.java:2689)
      at org.apache.maven.doxia.module.apt.AptParser.traverseSectionBlocks(AptParser.java:358)
      at org.apache.maven.doxia.module.apt.AptParser.traverseSection(AptParser.java:304)
      at org.apache.maven.doxia.module.apt.AptParser.traverseBody(AptParser.java:255)
      at org.apache.maven.doxia.module.apt.AptParser.parse(AptParser.java:181)
      at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:59)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:376)
      at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:52)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:303)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
      at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      I guess it's due to my first attempt to write an .apt file. Still, it would be nice if the error message could be slightly improved...

      The offending examples.apt is below. As file:// is not further documented I tried to try out which path is expected.

      ------
      Apache log4php Examples
      ------
      ------
      ------

      Apache Log4php Examples

      The source contains ready to run examples for most appenders and major concepts in the src/examples/ directory.

      Some of them are will be shown below:

      %

      {snippet|file:///home/james/workspace/log4php/src/examples/syslog.php}

      %

      {snippet|file://src/examples/syslog.php}

      %

      {snippet|file://../../../examples/syslog.php}

      %

      {snippet|file://../../examples/syslog.php}

        Attachments

          Activity

            People

            • Assignee:
              ltheussl Lukas Theussl
              Reporter:
              lathspell Christian Brunotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: