ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: calling "-projecthelp"
Date Wed, 12 Dec 2001 18:33:26 GMT
--- "Jens v.P." <> wrote:
> I'm looking for a task (or something) that makes it possible
> to output the project help, as it is printed when ant is called with
> "-projecthelp" option.
> Background:
> Usually a target "help" exists. Usually, this target prints exactly
> the same as ant -projecthelp. What I need is something like this:
> <target name="help">
>         <echo>${projecthelp}</echo>
> </target>

If you don't mind the output having [java] in front of each line, you can
use the <java> task to run Ant's Main class with -projecthelp. If you'd
rather have the output not have that, you could use <exec> and capture the
output in the "outputproperty" attribute, then <echo> that property, but
that would also involve platform-dependence. (Then again, I'm not sure
that running 'ant help' is really all that big of a win over just running
'ant -projecthelp')



Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at
or bid at

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

View raw message