Bugs item #1160366, was opened at 2005-03-10 04:37
Message generated for change (Settings changed) made by drieseng
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1160366&group_id=31650
Category: Functions
Group: 0.85
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: chocsa (chocsa)
>Assigned to: Gert Driesen (drieseng)
Summary: Get-Parent-Directory() does not work with properties
Initial Comment:
Create a property named "local"containing a local
directory that exists.
say c:\bla\blabla;
Use this property in Get-Parent-Directory('${local}')
and it returns the base dir of the project, not
anticipated c:\bla.
However, if you hardcode
get-parent-directory('c:\bla\blabla') the correct
output is achieved.
code sample
<?xml version="1.0"?>
<project name="Generic" default="whatever" >
<property name="adir" value="C:\www
downloads\computer" />
<property name="base_dir"
value="${directory::get-parent-directory('')}" />
<property name="adir.parent"
value="${directory::get-parent-directory('${adir}')}" />
<echo message="basedir = ${adir}" />
<echo message="basedir = ${base_dir}" />
<echo message="adir.parent = ${adir.parent}" />
----------------------------------------------------------------------
>Comment By: Gert Driesen (drieseng)
Date: 2005-03-10 07:40
Message:
Logged In: YES
user_id=707851
I've now also added an example of the usage of this function
to its doc page.
----------------------------------------------------------------------
Comment By: Troy Laurin (fiontan)
Date: 2005-03-10 04:48
Message:
Logged In: YES
user_id=1062940
This is not a bug. You cannot nest expression evaluation
contexts. While you are in an evaluation context ${}, you
can directly access properties by name.
The critical line in the sample should read:
<property name="adir.parent"
value="${directory::get-parent-directory(adir)}" />
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1160366&group_id=31650
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers