mqsipackagebar command

Use the mqsipackagebar command to create deployable BAR files. You can use this command to create BAR files on machines that do not have the IBM® App Connect Enterprise Toolkit installed.

Purpose

If you use a version control system to store your artifacts, 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 Packaging resources that include Java code or message sets.

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 diagrammqsipackagebar -a BarName  -w RootLocation ------- -o -------FilePath -k -------ApplicationName -y -------LibraryName -n -------ApplicationDomainName -x -------policyProjectName  -c  -r  -u  -d  -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, or locations, 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. You can define more than one location; all locations are used when the source files are being located.
-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: .appzip, .libzip, .shlibzip, .xsdzip, .tblxmi, .xsd, .wsdl, .dictionary, .xsl, .xslt, .xml, .jar, .inadapter, .outadapter, .insca, .outsca, .descriptor, .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: .appzip, .libzip, .shlibzip, .xsdzip, .tblxmi, .xsd, .wsdl, .dictionary, .xsl, .xslt, .xml, .jar, .inadapter, .outadapter, .insca, .outsca, .descriptor, .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 static or shared library to add to the BAR file.

You can add more than one static or shared 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: .appzip, .libzip, .shlibzip, .xsdzip, .tblxmi, .xsd, .wsdl, .dictionary, .xsl, .xslt, .xml, .jar, .inadapter, .outadapter, .insca, .outsca, .descriptor, .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.

-x policyProjectName
(Optional) The name of a policy project to add to the BAR file.

You can add more than one policy project by using the following format: -x policyProjectName1 PolicyProjectName2 PolicyProjectName3.... policyProjectName'n'

-c
(Optional) Precompile the runtime resources for XMLNSC and DFDL schema and graphical data maps into binaries, ready to run when the application is deployed. Setting this parameter has the same effect as setting the -c parameter in the mqsibar command.
-r
(Optional) Remove the precompiled outputs and rebuild the runtime resources for XMLNSC and DFDL schema and graphical data maps.
-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.

When the -c flag is set, a new separate trace file is created with a suffix _I appended to the file name. This trace file will contain the trace information that is created during the precompile phase.

Examples

The following example creates a BAR file called myapp.bar in the workspace at C:\Workspace. The application Application1 and the shared library Shlib1 have their schema and maps precompiled, before being added to the BAR file. The trace function is turned on and trace information is written to the tracefile file. The trace information that is created during the precompile phase is written to the tracefile_I file.
mqsipackagebar -w C:\Workspace -a myapp.bar -c -i -k Application1 -y Shlib1 -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_BASE_FILEPATH is the root location of your product install:
<target name="run_mqsipackagebar" description="--> runs mqsipackagebar 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="${env.MQSI_BASE_FILEPATH}/common/classes" includes="IntegrationAPI.jar" /> 
            <fileset dir="${env.MQSI_BASE_FILEPATH}/server/classes" includes="javacompute.jar,jplugin2.jar" /> 
            </fileset>
         </classpath>
   </java>
</target>