ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Abdelnur <alejandro.abdel...@sun.com>
Subject [PATCH] ant1.4B2 added support for *DEFAULT* target
Date Sun, 02 Sep 2001 02:14:33 GMT

i've modified the executeTarget method of the org.apache.tools.ant.Project class to support
a *DEFAULT* target if a nonexisting target is called, similar to the switch's default.

if the invoked target is not defined in the build file and the "*DEFAULT*" target is
defined, then the "*default*" target is executed, the name of the missing target is stored
in the "target.name" property.

for example:

   <target name="*DEFAULT*" depends="init">
        <echo message="Missing target [${target.name}] delegating to custom.xml"/>
        <ant antfile="custom.xml" target="${target.name}"/>
    </target>

attached you'll find the modified Project.java file.

regards.

a


Mime
View raw message