ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6309] - <script> task does not work with XmlLogger
Date Thu, 14 Feb 2002 13:31:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6309>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6309

<script> task does not work with XmlLogger

conor@cortexebusiness.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From conor@cortexebusiness.com.au  2002-02-14 13:31 -------
You are not completely configuring the tasks. Your script should look like this
<project name="tmp" default="script" basedir=".">
  <target name="script">
    <script language="javascript"> <![CDATA[
          for (i=1; i<=10; i++) {
            echo = tmp.createTask("echo");
            script.addTask(echo);
            echo.setOwningTarget(script);
            echo.setMessage(i*i);
          }
      ]]> </script>
    </target>
</project>

Since you were not setting the owning target, the XmlLogger, which needs to
relate the task to its surrounding target was getting confused. I have patched
XMLLogger to handle ill-configured tasks.

Let me also note that adding tasks to the current target is a rather dangerous
practice. Underneath you are adding objects to a collection which is being
iterated over. About all I can say is "It works at present."

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message