Difference between revisions of "Ant"

From Suhrid.net Wiki
Jump to navigationJump to search
Line 5: Line 5:
 
* As an application's build process becomes more complex, it becomes increasingly important to ''ensure that precisely the same build steps are carried out'' during each build, with as much automation as possible, in order to produce consistent builds in a timely manner.
 
* As an application's build process becomes more complex, it becomes increasingly important to ''ensure that precisely the same build steps are carried out'' during each build, with as much automation as possible, in order to produce consistent builds in a timely manner.
 
* Ant is similar to make in that it defines dependencies between build tasks; however, instead of implementing build tasks using platform-specific shell commands, it uses cross-platform Java classes. With Ant, you can write a single build file that operates consistently on any Java platform (as Ant itself is implemented in the Java language); '''this is Ant's greatest strength'''.
 
* Ant is similar to make in that it defines dependencies between build tasks; however, instead of implementing build tasks using platform-specific shell commands, it uses cross-platform Java classes. With Ant, you can write a single build file that operates consistently on any Java platform (as Ant itself is implemented in the Java language); '''this is Ant's greatest strength'''.
 +
* Build files are written in XML.
 +
* Every build file contains a '''single top-level project''' element.
 +
* The project element consists of a number of target elements. A target is a defined step in a build that performs '''any number of operations''', such as compiling a set of source files.
 +
* The operations themselves are performed by other specialized task tags. ''These tasks are then grouped together into target elements'', as desired.

Revision as of 06:39, 4 June 2012

Intro

  • Ant is designed primarily for building Java projects, but that's not its only use.
  • It is helpful for other tasks, such as performing filesystem operations in a cross-platform way.
  • As an application's build process becomes more complex, it becomes increasingly important to ensure that precisely the same build steps are carried out during each build, with as much automation as possible, in order to produce consistent builds in a timely manner.
  • Ant is similar to make in that it defines dependencies between build tasks; however, instead of implementing build tasks using platform-specific shell commands, it uses cross-platform Java classes. With Ant, you can write a single build file that operates consistently on any Java platform (as Ant itself is implemented in the Java language); this is Ant's greatest strength.
  • Build files are written in XML.
  • Every build file contains a single top-level project element.
  • The project element consists of a number of target elements. A target is a defined step in a build that performs any number of operations, such as compiling a set of source files.
  • The operations themselves are performed by other specialized task tags. These tasks are then grouped together into target elements, as desired.