...I don't know if it really works, but for me it seems to be a better way,
to execute tasks directly from script instead of setup another target,
if you use <script> to do some logical decisions - isn't it ? (see sample !)

this:

    <target name="script">
        <script language="javascript"> <![CDATA[
           function print(msg) {
               echo = TestProject.createTask("echo");
               echo.setMessage(msg);
               echo.execute();
           }
           print("hello world");
        ]]> </script>
    </target>

instead of:

    <target name="prescript">
        <script language="javascript"> <![CDATA[
           function print(msg) {
               echo = TestProject.createTask("echo");
               script.addTask(echo);
               echo.setMessage(msg);
           }
           print("hello world");
        ]]> </script>
    </target>

    <target name="script" depends="prescript" />

--
mit freundlichen grüßen / best regards
marco struck
----------------------------------------------------
email: mailto:[EMAIL PROTECTED]

public key: http://www.nexolution.de/keys/public/mstruck.asc
fingerprint: CC99 1171 0F0F E7F4 D649  D332 3C84 8C3C E80E 7EAA
 

Reply via email to