Re: [Xmltask-users] Adding contents to a buffer accross several <xmltask> invocations
Brought to you by:
bagnew
From: Holger R. <hol...@he...> - 2008-03-25 16:06:25
|
Rehi, forgot to mention that I'm using JDK 1.5, Xmltask 1.15.1, and Ant 1.7.0. Sorry. On Tue, 25 Mar 2008, Holger Rauch wrote: > Hi, > > I'm trying to add (insert) several XML fragments into the same buffer, but > accross multiple <xmltask> invocations like this: > > 1st invocation: > > <xmltask destbuffer="esbcglobalsetup"> > <insert path="/"><![CDATA[<project name="repconf" basedir="."></project>]]></insert> > </xmltask> > > 2nd, etc. invocation(s): > > <xmltask destbuffer="esbcglobalsetup"> > <insert path="/project" > expandProperties="true"><![CDATA[<property name="user.target.country" value="${user.target.country}" />]]></insert> > <insert path="/project" > expandProperties="true"><![CDATA[<property name="country.abbrev" value="${country.abbrev}" />]]></insert> > <insert path="/project" > expandProperties="true"><![CDATA[<property name="aviation.authority" value="${aviation.authority}" />]]></insert> > </xmltask> > > Printing the buffer after the final addition and making Ant fail on purpose: > > <xmltask> > <print buffer="esbcglobalsetup" comment="Contents of esbcglobalsetup" /> > </xmltask> > > <fail message="*** Failing on purpose ***" /> > > [xmltask] java.lang.NullPointerException > [xmltask] at > com.oopsconsultancy.xmltask.BufferStore.set(BufferStore.java:174) > [xmltask] at > com.oopsconsultancy.xmltask.ant.XmlTask.processDoc(XmlTask.java:715) > [xmltask] at > com.oopsconsultancy.xmltask.ant.XmlTask.execute(XmlTask.java:674) > [xmltask] at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > [xmltask] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown > Source) > [xmltask] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [xmltask] at java.lang.reflect.Method.invoke(Method.java:585) > [xmltask] at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > [xmltask] at org.apache.tools.ant.Task.perform(Task.java:348) > [xmltask] at org.apache.tools.ant.Target.execute(Target.java:357) > [xmltask] at org.apache.tools.ant.Target.performTasks(Target.java:385) > [xmltask] at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > [xmltask] at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > [xmltask] at > org.apache.tools.ant.Project.executeTargets(Project.java:1181) > [xmltask] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > [xmltask] at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > [xmltask] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown > Source) > [xmltask] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [xmltask] at java.lang.reflect.Method.invoke(Method.java:585) > [xmltask] at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > [xmltask] at org.apache.tools.ant.Task.perform(Task.java:348) > [xmltask] at > org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) > [xmltask] at > net.sf.antcontrib.logic.IfTask$ElseIf.execute(IfTask.java:144) > [xmltask] at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:211) > [xmltask] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > [xmltask] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [xmltask] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [xmltask] at java.lang.reflect.Method.invoke(Method.java:585) > [xmltask] at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > [xmltask] at > org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:134) > > BUILD FAILED > /home/hrauch/eap-trunk-new/EmpicSuite-trunk/build-scripts/common-includes/common-global-setup.xml:225: > null > > (line 225 is the beginning of the 2nd <insert> fragment). > > Any hints why this happens and how I can work around it? > > Any info/pointers on the above issue will be appreciated. > > Kind regards, > > Holger > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Xmltask-users mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmltask-users -- ========================================= Holger Rauch Entwicklung Anwendungs-Software Systemadministration UNIX Tel.: +49 / 9131 / 877 - 141 Fax: +49 / 9131 / 877 - 136 Email: Hol...@he... ========================================= |