Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Publish build log if build fails.

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.

jeff

0 votes



One answer

Permanent link
I suggest using this approach:
http://stackoverflow.com/questions/2819622/try-finally-in-ant

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.
http://ant.apache.org/manual/Tasks/subant.html

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Dec 01 '11, 1:32 p.m.

Question was seen: 4,731 times

Last updated: Dec 01 '11, 1:32 p.m.

Confirmation Cancel Confirm