ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Laird" <Laird.Nel...@time0.com>
Subject RE: [RFE] Default Help target on error ?
Date Tue, 25 Jul 2000 13:54:52 GMT
> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> On the other hand one can do the same using just if and unless on
> targets as well as an echo task - it would be the more forgiving way
> as well:
> 
> <target name="main" depends="dosomething,reporterror" />
> 
> <target name="dosomething" if="java1.2">
>   .... do the stuff you need to do
> </target>
> 
> <target name="reporterror" unless="java1.2">
>   <echo message="Need JDK >= 1.2 to work" />
> </target>

Right, but in the spirit (I hope) of ant I'd rather have this more
explicit--part of project initialization.  It's odd to have your main target
depend on a reporterror target.  And if your platform isn't set up right,
you don't *want* it to be forgiving.

I like the idea of a die task, but then I have some fond memories of perl.
:-)

Cheers,
Laird

Mime
View raw message