Archetype: escaping velocity properties.

2009-07-28 Thread Nord, James
Hi all,
 
I'm creating an archetype but I need to escape some values so that
velocity doesn't complain about them or even try and substitute them
 
However I tried \${value} as recommended in [1] but this gets put in the
final pom as \${value}  and not ${value}
 
How do you escape these values so you can end up with ${value} in the
final pom that is generated from an archetype?
 
The only thing I could find was MRESOURCES-29 [2] but this seems to be
specifically for the resources plugin and not relevant to the Archetype
plugin.
 
/James
 
[1]
http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#
escapingvalidvtlreferences
[2] http://jira.codehaus.org/browse/MRESOURCES-29

**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**


Re: Archetype: escaping velocity properties.

2009-07-28 Thread jieryn
Hi James,

I place the following at the top of all my velocity-processed resources:

#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )

And then simply use those whenever I'd want to use the real symbol,
which is special to velocity. This works for me in resources,
remote-resources, and archetypes.

-jesse

On Tue, Jul 28, 2009 at 6:33 AM, Nord, Jamesjn...@nds.com wrote:

 I'm creating an archetype but I need to escape some values so that
 velocity doesn't complain about them or even try and substitute them


-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Archetype: escaping velocity properties.

2009-07-28 Thread Nord, James
Thanks Jesse,

Worked like a charm.

/James 

 -Original Message-
 From: jie...@gmail.com [mailto:jie...@gmail.com] 
 Sent: 28 July 2009 13:24
 To: Maven Users List
 Subject: Re: Archetype: escaping velocity properties.
 
 Hi James,
 
 I place the following at the top of all my velocity-processed 
 resources:
 
 #set( $symbol_pound = '#' )
 #set( $symbol_dollar = '$' )
 #set( $symbol_escape = '\' )
 
 And then simply use those whenever I'd want to use the real 
 symbol, which is special to velocity. This works for me in 
 resources, remote-resources, and archetypes.
 
 -jesse
 
 On Tue, Jul 28, 2009 at 6:33 AM, Nord, Jamesjn...@nds.com wrote:
 
  I'm creating an archetype but I need to escape some values so that 
  velocity doesn't complain about them or even try and substitute them
 
 
 --
 There are 10 types of people in this world, those that can 
 read binary and those that can not.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 

**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org