ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robi Khan" <>
Subject assert task?
Date Mon, 06 May 2002 18:29:31 GMT
I've been following the back and forth on whether the fail task should take an if/unless attribute.
The counterargument seems to be that this is a slippery slope that would lead to all tasks
having if/unless.

Perhaps. What I've done in our builds is define an assert task that works with the existing
property and conditional stuff.

	<available file="fubar.xml" property="isXmlThere"/>
	<assert condition="isXmlThere" message="Could not find fubar.xml file"/>

The implementation is too trivial to worth mention. And it has all the benefits that assert
has in programming languages. For example, I use it often to validate input parameters to
targets. In general I think it's a good fit for larger Ant projects.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message