Property to set to true if compilation failsĬomma separated list of files that must be excluded from compilation. Whether source should compile with deprecation information Used in the -g parameter for the compilerĮnables dependency tracking on jikes and classic compilers Defaults to offĬan be lines, var or source. Whether source should be compiled with debug information (-g parameter). Location of bootstrap class files or reference to a predefined pathĬlasspath to use for compilation or reference to a predefined pathĬompiler implementation to use. This section gives a complete reference of all tasks and their attributes that are most commonly used by Java Developers.Ĭompilation is achieved with the task. The following sections list out the most commonly used tasks in Ant build scripts. List of targets specified in the command line when invoking this project Additionally, the following built-in properties are available: Property Name Prefix to apply to properties loaded using file, resource or urlĪll system properties that can be accessed from the System.getProperties() methods in Java can be used in Ant. Prefix to use when accessing environment variables
![how to use apache ant how to use apache ant](https://image.slidesharecdn.com/apacheant-090308134221-phpapp01/95/apache-ant-70-728.jpg)
The classpath to use when looking up a resource The basedir to calculate the relative path from Location in the classpath of the properties file If the value passed through is not an absolute path it will be made relative to the project basedir Properties can be defined within the build script or in separate property files to provide more customizable build scripts. The name of a property which must not be set for this target to runĪdd the target to the depends list of the named extension point The name of a property which must be set for this target to run Table 1: Project element attributes AttributeĬomma separated list of other targets that this target depends on The default target to run when no other target has been specified Attributeīase directory from which all path calculations are done
![how to use apache ant how to use apache ant](https://2.bp.blogspot.com/-kmF7KrjFPJY/UmXT2TzNZqI/AAAAAAAAAps/Bdc0QSk8yHE/s1600/ApacheAnt.png)
![how to use apache ant how to use apache ant](https://i.ytimg.com/vi/1aiB64QoEn4/maxresdefault.jpg)
When running, Ant resolves these dependencies so that your script gets executed in the order you have specified. The most important concept in Ant is that of dependencies. The project element can specify a default target if no target is chosen during execution of the build script.įigure 1: The basic structure of an Ant build script. A target contains a set of tasks to be executed. Within the project element there are one or more targets specified. The root element of the build script is the project tag. A typical Ant script consists of a single build.xml file.