Just a quick shot ...
E.g. it doesnt recognizes TaskContainers (needs recursive search), so 
constructs like
  <parallel>
      <sequential>
          <echo> 1 </echo>
          <echo> 2 </echo>
      </sequential>
      <echo> 3 </echo>
  </parallel>
are found (only "parallel" will be found).


Jan



<project>

<scriptdef name="printTasks" language="javascript">
<![CDATA[
    allTasks = new java.util.TreeSet();

    // collect all tasks
    targets = project.getTargets();
    en = targets.elements();
    while (en.hasMoreElements()) {
        target = en.nextElement();
        // array of all tasks in that target
        tasksInTarget = target.getTasks();
        for (i=0; i<tasksInTarget.length; i++) {
            allTasks.add(tasksInTarget[i].getTaskName());
        }
    }

    // print out
    for (it=allTasks.iterator(); it.hasNext(); ) {
        java.lang.System.out.println(it.next());
    }
]]>
</scriptdef>

<printTasks/>


    <target name="-hidden" description="just a container for some tasks">
        <echo/>
        <tstamp/>
        <echo/>
        <script language="javascript"/>
    </target>

</project>

 

>-----Ursprüngliche Nachricht-----
>Von: Thomas Matthijs [mailto:[EMAIL PROTECTED] 
>Gesendet: Freitag, 7. Oktober 2005 22:46
>An: user@ant.apache.org
>Betreff: Used tasks
>
>Hello,
>
>I'm trying to find a way to list all tasks a specific 
>build.xml uses. Though a listener you can easily find the ones 
>that get run. 
>But i'd like to know all of them that the build file could 
>possibly run.
>
>Been digging thought the code, but its comfusing me, and hints 
>where too start?
>
>Thanks
>
>
>---------------------------------------------------------------------
>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