You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rich Wagner <ri...@savaJe.com> on 2004/10/21 21:07:41 UTC
Way for buildfile to verify that Ant version is 1.5.2 or greater
?
I'm at a loss for implementing something I'd like, so maybe someone else
knows of a straightforward way of accomplishing it...
Where I work, we have lots of developers using shared Ant buildfiles and
(for details not worth getting into here) builds will only work if users
run "ant" over those buildfiles where the Ant version is 1.5.2 or
greater. (Part of it has to do with the fact that the buildfiles
compile Java code which references Ant classes, and those references
include uses of features only added in version 1.5.2 of Ant.)
I know there's a built-in "ant.version" property, but that's a far cry
from (say) a target which checks that property and conditionally <fail>s
if the current ant version is pre-1.5.2.
Note that comparing "ant.version" to "1.5.2" for equality is NOT
sufficient, since - for instance - a build should NOT fail if the ant
version is 1.6.1.
Is there an easier way to get what I want than (say) writing my own
custom task to parse "ant.version" and compare the major, minor, etc.
version numbers ?
Thanks in advance,
Rich Wagner
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org