ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Tkachenko ...@freehold.crocodile.org>
Subject Ant version recognition
Date Thu, 01 Nov 2001 22:37:18 GMT
Hello,

Sorry if this topic has been discussed previously - I couldn't find the
references.

The problem I want to solve is quite simple - how to give the build process
the ability to request a specific Ant version - for example, how do I
explicitly tell the user that Ant 1.3 would not be able to work with this
specific build file? Currently, the content of the ${ant.version} is
something like this:

	Ant version 1.4 compiled on October 2 2001

This is, of course, human readable, but useless for the build process just
because the specific Ant distribution may have been compiled on the
different date.

There are a few possible solutions.

One, restrict the content of ${ant.version} to something as simple as "1.4"
and provide additional predefined variable like ${ant.build.info} or
something like that. This will allow to create conditionals based on the
string value of the version. The benefit is the minimum amount of changes
required. The drawback is obvious - it breaks the existing behavior and
doesn't protect from weird things like version "1.4experimental2alpha10b".
Also, in this case the hassle of maintaining the check is on the user.

The other is introduce a simple task identical to AC_PREREQ in autoconf that
will have one and only purpose: ensure that the running version of Ant is
able to handle the build file being run. The benefit is that the syntax is
much simpler, the drawback is that this task has to be referenced early
enough - lack of clarity, though not as bad as the option above.

And the third option, probably simplest from the user standpoint, is an
[optional] attribute to the <project> element specifying which version of
Ant is required to run this build file.

Any comments? I hope I haven't missed anything...

--vt

--
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