Adding resources to a BAR file

To deploy a group of related resources to an integration server, include them in a BAR file.

Before you begin

Create a BAR file for each configuration that you want to deploy. For more information, see Creating a BAR file.

About this task

You can add any deployable resources from the workspace to a BAR file. If you select Add workspace project source files, the source and project files for all message flows, message model schema files, message sets, or other deployable resources in the BAR file are included. If you do not add the source and project files to the BAR file, make sure that you keep a copy of the source and project files because you cannot regenerate the development resources from the compiled resources that are in the BAR file. If you add the source and project files to the BAR file, make sure that you keep a copy of the BAR file because you cannot regenerate the BAR file or from the deployed resources on an integration server.

For more information about the files that you can include in a BAR file, see BAR file contents.

To add files to a BAR file by using the IBM® Integration Toolkit, complete the following steps.

Procedure

  1. Open the BAR file by double-clicking it.
    The contents of the BAR file are shown in the BAR File editor. (If the BAR file is new, this view is empty.)
  2. On the Prepare tab of the BAR File editor, select deployable workspace resources to add to the BAR file:
    • Click Applications, shared libraries, services, and REST APIs to see a list of these resources that can be deployed. If you select an application, shared library, or service, all the contained resources are deployed with that container.
    • Click Message flows, static libraries, and other message flow dependencies to see the individual resources that you can deploy directly to the integration server. After these resources are deployed, they are visible to all other deployed resources in the same integration server.
    Note:
    • If an application refers to a shared library that library must be deployed before or with the application. A shared library can be deployed in the same BAR file as an application that refers to it, or the application and referenced shared library can be deployed in separate BAR files.
    • If an application that you select refers to one or more static libraries, those libraries are added to the application .appzip file as nested .libzip files. These referenced static libraries are private and are not accessible to resources outside the application. Therefore, those static libraries are not selected on the Prepare tab by default. However, if you want to deploy a static library as an integration server-level library, which is accessible to other resources, select the static library to deploy it separately. A .libzip file is created for that static library and added to the BAR file at root level.
    • If you select a static library that refers to other static libraries, those referenced libraries are also added to the BAR file as .libzip files.
    • If the application that you select refers to one or more .NET application domains, those application domains are added to the BAR file at root level as a .appdomainzip file.
    • You cannot add an integration project to a BAR file. Instead, add the individual resources that are contained in the integration project to the BAR file.
    • If your solution contains Java™ code or message sets, you must compile these resources and add the compiled resources to the BAR file; see Packaging resources that include Java code or message sets.
    • If a message flow that you select contains one or more WebSphere® Adapters nodes, a dialog box opens so that you can identify the following resources:
      • One or more WebSphere Adapters components to be used by the WebSphere Adapters nodes.
      • One or more libraries that contain an XSD for the business objects that are used by the WebSphere Adapters nodes
      For more information about including WebSphere Adapters in a BAR file, see Including WebSphere Adapters resources in a BAR file.
  3. Optional: To include source files, select Add workspace project source files.

    If you select Add workspace project source files, source projects for all applications, libraries, and other compiled resources are added to the src folder of the BAR file.

  4. Optional: To remove existing content from the BAR file before you build the new BAR file, select Remove contents of BAR before building.
  5. Optional: If you are adding a message flow to a BAR for a second time, and used the Manage tab to change flow parameters, select Override configurable property values to reset configuration settings.
    If this control is cleared, existing settings are left in place when a flow is replaced.
  6. Optional: To include message flows as compiled message flow (.cmf) files, and to include ESQL code directly in the .cmf file of each message flow that references an ESQL file, select Compile and in-line resources. By default, when you add a message flow to a BAR file, it is added as a .msgflow file. By default, each ESQL file that is referenced by one or more of your message flows is deployed as an individual resource, and can be accessed by multiple .msgflow files.
    If any of the flows that you add to your BAR file contain a subflow that is defined in a .msgflow file, you must select Compile and in-line resources.
  7. Click Build and Save.

Results

The Manage tab lists the files that are now in your BAR file. Expand your applications and libraries to view their contents. Compiled resources in the BAR file are shown in alphabetical order in the tree. You can edit only root elements. For example, if you added an application to the BAR file, you can rename the .appzip file or add comments to it. You cannot edit the resources inside the .appzip file, but you can edit the configurable properties for those resources.

You cannot remove individual resources from .appzip, .appdomainzip, .libzip, or .shlibzip files. To remove these resources, you must remove the application, .NET application domain, or library.

You can choose not to display your source files by selecting Built resources or Configurable properties from the list in the Filter by menu.

What to do next

Complete one or both of the following tasks: