It's all about the answers!

Ask a question

Publish build log if build fails.

Jeff Foege (45266960) | asked Dec 01 '11, 1:32 p.m.
I have a working ant script that does a VisStudio build and unit tests. If there are no compile errors everything works fine including publishing the build log. However if there is a compile error my build log doesn't seem to get published. I used to have the publish log step in the same target as the compile. I thought if I moved the publish log section to its own target that it would publish the log to RTC even if the compile fails. It appears like if the compile fails that the ant script stops. I need to get that log published no matter what the build status is so the developers can view the log if need be.

Thanks for any help/advice.


One answer

permanent link
Nick Edgar (6.5k711) | answered Dec 01 '11, 11:01 p.m.
I suggest using this approach:

Alternatively, you could move the compilation steps to a separate build file and use the subant task with failonerror="false" from the outer script, which will also do the publishing.

Your answer

Register or to post your answer.