You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2011/01/25 11:25:41 UTC

ResourceExists condition (was Re: svn commit: r1063181 - in /ant/antlibs/antunit/trunk: ./ docs/ src/etc/testcases/ src/main/org/apache/ant/antunit/ src/tests/junit/org/apache/ant/antunit/)

On 2011-01-25, <bo...@apache.org> wrote:

> Added:
>     ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java   (with props)

This is a plain ant condition with no dependency on AntUnit that might
be useful in core Ant as well.

I added it to AntUnit rather than Ant's trunk so that we can release
AntUnit (if we ever want to) without having to release Ant first.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: ResourceExists condition

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-01-25, Matt Benson wrote:

> On Jan 25, 2011, at 4:25 AM, Stefan Bodewig wrote:

>> On 2011-01-25, <bo...@apache.org> wrote:

>>> Added:
>>>    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java   (with props)

>> This is a plain ant condition with no dependency on AntUnit that might
>> be useful in core Ant as well.


> Shorthand for

> <resourcecount count="1">
>   <restrict>
>     <exists>
>       <resource refid="myresource" />
>     </exists>
>   </restrict>
> </resourcecount>

> ?  ;)

Only that the resource can be specified as attribute (which implies
property helper syntax) and is likely a bit more efficient.  Other than
that, yes 8-)

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: ResourceExists condition (was Re: svn commit: r1063181 - in /ant/antlibs/antunit/trunk: ./ docs/ src/etc/testcases/ src/main/org/apache/ant/antunit/ src/tests/junit/org/apache/ant/antunit/)

Posted by Matt Benson <gu...@gmail.com>.
On Jan 25, 2011, at 4:25 AM, Stefan Bodewig wrote:

> On 2011-01-25, <bo...@apache.org> wrote:
> 
>> Added:
>>    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java   (with props)
> 
> This is a plain ant condition with no dependency on AntUnit that might
> be useful in core Ant as well.
> 

Shorthand for

<resourcecount count="1">
  <restrict>
    <exists>
      <resource refid="myresource" />
    </exists>
  </restrict>
</resourcecount>

?  ;)

-Matt

> I added it to AntUnit rather than Ant's trunk so that we can release
> AntUnit (if we ever want to) without having to release Ant first.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org