Ok, But if these tasks are one time only can you please explain what the difference is when I have an actual build.xml containing
<target name="all"> <cvs command="version" cvsroot=":pserver:cvs-user@<my hostname here>:2401:/Repository" dest="c:\temp" /> <cvs command="ls" cvsroot=":pserver:cvs-user@<my hostname here>:2401:/Repository" dest="c:\temp" /> </target> How is the execution of these two separate Tasks in a single Target object handled differently than when I programmatically create a Target object with 2 separate Task object instances that fail in the same way? I mean, I did not find any code in which the "state" (if any) was reset between task execution and yet there seems to be a subtle difference between the two. In addition, when not writing to a file but to a Stream, the Stream is closed after the command has been executed (which I found out when my System.out.println didn't work anymore after I had set the OutputStream of the AbstractCvsTask to System.out. This causes that the next command does not produce any output because the Stream was closed by the previous command. Since there's no way to reopen a Stream, I worked around it, by setting the OutputStream to a new OutputStream object which delegates the write(int b) method to System.out instead of setting the OutputStream of the AbstractCvsTask directly to System.out. This way MY Stream is closed and not System.out. But still it feels like a hack.. Thanks, Raymond > -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Antoine > Levy-Lambert > Sent: Friday, June 17, 2005 08:39 > To: user@ant.apache.org > Subject: Re: AbstractCvsTask not executing second command??? > > Jeffrey E Care wrote: > > Ant tasks are generally one-time use only. > > > Well, actually, when they cannot be executed twice in a row, > it often means that they are buggy, because some instance > variables modified by the execution of the task are not reset > to their value before the execution of the task. > > @Brandon > > In your particular case, since there is a special task called > cvsversion, you might want to use it instead of using the > generic cvs task with "version" as command. > > Antoine > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > -- The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]