You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Seth Delackner <se...@jtan.com> on 2001/12/20 18:26:01 UTC

method to determine ant version?

Is there a public method that returns the version number of Ant?  I
would rather not have to just check for the existence of classes you
may later remove, when all I care about is that the version be >= 1.4.

Please CC me any response as I am not subscribed to the list.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: method to determine ant version?

Posted by Seth Delackner <se...@jtan.com>.
On Thu, Dec 20, 2001 at 02:38:55PM -0800, Diane Holt wrote:
> --- Seth Delackner <se...@jtan.com> wrote:
> > Is there a public method that returns the version number of Ant?  I
> > would rather not have to just check for the existence of classes you
> > may later remove, when all I care about is that the version be >= 1.4.
> > 
> > Please CC me any response as I am not subscribed to the list.
> 
> There getAntVersion() in Main.java -- but I'm not all that up on Java, so
> I'm not sure if it's one of those can't-get-to-it things or not.
> Otherwise, since ant.version is a property, I should think you should be
> able to use getProperty() on it.

I'll look into trying to read the property file in ant.jar, but 
getAntVersion () is not introduced until v1.4!  Maybe I can just
try to get the getAntVersion () method and if that fails, I know
I'm pre-1.4, and if it succeeds, then I can call it.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>