Menu

#612 directory::exists cannot resolve set properties

closed-invalid
Functions (16)
5
2007-01-24
2007-01-24
No

Perhaps I am doing this wrong but the directory::exists does not evaluate to true when using a property like so.

<property name="alpha-core-src-dir" value="c:\temp" />

<if verbose="true" test="${directory::exists('${alpha-core-src-dir}')}">
<echo message="found directory" />
</if>

However this does work but generates a deprecation error..

<available type="Directory" resource="${alpha-core-src-dir}" property="src-dir-exist" />
<if verbose="true" test="${src-dir-exist}">
<echo message="found directory" />
</if>

Should directory::exists be able to resolve a property to a value and test against that?

Discussion

  • Gert Driesen

    Gert Driesen - 2007-01-24

    Logged In: YES
    user_id=707851
    Originator: NO

    When properties are passed to functions, they do not need to be enclosed in ${}.

    So, use this instead:

    <if verbose="true" test="${directory::exists(alpha-core-src-dir)}">
    <echo message="found directory" />
    </if>

     
  • Gert Driesen

    Gert Driesen - 2007-01-24
    • assigned_to: nobody --> drieseng
    • status: open --> closed-invalid
     

Log in to post a comment.