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

Executing targets for a build twice?

We're using Jazz Build Engine for our builds which are builidng an IM offering. The build is set up to do a buildEnginePrep, build, package and publish. However, I need to do this once and then copy some mock translation files that are displayed by IM and then perform the build again during the same build. I created targets called build-real and build-mock which build-all depends on. I only do the buildEnginePrep for build-real which executes first. Everything does fine for the build-real, however, the build-mock calls the build target, but that target seems to just return the second time without executing. The log file just shows it returning. What do I need to do to get the targets to execute twice?

0 votes



2 answers

Permanent link
On 5/7/12 6:08 , rossa wrote:
Everything does fine for the
build-real, however, the build-mock calls the build target, but that
target seems to just return the second time without executing. The
log file just shows it returning. What do I need to do to get the
targets to execute twice?

You didn't say what scripting language your build script is written in,
so I will assume Ant. If it's something else, then this answer doesn't
apply.

To have an Ant target run twice, you need to use <antcall> within the
body of a target rather than using the depends="..." mechanism in the
header of the target. If the target has to be called at the correct
time, it may take some thought to organize your Ant script in just the
right way.

--
David Olsen | IBM Rational | Jazz Process Team

0 votes


Permanent link
On 5/7/12 6:08 , rossa wrote:
Everything does fine for the
build-real, however, the build-mock calls the build target, but that
target seems to just return the second time without executing. The
log file just shows it returning. What do I need to do to get the
targets to execute twice?



You didn't say what scripting language your build script is written in,
so I will assume Ant. If it's something else, then this answer doesn't
apply.

To have an Ant target run twice, you need to use <antcall> within the
body of a target rather than using the depends="..." mechanism in the
header of the target. If the target has to be called at the correct
time, it may take some thought to organize your Ant script in just the
right way.

--
David Olsen | IBM Rational | Jazz Process Team


Well, that is embarrassing. You are absolutely right and it makes sense now that you've mentioned it. Thanks!

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: May 07 '12, 8:57 a.m.

Question was seen: 6,649 times

Last updated: May 07 '12, 8:57 a.m.

Confirmation Cancel Confirm