maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Ferguson (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (ARCHETYPE-39) Add tool for working with escaping in Velocity templates
Date Thu, 02 Aug 2007 02:48:13 GMT

    [ http://jira.codehaus.org/browse/ARCHETYPE-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103824
] 

William Ferguson commented on ARCHETYPE-39:
-------------------------------------------

For those interested in a solution, specify

#set($dollar = '$')

at the head of the archetype Velocity template in which you need the unescaped dollar signs.
Then to get ${artifactId} in the output, specify

${dollar}{artifactId}

> Add tool for working with escaping in Velocity templates
> --------------------------------------------------------
>
>                 Key: ARCHETYPE-39
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-39
>             Project: Maven Archetype
>          Issue Type: Improvement
>          Components: Plugin
>    Affects Versions: 1.0-alpha-4
>            Reporter: Willie Vu
>         Attachments: ARCHETYPE-39-velocity-escape-tool.patch, ARCHETYPE-39.patch
>
>
> e.g. I need to put ${archifactId} (without parameter replacement) into an assembly descriptor.
 I need to escape the dollar sign.
> This is the Escape Tool of Velocity - http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/generic/EscapeTool.html.
 The embedded Velocity engine will be configured to use it, or archetype plugin allows further
Velocity configuration.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message