Ant

Description

Runs Ant on a supplied buildfile. This can be used to build subprojects.

When the antfile attribute is omitted, the file "build.xml" in the supplied directory (dir attribute) is used.

If no target attribute is supplied, the default target of the new project is used.

The properties of the current project will be available in the new project. These properties will override the properties that are set in the new project. (See also the property task). You can set properties in the new project from the old project by using nested property tags. This allows you to parameterize your subprojects.

Parameters

Attribute Description Required
antfile the buildfile to use. Defaults to "build.xml". No
dir the directory to use as a basedir for the new Ant project. Defaults to the current directory. No
target the target of the new Ant project that should be executed. No
output Filename to write the ant output to. No

Examples

  <ant antfile="subproject/subbuild.xml" dir="subproject" target="compile"/>

  <ant dir="subproject"/>

  <ant antfile="subproject/property_based_subbuild.xml">
    <property name="param1" value="version 1.x"/>
    <property file="config/subproject/default.properties"/>
  </ant>

Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.