Use either the filter/copy tasks or the replace task. Ant's own build file
replaces a @VERSION@ token with the current Ant version.

You can combine this with the propertyfile task to automate the changing of
the version number.

Conor

----- Original Message -----
From: "Will Spies/Towers Perrin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 1:00 AM
Subject: versioning


>
> Does Ant do versioning? For example, let's say I want to stuff into my
> JAR/WAR or EAR some version class like this:
>
> class Version
> {
> protected static String v = <label generated by Ant>;
> public static String getVersion() { return v; }
> }
>
> so that once I've distributed my JAR/WAR or EAR I can tell people to
> execute the method Version.getVersion().
>
> Will Ant help me do this? If not Ant, any suggestion?
>
>
>

Reply via email to