It's all about the answers!

Ask a question

How to determine the current teamarea in ANT (Build.xml)


Hagit Segev (3652) | asked Dec 28 '10, 4:35 a.m.
Hi,
I want to know in which team area am I running the current build.
Is there a property / other way to get data from RTC in ANT (Build.xml)?
Maybe there is a list of data I can use somewhere?
Thanks
Hagit

4 answers



permanent link
Shivank Arya (19141) | answered Jan 03 '11, 6:18 a.m.
JAZZ DEVELOPER
Hi,

Do you need to figure out the associated team area/project area of the build definition on which the build is requested?

Thanks,
Shivank
Jazz Foundation Team

Hi,
I want to know in which team area am I running the current build.
Is there a property / other way to get data from RTC in ANT (Build.xml)?
Maybe there is a list of data I can use somewhere?
Thanks
Hagit

permanent link
Hagit Segev (3652) | answered Jan 10 '11, 9:38 a.m.
Hi Shivank,
Thanks for your reply.
Yes, I want to figure out the associated team area/project area of the build definition on which the build is requested.
I'll also appreciate if you could let me know what else can I know. For example - the stream on which I run, and the user that ran the build (username / sched).
Regards,
Hagit.

Hi,

Do you need to figure out the associated team area/project area of the build definition on which the build is requested?

Thanks,
Shivank
Jazz Foundation Team

Hi,
I want to know in which team area am I running the current build.
Is there a property / other way to get data from RTC in ANT (Build.xml)?
Maybe there is a list of data I can use somewhere?
Thanks
Hagit

permanent link
David Lafreniere (4.8k7) | answered Jan 23 '11, 5:13 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi Shivank,
Thanks for your reply.
Yes, I want to figure out the associated team area/project area of the build definition on which the build is requested.
I'll also appreciate if you could let me know what else can I know. For example - the stream on which I run, and the user that ran the build (username / sched).
Regards,
Hagit.


Hi Hagit,

We have no specific Ant task that returns the team area/project area of the build definition. The list of available ant tasks is available here: http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0/index.jsp?topic=/com.ibm.team.build.doc/topics/r_ant-tasks.html

You can manually see what Project or Team Area a build definition belongs to by opening up the Build Definition in RTC (Eclipse) and looking at the top right of the Build Definition Editor. You can manually see what Stream or Repository workspace the build is using by clicking on the "Jazz Source Control" tab of the Build Definition Editor (under the "Build Workspace" section). If you read the grey text there you will see: "The workspace UUID will be available as the build property 'team.scm.workspaceUUID'. So this answers part of your question, as this value will be automatically available in an Ant task.

If however you really need the team area/project area sent as a property to your Ant script I suggest just adding a new build property in the "Properties" tab of the Build Definition. The only downside of this is that the value would have to be updated if the Build Definition was changed to a different Project or Team Area (however it is generally rare that projects or team areas come and go...). You could have a property for both the human readable name, or the UUID of the project/team area if you wanted.

permanent link
Hagit Segev (3652) | answered Jan 26 '11, 9:16 a.m.
Hi David,
Thank you very much for your reply, and for the Ant attributes link.
I've already implemented your suggestion of having a property with the team area/project area. I don't like this idea very much, but I can live with it.
Hagit.

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.