next up previous contents index
Next: Example Buildfile Up: Using Ant Previous: Properties   Contents   Index

Built-in Properties

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

For a list of system properties see the Javadoc of System.getProperties.

In addition, Ant has some built-in properties:

basedir             the absolute path of the project's basedir (as set
                    with the basedir attribute of <project>).
ant.file            the absolute path of the buildfile.
ant.version         the version of Ant
ant.project.name    the name of the project that is currently executing;
                    it is set in the name attribute of <project>.
ant.java.version    the JVM version Ant detected; currently it can hold
                    the values "1.1", "1.2", "1.3" and "1.4".


Andrew Marlow 2003-07-08