Bugs item #1975279, was opened at 2008-05-27 20:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1975279&group_id=31650
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Hegener (dnickless)
Assigned to: Nobody/Anonymous (nobody)
Summary: error using expandproperties filter with nested properties
Initial Comment:
Dear NAnt developers,
the documentation of the expandproperties filter says:
"Note: Due to limitations on buffering, expressions longer than 2048 characters
are not guaranteed to be expanded."
But I think I've managed to screw up my build using a different approach: I'm
using nested properties like this ${'${X}'} to do a two-step replacement.
The following basic script should replace all occurences of
'${replacement.token}' in the file 'test.txt' with the string '${new.token}'.
<!-- the following line should result in a property 'replacement.token' that
holds the string '${new.token}' -->
<property name="replacement.token" value="${'${new.token}'}" />
<copy file="test.txt" tofile="test2.txt">
<filterchain>
<expandproperties />
</filterchain>
</copy>
Ususally this works very well. But depending on the file size of 'test.txt' and
the position of the replacement token within the file it fails with the error
message
"Property 'new.token' has not been set."
even though the expression '${new.token}' is supposed to be considered as a
string and not as another token that needs to be replaced.
I've created some sort of a unit test for you which points out where the
problem is. Please have a look at the attached script.
Thank you in advance
Daniel
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1975279&group_id=31650
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers