ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: list all targets in the build file
Date Tue, 05 Dec 2006 16:15:12 GMT
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:savithari@gmail.com] 
>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, Jan.Materne@rzf.fin-nrw.de 
><Jan.Materne@rzf.fin-nrw.de> wrote:
>>
>> With "ant -h" you'll get a list of all Ant's options ...
>>
>> Jan
>>
>> >-----Urspr√ľngliche Nachricht-----
>> >Von: Wayne Cannon [mailto:wcannon@turinnetworks.com]
>> >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: user-unsubscribe@ant.apache.org For 
>> >additional commands, e-mail: user-help@ant.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>additional 
>> commands, e-mail: user-help@ant.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message