A project can have a set of properties. These might be set in the buildfile by the property task, or might be set outside Ant. A property has a name and a value; the name is case-sensitive. Properties may be used in the value of task attributes. This is done by placing the property name between " ${ " and " } " in the attribute value. For example, if there is a "builddir" property with the value "build", then this could be used in an attribute like this: ${builddir}/classes . This is resolved at run-time as build/classes.


Built-in Properties


Ant provides access to all system properties as if they had been defined using a <property> task. For example, Mac OS X expands to the name of the operating system.


For a list of system properties see the Javadoc of System.getProperties . The next section will demonstrate how to use the built in properties in the ANT scripts.

                    

Copyright © 2010 VisualBuilder. All rights reserved