Referencing User-Defined Build Properties in code
![](http://jazz.net/_images/myphoto/b6c8c2feec40c1b1c059a856f95a281c.jpg)
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.
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.
One answer
![](http://jazz.net/_images/myphoto/b6c8c2feec40c1b1c059a856f95a281c.jpg)
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
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.