Sometimes we have targets that are really only useful as a "subroutine" sort of thing. For example, we might have target A that depends on target B, and has an unless attribute for property Foo. Target B consists of an uptodate check and sets property Foo if things are up-to-date. It makes no sense to call target B from the command line. It would be nice if there were an optional attribute on targets that would allow you to mark a target as "for internal use only" and would not show up in ant -projecthelp (even if a description were specified), and would cause an error if called from the command line. This would also make it easier when generating documentation from build scripts to know "public" or "main" targets from the subroutine type targets.
You can use target names with a leading '-' (like "-myprivatetarget") to indicate "private" targets. Those targets can not be called from the commandline. (There is a hint somewhere in the documentation, but I can't remember where). However, IMHO it's a good idea to skip targets with a leading '-' from -projecthelp's processing. Regards, Rainer
It is simple enough to get -p/-projecthelp to ignore your "private" (starting with -) targets: supply description attributes for all "public" targets. Beyond that, I am marking this bug as a duplicate of 20020. *** This bug has been marked as a duplicate of 20020 ***
Grr... I mean 22020.
*** This bug has been marked as a duplicate of 22020 ***