![]() ![]() ➀ The project has a name and default target The target can contain multiple tasks, which contain the actual “commands” to get things done.Īnt targets correspond, roughly, to make’s “artificial targets”. The project has a name and a default target.Īt its heart, a build file is a collection of targets.Ī target is an XML element and, as attributes, has a name and, optionally,.Also -file or -buildfile -D property= value Sets a property (similar to make’s variables) 2 Build Files f filename Use filename instead of the default build.xml. “Keep going.” Don’t stop the build at the first failue, but continue building any required targets that do not depend on the one whose construction has failed. If no target is given, ant builds a target explicitly listed in build.xml as a default for the project. The ant command can name any target to be built, e.g., ant setup The makefile syntax is arcane and hard to work with.Īnt looks for its instructions in a file named, by default, build.xml Some will feel that ant is too high-levelīut this is the apparent rationale for moving the focus from file dependencies to task dependencies. Some feel that make is too low-level with its focus on individual files Path lists are system-dependent ( : in *nix versus in Windows).Paths are system-dependent ( / in *nix versus \ in Windows, legal characters, quoting rules).Commands themselves are system-dependent (e.g., mkdir, cp, chmod.The commands that people write into their makefile rules are generally not portable either: Make works by issuing commands to /bin/sh Quickly became a standard tool for Java projectsĪnt is actually an acronym for Another Neat Tool.īut why do we need “another” tool, however neat, for build management? We will look at how ant could be applied to some of our sample projects.Īnt devised by James Davidson of Sun, contributed to Apache project (along with what would eventually become TomCat), released in 2000 We will look at the task-based build model implemented by ant at how this differs from the dependency-based model of make, and at how to describe projects to the ant tool. In this lesson we look at how ant addresses a number of shortcomings of make. Ant is a build manager based upon a task dependency graph expressed in an XML file ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |