I dont know any buildin way. But the targets are hold in a Hashtable on 
Project, so you could do

<script language="javascript"> <![CDATA[
    // import statements
    sb = new java.lang.StringBuffer();
    for(e=project.getTargets().keys(); e.hasMoreElements(); ) {
        sb.append(e.nextElement());
        if (e.hasMoreElements()) sb.append(";");
    }
    project.setNewProperty("targets",  sb.toString() );
]]></script>
<echo>
  Targets
  ${targets}
</echo> 


Jan


>-----Ursprüngliche Nachricht-----
>Von: Narahari 'n' Savitha [mailto:[EMAIL PROTECTED] 
>Gesendet: Dienstag, 5. Dezember 2006 16:24
>An: Ant Users List
>Betreff: Re: list all targets in the build file
>
>Ok, thats not what I want.
>
>I want to be able to get this list of targets into a property, 
>so it can be used to make other decisons later on.
>
>-Narahari
>
>
>On 12/5/06, [EMAIL PROTECTED] 
><[EMAIL PROTECTED]> wrote:
>>
>> With "ant -h" you'll get a list of all Ant's options ...
>>
>> Jan
>>
>> >-----Ursprüngliche Nachricht-----
>> >Von: Wayne Cannon [mailto:[EMAIL PROTECTED]
>> >Gesendet: Montag, 4. Dezember 2006 23:16
>> >An: Ant Users List
>> >Betreff: Re: list all targets in the build file
>> >
>> >ant -p
>> >
>> >Narahari 'n' Savitha wrote:
>> >> Freinds
>> >>
>> >> Would you know how to list all the targets in the build file ?
>> >>
>> >> -Narahari
>> >>
>> >
>> 
>>---------------------------------------------------------------------
>> >To unsubscribe, e-mail: [EMAIL PROTECTED] For 
>> >additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED] For 
>additional 
>> commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to