IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

mqsipackagebar command

Use the mqsipackagebar command to create deployable broker archive (BAR) files. You can use this command to create BAR files on machines that do not have the IBM® Integration Toolkit installed.

Supported platforms

To configure your environment so that you can run the mqsipackagebar command on machines that do not have IBM Integration Bus installed, see Configuring environments without the Integration Bus component installed.

Purpose

If you use a repository to store your message flows and dictionaries, you can write scripts that use the mqsipackagebar command and the command-line tools that are available in the repository to deploy your message flow applications.

Resources that you add to a BAR file by using the mqsipackagebar command are not compiled when they are added. To deploy a BAR file that you create by using this command, you must add deployable resources to the BAR file. For example, if you want to include Java™ code or message sets in your BAR file, you must first compile these files before you use the mqsipackagebar command to add them to your BAR file. To compile these resources, see Compiling resources for the mqsipackagebar command. You cannot include both the compiled (.cmf) and source (.msgflow) versions of a message flow in a BAR file.

Do not use the following characters in the names of resources that you want to include in your BAR file:
  • (space) ! ( ) + - : ; < = > ? [ ] ’ } {

Syntax

Read syntax diagramSkip visual syntax diagram
>>-mqsipackagebar-- -a --BarName--+--------------------+-------->
                                  '- -w --RootLocation-'   

   .---------------------------------------------.             
   |           .--------------.                  |             
   V           V              |                  |             
>------+- -o ------FilePath---+--------------+---+--+------+---->
       |       .---------------------.       |      +- -u -+   
       |       V                     |       |      '- -d -'   
       +- -k ------ApplicationName---+-------+                 
       |       .-----------------.           |                 
       |       V                 |           |                 
       +- -y ------LibraryName---+-----------+                 
       |       .---------------------------. |                 
       |       V                           | |                 
       '- -n ------ApplicationDomainName---+-'                 

>--+------+--+---------------------+---------------------------><
   '- -i -'  '- -v --traceFilePath-'   

Parameters

-a BarName

(Required) The name of the BAR (compressed file format) archive file where the result is stored. The BAR file is replaced if it already exists and the META-INF/broker.xml file is created.

-w RootLocation
(Optional) The default location for projects that you want to include in your BAR file. Relative paths are interpreted as being relative to RootLocation. If you do not define RootLocation, relative paths are interpreted as being relative to the directory from which the command was started.

-o FilePath
(Optional) The path (including the project) of a deployable file to add to the BAR file; for example, .msgflow, .subflow, or messageSet.dictionary files. Relative paths are interpreted as being relative to the path you have defined for RootLocation. If you do not define RootLocation, relative paths are interpreted as being relative to the directory from which the command was started.

Used together, the -o option specifies the path to deployable files and the -w option specifies the path to the project directory. For example, mqsipackagebar -w c:/MyProject -a MyBar.bar -o Flow/a.msgflow Subflow/b.subflow specifies a RootLocation of directory MyProject with the FilePath specifying deployable files a and b in the Flow and Subflow directories.

You can add more than one deployable file to this command by using the following format: -o FilePath1 FilePath2 .... FilePath'n'

By default files with only the following extensions are included in the BAR file: .xsdzip, .tblxmi, .xsd, .wsdl, .dictionary, .xsl, .xslt, .xml, .jar, .inadapter, .outadapter, .insca, .outsca, .descriptor, .php, .idl, .mqsc, .rule, .rules, .map, .esql, .msgflow, and .subflow. You can specify the -i option to include files with any extension.

-k ApplicationName
(Optional) The name of an application to add to the BAR file.

You can add more than one application by using the following format: -k ApplicationName1 ApplicationName2 .... ApplicationName'n'

By default files with only the following extensions are included in the BAR file: .xsdzip, .tblxmi, .xsd, .wsdl, .dictionary, .xsl, .xslt, .xml, .jar, .inadapter, .outadapter, .insca, .outsca, .descriptor, .php, .idl, .mqsc, .rule, .rules, .map, .esql, .msgflow, and .subflow. You can specify the -i option to include files with any extension.

-y LibraryName
(Optional) The name of a library to add to the BAR file.

You can add more than one library by using the following format: -y LibraryName1 LibraryName2 .... LibraryName'n'

By default files with only the following extensions are included in the BAR file: .xsdzip, .tblxmi, .xsd, .wsdl, .dictionary, .xsl, .xslt, .xml, .jar, .inadapter, .outadapter, .insca, .outsca, .descriptor, .php, .idl, .mqsc, .rule, .rules, .map, .esql, .msgflow, and .subflow. You can specify the -i option to include files with any extension.

-n ApplicationDomainName
(Optional) The name of a .NET application domain to add to the BAR file.

You can add more than one application domain by using the following format: -n ApplicationDomainName1 ApplicationDomainName2 .... ApplicationDomainName'n'

All files in the specified application domain are included in the BAR file.

-u
(Optional) Include this option to update the resources in an existing BAR file.

Specify the resources that you want to update by using the -o, -k, -y, and -n options. If the BAR file does not exist, a new file is created.

-d
(Optional) Include this option to delete resources from an existing BAR file.

Specify the resources that you want to delete by using the -o, -k, -y, and -n options.

-i
(Optional) Include this option to add deployable and nondeployable resources to your BAR file.

If you use this option, all files specified by the -o, -k, -y, and -n options are included in your BAR file. If you do not use this option, only deployable files in the specified locations are added to the BAR file.

-v traceFilePath
(Optional) This parameter specifies the file name of the output log to which trace information is sent.

If you specify the file name or relative path, the file is created in the default working directory.

Authorization

For information about platform-specific authorizations, see the following topics: If you have enabled broker administration security, you must also set up the authority detailed in Tasks and authorizations for administration security.

Responses

This command returns the following responses:
  • BIP1838I Package a broker archive file from source.
  • BIP1839S 'Option' not specified.
  • BIP1840S No valid resources found to add to the BAR file. Check that rootLocation is correct and specify at least one resource by using one or more of the -k, -y, -n, or -o options.
  • BIP1841S 'traceFilePath' is not a valid traceFilePath.
  • BIP1842S Cannot open trace file 'traceFilePath'. Error: 'error'.
  • BIP1843S The trace file 'traceFilePath' is read-only.
  • BIP1844S Unexpected end of argument reached.
  • BIP1845I Command completed successfully.
  • BIP1846S The update option (-u) and the delete option (-d) cannot be used simultaneously.
  • BIP1847S The broker archive file 'BAR_file' does not exist.
  • BIP1848S The 'Message_flow_file' file contains an unsupported node: 'Node_name'.
  • BIP1849W The application 'Application' references project 'Library' which does not exist.
  • BIP1862W Ignoring invalid or missing resource: 'Resource'
  • BIP1863W Command completed with warnings.
  • BIP1864W The generated broker archive file does not contain any Message Broker deployable files.
  • BIP1865W 'Container_resource' is not added to the BAR file because it contains no deployable resources. To create deployable resources for Java code or message sets, use the mqsicreatebar -compileOnly command.
  • BIP1866W The referenced project 'Referenced_project' contains no deployable resources. To create deployable resources for Java code or message sets, use the mqsicreatebar -compileOnly command.
  • BIP1867W Cannot add 'Message_flow_file' to the BAR file, because this flow is already in the BAR file as a compiled (.cmf) file. Delete 'Compiled_message_flow_file' from the BAR file by using the -d option and try again.
  • BIP1868W: Ignoring 'Resource_name', which is in application 'Application'. Use the -k option to include the application.
  • BIP1869W: Ignoring 'Resource_name', which is in library 'Library'. Use the -y option to include the library.
  • BIP1870W: Ignoring 'Resource_name', which is in .NET application domain project 'Application_domain'. Use the -n option to include the application domain project.

Examples

The following example creates a BAR file called myflow.bar in the workspace at C:\Workspace. The Test.msgflow message flow is added to the BAR file without being compiled.
mqsipackagebar -w C:\Workspace -a myflow.bar -o TestFlowProject\TestFlow\Test.msgflow
The following example creates a BAR file called myflow.bar in the workspace at C:\Workspace. The application Application1 is added to the BAR file. The trace function is turned on and trace information is written to the tracefile file.
mqsipackagebar -w C:\Workspace -a myflow.bar -k Application1 -v tracefile
You can run mqsipackagebar from an Ant script, for example, if you want to create BAR files on a build machine. In the following example MQSI_JARPATH is the location of your ConfigManagerProxy and Broker-dependent .jar files:
<target name="run_mqsipackagebar" description="--> runs mqsipackagbar from an ant task">
   <java classname="com.ibm.broker.config.appdev.FlowRendererBAR"
      failonerror="true"
      fork="true">
         <arg line="-a MyBAR.bar"/>
         <arg line="-k MyApplication"/>
         <classpath>
            <fileset dir="${MQSI_JARPATH}">
                <include name="*.jar"/>
            </fileset>
         </classpath>
   </java>
</target>

bc31720_.htm | Last updated Friday, 21 July 2017