aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant and its verion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant and its verion" Watch "Ant and its verion" New topic
Author

Ant and its verion

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

It is posible to check the ant verion using ant tasks ?


SCJP, SCJD, SCWCD, OCPJBCD
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336



JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

this is a command line , I mean get the ant version using ant tasks.
A ant task is something like :
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Hmm. Not sure why you would need this - but I assume you have a reason. One way people test software versions is to look for a known file in the product's file structure and set a property if its available. I don't know how viable this approach is with ant - since i can't think of anything you could consistantly test on, other than added jar libs, and not all ant version got new libs.

There's no task available with ant to do check the version. However the version is an implicit property, so you could do some pattern matching against the property "ant.version". Have a look at the "contains" condition in the docs.
[ November 24, 2004: Message edited by: Paul Sturrock ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant and its verion