https://issues.apache.org/bugzilla/show_bug.cgi?id=24231

--- Comment #16 from Jesse Glick <[email protected]> 2010-02-26 17:16:56 UTC 
---
(In reply to comment #13)
> the side effect of 
> allowing targets with names beginning with - to be specified from the command 
> line

As I described in Bug 48823, I think this is a good thing. The use of '-' as an
initial character to mark "internal" targets is a more or less established
convention: it indicates the script author's intent that calling the target
directly is unlikely to be useful.

But there is no sense in which it was ever impossible to run internal targets,
i.e. there was no hard encapsulation; <antcall> or any program embedding Ant
could invoke them. (For example, the NetBeans IDE does not offer Run in the
context menu of an internal target node, but Run > Advanced... under the build
script node lets you type in target names to run, which are never parsed as Ant
options.) The situation was perhaps comparable to a Java private method: it is
clearly not intended to be run directly, but (SecurityManager permitting) you
can still do so via reflection if you know what you are doing.

Being able to run 'ant -- -internal-target' can be helpful for testing by the
person who wrote the target, and it provides a sure way for a script to invoke
Ant with a dynamically determined target without risk of misinterpretation as
an option - which is why well-written scripts calling e.g. /usr/bin/rm use --
before the file list.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to