Hi, in fact there has been a bug reported concerning lines of output which get mixed up.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50507 We should fix it. Regards, Antoine On 1/19/11 3:03 PM, Gilbert Rebhan wrote: > -------- Original Message -------- > Subject: exec (and apply) tasks cut off the output > From: Hudson <hud...@2enter.net> > To: user@ant.apache.org <user@ant.apache.org> > Date: Wed Jan 19 2011 15:10:39 GMT+0100 (CET) > >> Hello, >> >> I try to build my project with the following ant statement. >> <exec executable="devenv.com" failonerror="false" >> resultproperty="buildresult"> >> <arg value="@{testsolution}" /> >> <arg value="/build" /> >> <arg value="Debug" /> >> <arg value="/project" /> >> <arg value="@{project}" /> >> </exec> >> >> There are some lines missing in the output from time to time (~50%). > To make sure to get all output from a excutable use resultproperty (rc), > outputproperty (stdout) and errorproperty (stderror) and then write all > that properties to ant log with <echo>. > > Note, that for whatever reason some executables write stuff to stderr > even if there's no error, f.e. cleartool.exe etc. .. so IMO it's always > good to catch all channels. > > Also i recommend to use failonerror=true, combined with some try catch > construct , see [1] > > Sometimes one has to do even more, f.e if using <exec> with psexec > from Sysinternals on windows to call a remote executable you have to > redirect stdout and stderror to a file and load that file as property > again to get all output from the called executable : > someExecutable > your.log 2>&1 > whereas the returncode comes back to the calling ant script. > > Finally you should use loglevel debug to get more information, > setloglevel task recommended, see [2] = > > <setloglevel level="debug"/> > > <exec executable="devenv.com" failonerror="false" > resultproperty="buildresult"> > <arg value="@{testsolution}" /> > <arg value="/build" /> > <arg value="Debug" /> >> <arg value="/project" /> > <arg value="@{project}" /> > </exec> > > <setloglevel level="info"/> > > also possible to use the normal ant -debug -f yourfile.xml > > > > Regards, Gilbert > > > [1] flaka > http://code.google.com/p/flaka/ > http://flaka.googlecode.com/files/flaka.pdf > > [2] setloglevel task > http://marc.info/?l=ant-user&m=125201552004975&w=2 > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org