maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Isaacson (JIRA)" <>
Subject [jira] (DOXIASITETOOLS-79) APT document with verbatim section including C #include causes NPE
Date Fri, 18 Jan 2013 20:57:13 GMT
Andy Isaacson created DOXIASITETOOLS-79:

             Summary: APT document with verbatim section including C #include causes NPE
                 Key: DOXIASITETOOLS-79
             Project: Maven Doxia Sitetools
          Issue Type: Bug
            Reporter: Andy Isaacson
         Attachments: mtest.tar.gz

A simple apt.vm document including a C program fragment in a verbatim section causes "mvn
site" to fail with a NPE.  The failure can be worked around by escaping the # as backslash-#
but the requirement to do this is not documented, nor AFAICS is the feature of supporting
#include in verbatim sections.

Attaching a complete testcase mtest.tar.gz.

% cat src/site/apt/hello.vm
   #include "stdio.h"
   int main(void) { printf("hello, world!\n"); return 0; }
% mvn --version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.6.6", arch: "amd64", family: "unix"
% mvn site
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[ERROR] Parser Exception: /tmp/mtest/src/site/apt/hello.apt.vm
[ERROR] org.apache.velocity.runtime.parser.ParseException: Encountered "\"stdio.h\"" at line
2, column 13.
Was expecting:
    "(" ...
        at org.apache.velocity.runtime.parser.Parser.generateParseException(
        at org.apache.velocity.runtime.parser.Parser.jj_consume_token(
[ERROR] ResourceManager.getResource() parse exception
[ERROR] org.apache.velocity.exception.ParseErrorException: Encountered "\"stdio.h\"" at line
2, column 13 of /tmp/mtest/src/site/apt/hello.apt.vm
Was expecting:
    "(" ...
        at org.apache.velocity.Template.process(
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(
[ERROR] Error parsing /tmp/mtest/src/site/apt/hello.apt.vm as a velocity template, using as
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.798s
[INFO] Finished at: Fri Jan 18 12:51:17 PST 2013
[INFO] Final Memory: 11M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site)
on project mtest: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.0:site
failed. NullPointerException -> [Help 1]

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message