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

ant build toolkit: WorkItemPublisherTask

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

0 votes



4 answers

Permanent link
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

0 votes


Permanent link
You could also try adding verbose="true", to see if it gives more details (e.g. a stack trace) in the build log.

0 votes


Permanent link
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.

0 votes


Permanent link
> 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).

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
× 10,950

Question asked: Jan 04 '11, 12:20 p.m.

Question was seen: 8,095 times

Last updated: Jan 04 '11, 12:20 p.m.

Confirmation Cancel Confirm