[ https://jira.codehaus.org/browse/DOXIA-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukas Theussl closed DOXIA-447. ------------------------------- Resolution: Not A Bug Assignee: Lukas Theussl This is not a bug but a documented 'feature' of Velocity, see http://velocity.apache.org/engine/devel/user-guide.html#escapinginvalidvtlreferences > APT doesn't support specific code snippets embedded inside XML as verbatim > text > ------------------------------------------------------------------------------- > > Key: DOXIA-447 > URL: https://jira.codehaus.org/browse/DOXIA-447 > Project: Maven Doxia > Issue Type: Bug > Components: Module - Apt > Reporter: Parameswaran Raman > Assignee: Lukas Theussl > Priority: Blocker > Attachments: test.apt.vm > > > As part of compiling documentation for our project Oozie, we require adding > XML snippets with expressions of a particular kind such as: > ${wf:errorCode('wordcount')}. These expressions are known as EL functions and > they would appear at numerous places in the documentation. Unfortunately, > Doxia APT compiler is not able to parse these expressions and throws an > exception. > Following is the XML snippet desired (to be placed inside verbatim tag): > -------------------------------------------------------------------------------------------- > > <configuration> > <property> > <name>mapred.job.queue.name</name> > <value>${queueName}</value> > </property> > <property> > <name>error.message</name> > <value>Something went wrong: ${wf:errorCode('wordcount')}</value> > </property> > </configuration> > -------------------------------------------------------------------------------------------- > > On trying to build the maven project for the site documentation, > $ mvn site > I get the following error: > -------------------------- > [ERROR] org.apache.velocity.runtime.parser.ParseException: Encountered > ":errorCode(\'wordcount\')}</message>\n </kill/>\n <end > name=\'end\'/>\n</workflow-app>\n----------------------------------------------------------------------------------\n\n > <<Notes:>>\n\n <<" at line 134, column 44. > Was expecting one of: > "}" ... > <DOT> ... > Observations: > ------------- > 1) It appears that whenever I use any text of the format: > ${wf:errorCode('wordcount')} , APT throws a parse exception (even if its > contained in the verbatim block). > 2) I tried escaping the characters - {, $, :, etc.. but it doesnt work > either. > 3) In general we tried the following patterns and found that: > ${foo} works > ${foo()} fails > ${foo:bar} fails > ${foo:bar()} fails > We found a workaround (that solves this issue partially), however we would > need this bug to be fixed as early as possible as it is a critical blocker in > our documentation process. > Workaround (based on response from the maven nabble forum): > ----------------------------------------------------------- > (Source: > http://maven.40175.n5.nabble.com/APT-Issue-with-adding-xml-code-snippets-as-Verbatim-tt4831524.html#a4831572 > ) > I have attached a sample source file (test.apt.vm) that you can use to > reproduce the bug. > -- > Thanks, > Params > parame...@gmail.com -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira