Creating a BAR file

Create a separate BAR file for each configuration that you want to deploy.

About this task

You can create a BAR file by using any of the following methods:
  • Linux platformWindows platformCreate a BAR file interactively by using the IBM® Integration Toolkit; see Creating a BAR file with the IBM Integration Toolkit.
  • Linux platformWindows platformCreate a BAR file from a script or the command line by using the mqsicreatebar command; see Creating a BAR file with the mqsicreatebar command.
    Note: The mqsicreatebar command works on only Windows and Linux® platforms, but the command does check the validity of the resources that are added to the BAR file. If there are errors with the syntax of the resources, the command generates an error and the resources are not added to the BAR file. You can use the mqsicreatebar command to add both deployable resources and source code to a BAR file.
  • Linux platformWindows platformUNIX platformz/OS platformCreate a BAR file from a script or the command line by using the mqsipackagebar command; see Creating a BAR file with the mqsipackagebar command.
    Note: Although the mqsipackagebar command works on all supported platforms, the command does not check the validity of the resources that are added to the BAR file. If there are errors with the syntax of the resources, the command does not generate an error and the resources are added to the BAR file. Any errors are generated only when you try to deploy the BAR file. You can use the mqsipackagebar command to add only deployable resources to a BAR file.

Creating a BAR file with the IBM Integration Toolkit

About this task

When you create a BAR file by using the IBM Integration Toolkit, by default it is created in an integration project called BARfiles. In the Application Development view, the new BAR file is shown under the BARfiles integration project, in a folder called BARs. You can customize the default location of BAR files by setting a preference (Window > Preferences > Integration Development > Build BAR).

To create a BAR file by using the IBM Integration Toolkit, complete the following steps:

Procedure

  1. Click File > New > BAR file.
  2. Select the location for your BAR file.

    You can select an existing application, library, or integration project, or you can create a new integration project by clicking New.

  3. Enter a name for the BAR file that you are creating.
  4. Click Finish.

Results

A file with a .bar extension is created and is displayed under the application, library, or integration project, in a folder called BARs. The BAR File editor opens. All BAR files are also shown in a separate category in the Application Development view called BARs. Each BAR file that is listed here displays information about the project in which the BAR file is stored.

What to do next

Add files to the BAR file by following the instructions in Adding resources to a BAR file.

Creating a BAR file with the mqsicreatebar command

About this task

To create a BAR file by using the mqsicreatebar command, complete the following steps.

Procedure

  1. Open a command window that is configured for your environment.
  2. Enter the command on a single line.
    For example:
    mqsicreatebar -b barName -a applicationNames -trace
    

    You must specify the -b (BAR file name) parameter. The -a (application names) parameter is optional. You can also use the -o parameter to specify the path for a specific file, or the -l parameter to specify a library. For more information, see mqsicreatebar command.

    If you changed resources in the BAR file by using external tools, add the -cleanBuild parameter to refresh all the projects and run a clean build.

    To see trace information for BAR file deployment, add the -trace parameter. To force compilation of the BAR file even if errors exist in the workspace, add the -skipWSErrorCheck parameter.

    A file with a .bar extension is created.

What to do next

If you did not add all the required resources to the BAR file by using the mqsicreatebar command, add resources to the BAR file now; see Adding resources to a BAR file. If you added all the required resources, prepare your packaged solution for deployment; see Preparing packaged solutions for deployment.

Creating a BAR file with the mqsipackagebar command

Before you begin

If you want to use the mqsipackagebar command to create your BAR file, you must compile any message sets or Java™ code before you create the BAR file. For more information, see Packaging resources that include Java code or message sets.

About this task

You can create BAR files on computers that do not have IBM Integration Bus installed by using the mqsipackagebar command. To configure your environment so that you can run the mqsipackagebar command on a computer that does not have IBM Integration Bus installed, see Configuring environments without IBM Integration Bus installed.

When you create BAR files by using the mqsipackagebar command, add only deployable resources to ensure that your BAR file can be deployed.

To create a BAR file on z/OS® by using the mqsipackagebar command, customize and submit BIPPACK; see Contents of the integration node PDSE; on all other platforms, complete the following steps:

Procedure

  1. Open a command window that is configured for your environment.
  2. Enter the command on a single line.
    For example:
    mqsipackagebar -a barName -k applicationNames -v traceFile
    

    You must specify the -a (BAR file name) parameter. The -k (application names) parameter is optional. You can also use the -o parameter to specify the path for a specific file, the -y parameter to specify a static library, or the -s parameter to specify a shared library. For more information, see mqsipackagebar command.

    To see trace information for BAR file deployment, add the -v parameter.

    A file with a .bar extension is created.

What to do next

Prepare your packaged solution for deployment; see Preparing packaged solutions for deployment.