ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris <>
Subject Getting Ant property from Java class
Date Wed, 25 Jul 2007 22:07:24 GMT
How do I set a property equal to a value obtained from a Java class?

For example, in our app we define the version in a constant:

class MyClass {
     static public final String VERSION = "1.0";

In build.xml, I'd like to assign a version property:

     value="(somehow get this from MyClass.VERSION)" />

and then use it to, say, name the .jar file:

<jar destfile="/mydir/myapp-${my_version}.jar">
     <fileset etc...>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message