You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Jens v.P." <de...@jevopi.de> on 2001/12/12 14:45:32 UTC

calling "-projecthelp"

Hello,

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>


Best regards,
 Jens


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: calling "-projecthelp"

Posted by Peter Donald <pe...@apache.org>.
On Thu, 13 Dec 2001 00:45, Jens v.P. wrote:
> Hello,
>
> 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>

How about

<target name="usage" depends="help">
<target name="help">
        <echo>Run ant -projecthelp for description of targets in 
project</echo>
</target>

-- 
Cheers,

Pete

------------------------------------------------
 "No. Try not. Do. Or do not. There is no try." 
                                     -- Yoda 
------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re[2]: calling "-projecthelp"

Posted by "Jens v.P." <de...@jevopi.de>.
Hello Diane,

Wednesday, December 12, 2001, 7:33:26 PM, you wrote:

DH> (Then again, I'm not sure
DH> that running 'ant help' is really all that big of a win over just running
DH> 'ant -projecthelp')

Thank you for your hints. Of course it's possible to call
"ant -projecthelp" - but only if you know ant ;-)
I'm going to place my "help" into the build.bat/build.sh and call
"ant -projecthelp" whenever no argument is used. So, users who are not
familiar with ant get the help they need.

Jens


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: calling "-projecthelp"

Posted by Diane Holt <ho...@yahoo.com>.
--- "Jens v.P." <de...@jevopi.de> 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')

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>