Building an EAR File at the Command Line

Procedure

  1. Backup the EAR file. For example, if you generate the asg_core.ear file in the ASG_HOME/bin directory, take a backup of this file.
  2. Navigate to TIBCO_HOME/be/5.2/studio/bin.
  3. Open the studio-tools.tra file for editing.
  4. Append the following parameters to the java.extended.properties property:
    -DTIBCO.BE.function.catalog.http.servlet.getRequestHeaders=true
    For example, the property is modified as follows:

    java.extended.properties=-server -Xms1024m -Xmx1024m -javaagent:%BE_HOME%/lib/cep-base.jar -XX:MaxPermSize=256m -Xbootclasspath/p:%TIB_JAVA_HOME%/lib/tools.jar -DTIBCO.BE.function.catalog.http.servlet.getRequestHeaders=true

  5. Save changes to the studio-tools.tra file.
  6. Open a command prompt.
  7. Execute a command with the following format (all on one line) at a command prompt:
    studio-tools -core buildEar [-h] [-x] [-lc] [-o outputEarFile>] -p studioProjectDir [-pl projectLibrariesFilePath] [-cp extendedClasspath]

    For example:

    studio-tools -core buildEar -x 
    -o C:\tibcoapix220\asg\2.2\bin\asg_core.ear
    -p C:\tibcoapix220\asg\2.2\projects\ASG_DefaultImplementation

    The following table provides detailed information about the options:

    TIBCO BusinessEvents StudioTools Options for Building an EAR File
    Option Description
    -core buildEar Within the core category of operations, specifies the buildear operation for building EAR files.
    -h Optional. Displays help.
    -x Optional. Overwrites the specified output file if it exists.
    -lc Optional. Specifies that the file-based legacy compiler must be used to build the EAR file. By default, the EAR files are built in memory.
    -o Optional. Specifies the filename for the output EAR file. If not specified the EAR file is the same as the final (leaf) directory name in the projectDir path.
    -p Absolute path to the TIBCO BusinessEvents Studio project directory. The EAR file is built using this project.
    -pl Optional. Specifies list of project library file paths to be used, separated by a path separator.
    -cp Optional. Specifies the extended classpath to be used.
    Note: When building an EAR file in memory for a large project, the JVM may run out of PermGenSpace and/or heap space. In such cases, edit the TIBCO_HOME/be/5.2/studio/eclipse/studio.ini and TIBCO_HOME/be/5.2/studio/bin/studio-tools.tra file to set appropriate values for the JVM settings. By default the heap size is set to -XX:MaxPermSize=256m.