#6 buffer persistance

closed
nobody
None
5
2007-05-04
2006-12-05
Daniel Blezek
No

Buffers do not appear to persist across <antcall>

This can be seen in the demo buffer code, replace depends="cut" with <antcall target="cut"/>:

<target name="cut">
<xmltask source="input.xml" dest="1.xml >
<cut path="web/servlet/context/config[@id='4']" buffer="storedXml" />
</xmltask>
</target>

<target name="paste">
<antcall task="cut"/>
<xmltask source="input.xml" dest="output.xml >
<paste path="web/servlet/context/config[@id='5'] buffer="storedXml" />
</xmltask>
</target>

Discussion

  • Brian Agnew
    Brian Agnew
    2007-01-24

    Logged In: YES
    user_id=521055
    Originator: NO

    Apologies for the delay in replying to this. I've managed to reproduce the above.

    I think the issue is that XMLTask is maintaining buffers in a classloader-scoped in-memory store, and Ant will perform various tricks using classloaders. This has been the source of some issues for XMLTask. I believe XMLTask is the only Ant task to try and maintain state in-memory across multiple Ant task calls.

    I suspect the only way around this is to allow XMLTask to store buffers persistently in a filestore or similar. That won't get done for the moment, but is definitely on the to-do list.

     
  • Brian Agnew
    Brian Agnew
    2007-05-04

    • status: open --> closed
     
  • Brian Agnew
    Brian Agnew
    2007-05-04

    Logged In: YES
    user_id=521055
    Originator: NO

    Now fixed in xmltask 1.15 using buffer file persistence