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

Referencing User-Defined Build Properties in code

Hello,

I've been told it's possible to reference a variable defined in a project's build's properties in the code.

For example, defining a version number in the user-defined values under the build definition, and then referencing this in footer.jsp which is part of the development stream. The idea being that, when the build is created then Jazz would replace the placeholder with the value from build properties (the same way it performs the replace in the ant scripts).

I'm not able to find any doco on this, can anyone confirm if this is possible? Or if there is another mechanism in Jazz to define a "global" variable that can be referenced in the code being delivered, as well as the ant scripts?

Thanks for any help.

0 votes



One answer

Permanent link
Hi,

Maybe you could try to pass the version number from build definition to your build script, set it to an environment variable, then read it into footer.jsp.

Regards,
Makson

Hello,

I've been told it's possible to reference a variable defined in a project's build's properties in the code.

For example, defining a version number in the user-defined values under the build definition, and then referencing this in footer.jsp which is part of the development stream. The idea being that, when the build is created then Jazz would replace the placeholder with the value from build properties (the same way it performs the replace in the ant scripts).

I'm not able to find any doco on this, can anyone confirm if this is possible? Or if there is another mechanism in Jazz to define a "global" variable that can be referenced in the code being delivered, as well as the ant scripts?

Thanks for any help.

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: Dec 18 '11, 11:06 p.m.

Question was seen: 3,769 times

Last updated: Dec 18 '11, 11:06 p.m.

Confirmation Cancel Confirm