ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: Checking the version of Ant
Date Mon, 15 Jul 2002 15:46:00 GMT
--- Dominique Devienne <> wrote:
> One easy solution would be to substitute the normal Ant main class
> ( by your own Main class, which loads the
> org/apache/tools/ant/version.txt resource properties file [...]
> and check the VERSION and DATE Java properties.

Wouldn't it be easier still to just use a listener that sends mail, rather
than relying on the <mail> task? Since you're sending mail about
mismatched versions, presumably you also want to send build-results mail
when the versions do match and things run.

The other alternative would be to use the <mimemail> task. It's deprecated
for 1.5, but not gone, and you'll only see the DEPRECATED output if you
actually run it (ie., when the versions don't match).

As a last resort, you could have two separate targets, one that runs 1.5's
<mail> and one that runs 1.4.1's <mimemail>, depending on what $VERSION is
set to (which would require you pull in version.txt -- but you really
should do that in any case).

Out of curiosity -- assuming this check is done before anything gets run,
what set of files would you have at that point to send anyway?



Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes

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

View raw message