How to specify an external library location to build using studio-tools in TIBCO BusinessEvents (BE) 5.2. and above.

How to specify an external library location to build using studio-tools in TIBCO BusinessEvents (BE) 5.2. and above.

book

Article ID: KB0084437

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Description:
Developers can store their "third party" JARs, custom function JARs and ".projlib" files in different locations on their local machines and refer to them via aliases. To perform common builds on a build machine, the aliases are used to create the full path to common JAR files.

Resolution

BusinessEvents 5.2 does support the use of build path variables ("aliases") in its project build path. Note that the specification of aliases has changed between BE 5.1.x and BE 5.2.2.  This is done with the following procedure.

- In Studio under Project/Properties, select Build Path and click on Custom Functions and Add Variable (i.e. CUSTOM_HOME). This variable is used as a placeholder in the build path. Each developer would then define the value of that variable on their local machine (i.e., C:\dev\mycustomjars\), and on the build machine the same would be done. This way there are no hard coded paths to the custom function/3rd party/project library entries, only relative ones. There are two methods used to specify where to find the JAR files. 

1). On the command line they are added to the -cp command line option for the classpath, i.e.,  .\studio-tools.exe -cp c:\logs\677138\cf-logger
51.jar -core buildEar -o c:\temp\hello.ear -p C:\Logs\677138\HelloWorld_with_CustomFunction

2). In the studio-tools.tra file used to build the ear on the build machine, add the following property for each defined variable.

3). On the command line they are added to the -cp command line option for the classpath, i.e. .\studio-tools.exe -cp c:\logs\677138\cf-logger
51.jar -core buildEar -o c:\temp\hello.ear -p C:\Logs\677138\HelloWorld_with_CustomFunction

4). In the studio-tools.tra file used to build the EAR on the build machine, add the following property for each defined variable. 
Note that forward slashes are used in the studio-tools.tra path.

java.property.CUSTOM_HOME=C:/Logs/677138/  where CUSTOM_HOME is the name of the variable.  Do not put the name of the JAR file at the end.


Issue/Introduction

How to specify an external library location to build using studio-tools in TIBCO BusinessEvents (BE) 5.2. and above.