See information about the latest product version
mqsicreatebar command
Use the mqsicreatebar command to create deployable broker archive (BAR) files containing message flows and dictionaries.
Supported platforms
- Windows
- Linux on x86
Purpose
If you use a repository to store your message flows and dictionaries, you can write scripts that use the mqsicreatebar command and the repository's command-line tools to deploy your message flow applications.
Syntax
>>-mqsicreatebar-- -data--WorkSpace--+--------------+-----------> '- -b -BarName-' >--+--------------+--+--------------------------+---------------> '- -cleanBuild-' '- -version -VersionString-' >--+----------+--+--------------------------+-------------------> '- -Esql21-' | .-----------------. | | V | | '- -p -----ProjectName---+-' >--+----------------------+--+------------------+---------------> '- -a -ApplicationName-' '- -deployAsSource-' >--+---------------+--+------------------+----------------------> '- -compileOnly-' '- -l -LibraryName-' >--+----------------------------+--+---------------+------------> '- -d -ApplicationDomainName-' '- -o -FilePath-' >--+--------------------+--+-----------------------------+----->< '- -skipWSErrorCheck ' '- -trace - -v -traceFilePath-'
Parameters
- -data WorkSpace
- (Required) The path of the workspace in which your projects are
created.
The workspace location is also the default location for projects. Relative paths are interpreted as being relative to the directory from which the command was started.
- -b BarName
- (Optional) 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.
This parameter is required if the -compileOnly parameter is not used.
- -cleanBuild
- (Optional) Refreshes the projects in the workspace and then invokes a clean build before new items are added to the BAR file.
- Use the -cleanBuild parameter to refresh all the projects in the BAR file and run a clean build if amendments have been made to BAR file resources by using external tools.
- -version VersionString
- (Optional) Appends the _ (underscore) character and the value of VersionString to the names of the compiled versions of the message flows (.cmf) files added to the BAR file, before the file extension.
- -Esql21
- (Optional) Compile ESQL for brokers at Version 2.1 of the product.
- -p ProjectName
- (Optional) Projects containing files to include in the BAR file in a new workspace. A new workspace is a system folder without the .metadata folder.
The projects defined must already exist in the folder defined in the -data parameter, and must include all projects and their reference projects that a deployable resource, defined in the -o parameter, needs.
The -p parameter is optional with an existing workspace, but you should use -p, together with a new workspace, in a build environment. If you specify multiple projects, you must use the -p parameter once only, for example: -p projectname1 projectname2.
If a project that you specify is part of your workspace but is currently closed, the command opens and builds the project so that the files in the project can be included in the BAR file.
- -a 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: -a ApplicationName1 ApplicationName2 .... ApplicationName'n'
-deployAsSource
(Optional) Include this parameter to deploy applicable resource files without compiling them.
When the -deployAsSource parameter is used, any applicable resources are added to the BAR file as source files, and are not compiled into message flow .cmf files.
You cannot include both the compiled (.cmf) and source (.msgflow) versions of a message flow in a BAR file.
- -compileOnly
- (Optional) Include this parameter to compile message sets and Java™ code before you run the mqsipackagebar command. All
relevant files in the workspace that is specified by the -data parameter
are compiled. For more information about the mqsipackagebar command, see mqsipackagebar command.
If this parameter is specified with the -b parameter and one or more of the -a, -l, -d, or -o parameters, the command generates both the compiled resources and the specified BAR file.
- -l 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: -l LibraryName1 LibraryName2 .... LibraryName'n'
- -d 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: -d ApplicationDomainName1 ApplicationDomainName2 .... ApplicationDomainName1'n'
- -o FilePath
- (Optional) The workspace relative path (including the
project) of a deployable file to add to the BAR file; for example,
a msgflow, subflow, or messageSet.mset file.
You can add more than one deployable file to this command by using the following format: -o FilePath1 FilePath2 .... FilePath'n'
- -skipWSErrorCheck
- (Optional) This parameter forces the BAR file compilation process to run, even if errors exist in the workspace.
- -trace
- (Optional) This parameter displays trace information for BAR file
compilation.
The -trace parameter writes trace information into the system output stream, in the language specified by the system locale. When you add one or more applications or libraries to the BAR file, the specified application or library and all referenced projects are opened in the workspace. The trace function records this information so that you can see whether any referenced projects are missing.
- -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. To use this parameter, you must also set the -trace parameter. You cannot specify the -v parameter on its own.
Authorization
On Windows XP and Windows Server 2003 systems, the user ID used to run this command must be a member of the group Administrators on the local system.
- The user ID must be a member of the group Administrators.
- The command must be started from an environment that has Run as Administrator authority.
If you do not run the command from a privileged environment, you are asked to confirm that you want to continue. When you click OK, a new privileged command console is created and the command completed, but all responses are written to the privileged environment and are lost when that console closes when the command completes.
On Linux on x86, the user ID must have write access to the -data (workspace) and -b (BAR file location) directories.
Responses
- BIP0956 Unable to start mqsicreatebar
- BIP0957 Incorrect arguments supplied to mqsicreatebar
- BIP0958 Nothing to do in mqsicreatebar
- BIP0959 Incorrect arguments supplied to mqsicreatebar (Project name)
- BIP0960 Incorrect arguments supplied to mqsicreatebar (Project directory)
- BIP0961 Error opening workspace in mqsicreatebar (Project could not be created)
- BIP0962 Error opening workspace in mqsicreatebar (Project could not be opened)
- BIP0963 Error saving file in mqsicreatebar
- BIP0964 Incorrect "-o" argument supplied to mqsicreatebar
- BIP0965 Error compiling files in mqsicreatebar
Examples
- On Windows 32-bit editions, the default location of the WMB toolkit directory is C:\Program Files\IBM\WMBT800
- On Windows 64-bit editions, the default is C:\Program Files (x86)\IBM\WMBT800, and
- On Linux on x86, the default is /opt/IBM/WMBT800.
The -b parameter specifies the name of the BAR file and an optional alternative path for BAR file generation. When a path is not specified as part of the -b parameter, the location in the file structure where the mqsicreatebar command runs specifies where the BAR file is created. For example, if you are currently in C:\> and run the mqsicreatebar command, the BAR file is created on C:\. However, if you run the mqsicreatebar with -b c:\myfiles\myflow.bar specified, the BAR file is created in the myfiles directory.
mqsicreatebar -data C:\Workspace -b myflow.bar -p TestFlowProject -o TestFlowProject\TestFlow\Test.msgflow
mqsicreatebar -data C:\Workspace -b C:\myfiles\myflow.bar -p TestFlowProject -o TestFlowProject\TestFlow\Test.msgflow -deployAsSource
mqsicreatebar -data C:\Workspace -b mySet.bar -o TestSetProject\TestSet\messageSet.mset
mqsicreatebar -data C:\Workspace -b mySet.bar -o TestFlowProject\TestFlow\Test.msgflow
TestSetProject\TestSet\messageSet.mset
mqsicreatebar -data C:\Workspace -b myflow.bar -a Application1 -trace