Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Not A Bug
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Module - Apt
-
Labels:None
-
Number of attachments :
Description
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>$
</value>
</property>
<property>
<name>error.message</name>
<value>Something went wrong: $
</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: $
, 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:
$
works
$
fails
$
fails
$
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
parameshr@gmail.com
Activity
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Not A Bug [ 6 ] | |
| Assignee | Lukas Theussl [ lukas ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
This is not a bug but a documented 'feature' of Velocity, see http://velocity.apache.org/engine/devel/user-guide.html#escapinginvalidvtlreferences