I recently encountered some interesting behavior while trying to use the escape character syntax.
I'm trying to build config files from a template file containing tokens (i.e. ${server.name}) to be replaced at build time using a copy task combined with the filterchain expandproperties task. Specifically I'm trying to build a config file in which my desired output includes the string ${something}. To do so, I am using the syntax ${'${something}'}. This syntax worked until my config file went beyond a certain number of characters in length. In my case it appears to be 2032. As soon as the file went beyond this number of chars, the expandproperties task tries to evaluate the token inside of the escape character. As you can see below if changes the ${'${property2000}'} token into the property2000 value 'ThisProperty2000_Expanded.' Does anyone recognize this behavior? And if so, could you please explain, and offer any known workarounds? Thanks! Example--> *** BUILDFILE ********************************************************************** <?xml version="1.0" encoding="utf-8" ?> <project name="magnum" default="go"> <property name="property1" value="ThisProperty1_Expanded"/> <property name="property2000" value="ThisProperty2000_Expanded"/> <target name="go"> <copy file="E:\Development\Demos\Demo.Nant\expandpropertiesTestFile.txt.templa te" tofile="E:\Development\Demos\Demo.Nant\expandpropertiesTestFile.txt" overwrite="true" > <filterchain> <expandproperties /> </filterchain> </copy> </target> </project> *** TEMPLATE WITH 2032 CHARACTERS ************************************************ This is a test file template. I'm trying to prove after 2032 chars that Nant has some issues! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! Trying to expand Property1: ${property1} Trying to use escape character: ${'${property1}'} There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! 1604 Trying to expand Property2000: ${property2000} Trying to use escape character: ${'${property2000}'} There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 char Trying to expand Property2000: ${property2000} Trying to use escape character: ${'${property2000}'} *** RESULT ********************************************************************** This is a test file template. I'm trying to prove after 2032 chars that Nant has some issues! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! Trying to expand Property1: ThisProperty1_Expanded Trying to use escape character: ${property1} There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! 1604 Trying to expand Property2000: ThisProperty2000_Expanded Trying to use escape character: ${property2000} There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 char Trying to expand Property2000: ThisProperty2000_Expanded Trying to use escape character: ${property2000} *** TEMPLATE WITH 2033 CHARACTERS ************************************************ This is a test file template. I'm trying to prove after 2032 chars that Nant has some issues! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! Trying to expand Property1: ${property1} Trying to use escape character: ${'${property1}'} There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! 1604 Trying to expand Property2000: ${property2000} Trying to use escape character: ${'${property2000}'} There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars Trying to expand Property2000: ${property2000} Trying to use escape character: ${'${property2000}'} *** RESULT ********************************************************************** This is a test file template. I'm trying to prove after 2032 chars that Nant has some issues! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! Trying to expand Property1: ThisProperty1_Expanded Trying to use escape character: ThisProperty1_Expanded There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! 1604 Trying to expand Property2000: ThisProperty2000_Expanded Trying to use escape character: ThisProperty2000_Expanded There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars in this line of words. Having 100 chars will allow me to multiple chars easily! There are 100 chars Trying to expand Property2000: ThisProperty2000_Expanded Trying to use escape character: ThisProperty2000_Expanded Thanks for the help! Matt Mergen Programmer Analyst FHLBank Topeka 785.438.6250 FHLBank Topeka makes a difference by helping our members build their communities. This e-mail and any attachments are confidential and intended solely for the use of the intended recipient. The information contained herein may be legally privileged, proprietary or subject to copyright or trademark protection or may constitute material, non-public information regarding the sender, subject to protection under federal or state law or regulations. If you are not the intended recipient, be aware that any use, copying or distribution of this information is strictly prohibited and may subject you to criminal or civil penalties. If you received this e-mail in error, please notify the sender immediately by e-mail reply and delete this e-mail from your computer. Thank you for your cooperation. FEDERAL HOME LOAN BANK OF TOPEKA [fhlbi...@fhlbtopeka.com] ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users