Skip to Content
Ant: The Definitive Guide
book

Ant: The Definitive Guide

by Eric M. Burke, Jesse Tilly
May 2002
Intermediate to advanced
288 pages
10h 50m
English
O'Reilly Media, Inc.
Content preview from Ant: The Definitive Guide

Name

ant

Synopsis

Invokes Ant on a specific target in another buildfile. This is particularly useful for large projects that break up the build process into multiple Ant buildfiles, each of which builds a smaller portion of the overall application.

It instantiates a new Ant project (as an instance of the org.apache.tools.ant.Project class). The way that properties propagate from the calling project to the new project has evolved with different versions of Ant. In Ant 1.1, the properties of the calling project are visible in the new project. If both projects define the same property, the calling project takes precedence. Ant 1.2 added the ability to specify nested <property> elements as shown later in this section, and Ant 1.4 added the inheritall attribute.

This task sets the ant.file property in the newly created Project object to the same value as the calling project, which is the name of the buildfile.

Attributes

antfile (all, String, N)

The name of the buildfile to invoke. Defaults to build.xml.

dir (all, File, N)

The base directory used by the new project; the antfile attribute is relative to the directory specified by dir. Defaults to the current working directory.

inheritall (1.4, boolean, N)

Controls how properties are passed from the current project to the new project. Defaults to true, meaning that all properties in the current project are available in the new project. This is how Ant versions prior to 1.4 work. If set to false, properties defined in the current project are not ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Ant in Action

Ant in Action

Steve Loughran, Erik Hatcher
Ant Developer’s Handbook

Ant Developer’s Handbook

Alan Williamson, Kirk Pepperdine, Joey Gibson, Andrew Wu

Publisher Resources

ISBN: 0596001843Catalog PageErrata