On Fri, 2006-06-16 at 18:54 +0300, Vitaliy S wrote: > Hello, > > I have target with a task supporting subtasks > e.g > > <copy todir="../dest/dir"> > <!--begin of mutable content --> > <fileset dir="src_dir"> > <exclude name="**/*.java"/> > </fileset> > <!--end of mutable content --> > </copy> > the content of task may be changed but the rest file is immutable. > I want to store mutable content in seporate file. > What is the best way to do it?
Hi Vitaliy, I'm not sure I understand your requirement, but if you are saying that the XML describing the task will change from build to build, and you need to use it, then I'd suggest using <import> to import the mutable part of the task, then having the immutable part of the task call the mutable part using <antcall>. Eg. mutable.xml: <project name="mutable" basedir="."> <target name="mutable.part"> <echo>I change from build to build</echo> </target> </project> build.xml: <project name="build" basedir="."> <import file="mutable.xml"/> <target name="immutable.part"> <echo>I never change from build to build</echo> <antcall target="mutable.part"/> <echo>I also never change</echo> </target> </project> If the mutable part changes _during_ build time, this gets trickier, although it still should be possible to get working, by using the <ant> task to re-import the mutable file. But not fully understanding what you are after, I may be way off here :) Cheers, Ben > > > Regards, > Vitaliy S > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]