It's all about the answers!

Ask a question

ant build toolkit: WorkItemPublisherTask


Baris Erdemir (1812819) | asked Jan 04 '11, 12:20 p.m.
hi,
I want to publish work items in build result.
I am trying giving workitem file as input but it does not work.
The format in input file is work item number per line (not UUID)

I defined the task as follows:
<taskdef
name="workItemPublisher" classname="com.ibm.team.build.ant.task.WorkItemPublisherTask" />

I am calling the task as follows:

<workItemPublisher
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
inputFileType="WORKITEM"
filePath="C:\rtc\wi.txt" />

I am getting following comment in build log:
An Ant BuildException has occured: The following error occurred while executing this line:
C:\rtc\scripts\antTasks.xml:45: Class com.ibm.team.build.ant.task.WorkItemPublisherTask doesn't support the "inputfiletype" attribute.

Note: I am using link publisher task successfully at same environment as follows:

<linkPublisher
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
url="${function_list}"
label="external link" />

can you please provide an example usage? I prefer giving input parameters as string. But if not possible, I can do it with a password file.

Thank you

4 answers



permanent link
Nick Edgar (6.5k711) | answered Jan 05 '11, 9:58 a.m.
JAZZ DEVELOPER
Hi Baris,

This looks OK to me. It should work. The workItemPublisher task does accept an inputFileType attribute, and the "WORKITEM" value is valid. Not sure why it's saying otherwise.

Could you try running Ant using the JDK included with the RTC eclipse client?
This can be set in the 'Java home' field in the Ant page of the build definition.
Alternatively (and assuming you're using JBE), run JBE using that JDK. JBE's invocation of Ant uses the same JDK by default.
See https://jazz.net/wiki/bin/view/Main/BuildFAQ#WhichJDK

permanent link
Nick Edgar (6.5k711) | answered Jan 05 '11, 9:59 a.m.
JAZZ DEVELOPER
You could also try adding verbose="true", to see if it gives more details (e.g. a stack trace) in the build log.

permanent link
Baris Erdemir (1812819) | answered Jan 05 '11, 10:58 a.m.
Hi Nick, thanks for the answer,
I do not have ant page in my build definition. I am triggering a command line build. then i am calling a bat file which is invoking maven goals, inside maven goals, I am calling ant task.

Why do you think linkPublisher and workItemPublisher will differ in terms of the JDK they are using?

linkPublisher, artifactlinkpublisher and buildresultpublisher are runing successfully at the same environment.


Could you try running Ant using the JDK included with the RTC eclipse client?
This can be set in the 'Java home' field in the Ant page of the build definition.

permanent link
Nick Edgar (6.5k711) | answered Jan 05 '11, 11:22 a.m.
JAZZ DEVELOPER
> Why do you think linkPublisher and workItemPublisher will differ in terms of the JDK they are using?

It's a long shot, but we've seen various phantom bugs occur when using older JDKs, e.g. due to JIT bugs, leaks in the IO libraries, etc. So running with the JDK we ship with is usually my first recommendation, to reduce the variables involved.

Note that we also have a Maven build definition, which might simplify the setup (but wouldn't help with the problem at hand).

Your answer


Register or 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.