ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: Syntax for Names: target, property, macrodef, etc.
Date Thu, 30 Jun 2011 13:31:47 GMT
On Thu, Jun 30, 2011 at 6:51 AM, Steve Amerige <> wrote:
> I'm looking for the authoritative specification within Ant for the value of
> the name attribute as in:
> <property name="xxx" .../>
> <macrodef name="xxx" ...>
> <target name="xxx" ...>
> and so forth.  I can't find within the Ant manual any BNF that defines what
> a valid name is allowed to be.

Anything goes really, AFAIK. There is no specifications.

Some names will create issues, for example <target name="-foo"> can't
be called from the command line because -foo will be interpreted as a
CLI switch and since not found Ant will error out. This "behavior" is
relied upon to have "private" targets.

Also remember this is XML land, so attribute whitespace normalization
will apply (depending on the parser used possibly) which may result in
some whitespaces being removed.

But aside from these quirks, Ant does not put any restrictions on
names in general. --DD

PS: Also keep in mind that property expansion does occurs inside these
names, but I assume you mean the names after expansion.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message