ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <mlybar...@gmail.com>
Subject Re: valid characters for target names
Date Fri, 10 Jun 2005 20:53:12 GMT
hyphens work quite well for target names. I would guess underscores will 
also work. one trick to having a target that you don't want to be called 
directly is to name it with double hyphens. for example:

<target name="--dont.call.me">
</target>

<target name="call.me" depends="--dont.call.me">
</target>

i hadn't though about quoting the argument, but the shell doesn't like to 
run :

ant -f build.xml --dont.call.me


On 6/9/05, ralapa@spamex.com <ralapa@spamex.com> wrote:
> 
> Hi,
> 
> Could someone please clarify what is a valid characters for
> a target name?
> 
> I have been using spaces in the target names, e.g. "install server",
> because it is more readable, and since I only invoke ant through
> my IDE (IntelliJ) I don't care that spaces make it harder to use on
> the commandline.
> 
> But I was reading the ant manual, and it seemed to say that the
> target names should only be alphanumeric. That seems extreme
> to me. Does that mean you can't use space, hypen, or underscore?
> 
> Thanks,
> -Alex
> 
> 
> "A target name can be any alphanumeric string valid in the encoding of the 
> XML file. The empty string "" is in this set, as is comma "," and space " ". 
> Please avoid using these, as they will not be supported in future Ant 
> versions because of all the confusion they cause. IDE support of unusual 
> target names, or any target name containing spaces, varies with the IDE."
> 
> http://ant.apache.org/manual/using.html#targets
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message