Specifying an External Library Location Using Build Path Variable
You can use variables (aliases) to specify an external library location in project build path to build a project using TIBCO BusinessEvents Studio. You can store the third-party JARs, custom function JARs, and .projlib files in different locations on your local machines and refer to them through aliases. To perform common builds on a build machine, the aliases are used to create the full path to common JAR files.
Procedure
Result
<thirdpartyLibEntries entryType="Third Party" path="EmsJars/jms.jar" timestamp="1327712526000" var="true"> <nativeLibraryLocation/> </thirdpartyLibEntries>The value var="true" specifies that the first part of the path is resolved as a configured variable. Other users can also use the same .beproject file, but they must create the variable that is being used if it does not already exist.
Define the value of that variable on your local machine (for example, C:\dev\mycustomjars\), and similarly define the value on the build machine. Thus, there are no hard-coded paths to the custom function, third-party JAR files, or project library entries, but only the relative ones.
- Using classpath (-cp) option - In the command-line specify the path of the JAR files in the
-cp command line option for the classpath. For example:
studio-tools.exe -cp c:\logs\677138\cf-logger51.jar -core buildEar -o c:\temp\hello.ear -p C:\Logs\677138\HelloWorld_with_CustomFunction
- Using the
studio-tools.tra file - In the
studio-tools.tra file, which is used to build the EAR file on the build machine, add the following property for each defined variable:
java.property.CUSTOM_HOME=C:/Logs/677138/
where, CUSTOM_HOME is the name of the variable.
Now you can build EAR without specifying classpath in the command, for example:studio-tools.exe -core buildEar -o c:\temp\hello.ear -p C:\Logs\677138\HelloWorld_with_CustomFunction