It's all about the answers!

Ask a question

Executing ANT tasks before Build System fetch code from SCM


Jose Miguel Ordax Cassa (2.4k4126100) | asked Nov 11 '09, 2:38 a.m.
Is there any way to insert the execution of ANT tasks before the
built-in fetch tasks are executed? I need to do automatically some
delivers before that...

I understand I will have to disable the built-in fetch support and do it
myself, right? But I would like to be sure before that, that there is no
other solutions.

Thanks in advance,

Chemi.

2 answers



permanent link
David Olsen (5237) | answered Nov 11 '09, 7:53 p.m.
JAZZ DEVELOPER
Chemi wrote:
Is there any way to insert the execution of ANT tasks before the
built-in fetch tasks are executed? I need to do automatically some
delivers before that...

Not that I know of.

I understand I will have to disable the built-in fetch support and do
it myself, right? But I would like to be sure before that, that there
is no other solutions.

That's what you'll have to do. All of the accept/fetch work that the
build engine does before starting the build can be done by the build
script using the Ant tasks in the build toolkit (except for canceling
the build if there are no changes to accept).

permanent link
Nick Edgar (6.5k711) | answered Nov 12 '09, 3:35 p.m.
JAZZ DEVELOPER
David is correct. You can use the teamAccept and teamFetch Ant tasks, but since this precludes doing the pre-build check for whether there are changes to accept, you will lose the feature whereby scheduled builds get discarded if there are no new changes to accept.

The teamAccept task can, however, indicate whether changes were accepted via the changesAcceptedProperty attribute, so you could check this and avoid extra work. If no changes are accepted, the given property is unset (which is consistent with how Ant handles conditional targets; see the Targets section at http://ant.apache.org/manual/using.html).

See also 69934: Generic pre-build participant support.

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.