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

buildResultPublisher in Ant - warning icon available?

Hi, I'm using the Ant build in RTC.

I'm curious if there is a way to produce a 'warning' state in the build
result instead of just success or fail.

I'm currently using the failOnError attribute in my build activities,
but I'd really like a way to indicate 'warning'.

Is there any way to do this in Ant?

Thanks
Rob

0 votes



3 answers

Permanent link
I believe we used to support that in the BuildResultPublisherTask but took
it out because it had no tracibility to what actually caused the warning
state causing confusion. We switched to a model where the various
publishers would support it so that the state could be tied to the actual
contribution causing the problem. If you look at any of the tasks that
extend from AbstractContentPublisherTask(ArtifactFilePublisherTask,
FilePublisherTask, LogPublisherTask, etc) they all support a "status"
attribute in the task where you can pass in one of "ERROR, WARNING, INFO,
OK" so that a connection is made between the offending contribution and the
status. Other tasks like JdtCompileLogPublisherTask or
JUnitLogPublisherTask do that automatically based on the output they find.
What's the particular case you are looking to set the warning status for?

Don Weinand
Jazz Team Build

"Rob Calendino" <robca> wrote in message
news:gl2lli$err$1@localhost.localdomain...
Hi, I'm using the Ant build in RTC.

I'm curious if there is a way to produce a 'warning' state in the build
result instead of just success or fail.

I'm currently using the failOnError attribute in my build activities, but
I'd really like a way to indicate 'warning'.

Is there any way to do this in Ant?

Thanks
Rob

0 votes


Permanent link
Donald Weinand wrote:
I believe we used to support that in the BuildResultPublisherTask but took
it out because it had no tracibility to what actually caused the warning
state causing confusion. We switched to a model where the various
publishers would support it so that the state could be tied to the actual
contribution causing the problem. If you look at any of the tasks that
extend from AbstractContentPublisherTask(ArtifactFilePublisherTask,
FilePublisherTask, LogPublisherTask, etc) they all support a "status"
attribute in the task where you can pass in one of "ERROR, WARNING, INFO,
OK" so that a connection is made between the offending contribution and the
status. Other tasks like JdtCompileLogPublisherTask or
JUnitLogPublisherTask do that automatically based on the output they find.
What's the particular case you are looking to set the warning status for?

Don Weinand
Jazz Team Build

"Rob Calendino" <robca> wrote in message
news:gl2lli$err$1@localhost.localdomain...
Hi, I'm using the Ant build in RTC.

I'm curious if there is a way to produce a 'warning' state in the build
result instead of just success or fail.

I'm currently using the failOnError attribute in my build activities, but
I'd really like a way to indicate 'warning'.

Is there any way to do this in Ant?

Thanks
Rob



Hi Don, we are using a set of command line calls (we are building a
..net application) I'd like to be able to return a status of warning
instead of just error. here's an example from my build.xml

<Post>
<startBuildActivity>
<exec>
<arg>
<arg>
<arg>
<arg>
<arg>
<arg>
</exec>

notice the failonerror="true" attribute. Essentially i would like to be
able to tell users that warnings exist in the build without failing the
entire build.

Does that make sense?

0 votes


Permanent link
The simplest thing is to publish a log using the logPublisher and set the
status to WARNING. The log content should indicate what the warnings are.
This could be a compile log or a manufactured log. This way, the consumer of
the build result will have an idea what the warning is for.

In order for the build to show up as a warning overall, you need to change
the default setting on the General page of the build definition: uncheck
"Ignore warnings when computing overall status"

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: Jan 19 '09, 2:58 p.m.

Question was seen: 6,433 times

Last updated: Jan 19 '09, 2:58 p.m.

Confirmation Cancel Confirm