User Tools

Site Tools


ant_properties

Remember: Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definately not variable.

Property Description
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.home home directory of Ant
ant.java.version the JVM version Ant detected; currently it can hold the values “1.2”, “1.3”, “1.4” and “1.5”.
ant.project.name the name of the project that is currently executing; it is set in the name attribute of <project>.
ant.version the version of Ant
java.class.version Java class format version number
java.class.path Java class path
java.ext.dirs Path of extension directory or directories
java.home Java installation directory
java.specification.name JRE specification name
java.specification.vendor JRE specification vendor
java.specification.version JRE specification version
java.vendor JRE vendor
java.vendor.url Java vendor URL
java.version JRE version
java.vm.name JVM implementation name
java.vm.specification.name JVM specification name
java.vm.specification.vendor JVM specification vendor
java.vm.specification.version JVM specification version
java.vm.vendor JVM implementation vendor
java.vm.version JVM implementation version
os.arch Operating system architecture
os.name Operating system name
os.version Operating system version
file.separator File separator (“/” on UNIX)
line.separator Line separator (“\n” on UNIX)
path.separator Path separator (“:” on UNIX)
user.dir User's current working directory
user.home User's home directory
user.name User's account name

System Environment Properties

Your system environment variables are also available as Ant properties:

<property environment="env"/>
<echo>Hostname: ${env.COMPUTERNAME}</echo>
<echo>Path: ${env.PATH}</echo>
/home/thecrumb/wiki.thecrumb.com/data/pages/ant_properties.txt · Last modified: 2017/06/15 20:45 (external edit)