ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robi Khan" <rk...@databeacon.com>
Subject assert task?
Date Mon, 06 May 2002 18:29:31 GMT
Hi,
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.

e.g.
	<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.

Comments?

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


Mime
View raw message