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: Used tasks
Date Fri, 14 Oct 2005 07:40:13 GMT
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:lists@keanu.be] 
>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: 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