ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53383] assertResourceExists fails for URL
Date Sun, 17 Jun 2012 07:03:05 GMT

--- Comment #2 from Stefan Bodewig <> ---
This is really ugly, I should have written assertResourceExists using a nested
element rather than an attibute.

Ant's Resource-valued attributes only work in conjunction with property
expanders that return Resources - they don't work if you use a plain String. 
So this here works

    <url url="" id="antsite"/>
      <au:resourceExists resource="${ant.refid:antsite}"/>

but this doesn't

      <au:resourceExists resource=""/>

To make things worse the nested macrodef construction of assertResourceExists
will evaluate the property to a string before it reaches resourceExists so even 

    <url url="" id="antsite"/>
    <au:assertResourceExists resource="${ant.refid:antsite}"/>

will not work.

See my previous comment for a workaround, assertResourceExists as it stands
will not work for anything other than a file at all.

You are receiving this mail because:
You are the assignee for the bug.

View raw message