mqsicreatebar command
Use the mqsicreatebar command to create deployable BAR files that contain message flows and dictionaries.
Supported platforms
- Windows
- Linux®
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.
- Start the IBM App Connect Enterprise Toolkit in headless mode.
- Import projects, libraries, and deployable files as specified in the command by the -p, -l, and -o parameters.
- Open the projects that are imported.
- Build the workspace.
- Check for errors.
- Build the BAR file.
- Exit the IBM App Connect Enterprise Toolkit.
Syntax
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.
- -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 integration nodes 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 that are defined must exist in the folder that is defined in the -data parameter, and must include all projects and their reference projects that a deployable resource, which is defined in the -o parameter, needs.
The -p parameter is optional with an existing workspace where the required projects are already imported and appear in the .metadata file, but you should use -p together with a new (empty) workspace for any projects that you want to import. 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.
The -l parameter is optional with an existing workspace where the required libraries are already imported and appear in the .metadata file, but you should use -l, together with a new (empty) workspace for any libraries that you want to import.
You can add more than one library by using the following format: -l LibraryName1 LibraryName2 .... LibraryName'n'
- -x PolicyProjectName
- (Optional) The name of a policy project to be added to the BAR file.
You can add more than one policy project by using the following format: -x PolicyProjectName1 PolicyProjectName2 .... PolicyProjectName'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
, ormessageSet.mset
file.The -o parameter is optional with an existing workspace where the required deployable files are already imported and appear in the .metadata file, but you should use -o, together with a new (empty) workspace for any deployable files that you want to import.
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 Linux, the user ID must have write access to the -data (workspace) and -b (BAR file location) directories.
Examples
- On Windows, the default directory is C:\Program Files\IBM\ACE\13.0.n.0\tools.
- On Linux, the default directory is install_dir/ace-13.0.n.0/tools.
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.
myflow.bar
in the
directory where the command is issued. The Test.msgflow
message flow from the
TestFlowProject
is added to the BAR file as a compiled message flow
(.cmf)
file.mqsicreatebar -data C:\Workspace -b myflow.bar -p TestFlowProject -o TestFlowProject\Test.msgflow
myflow.bar
in
the myfiles
directory. The Test.msgflow
message flow from the
TestFlowProject
is added to the BAR file, and any applicable resource files are
added to the BAR file without being
compiled.mqsicreatebar -data C:\Workspace -b C:\myfiles\myflow.bar -p TestFlowProject -o TestFlowProject\Test.msgflow -deployAsSource
mySet.bar
. The
messageSet.mset
message set from the TestSetProject
is added to
the BAR
file.mqsicreatebar -data C:\Workspace -b mySet.bar -o TestSetProject\TestSet\messageSet.mset
mySet.bar
. The
messageSet.mset
message set from the TestSetProject
and
Test.msgflow
message flow from the TestFlowProject
are added to
the BAR file. The message flow is added as a compiled message flow (.cmf)
file.mqsicreatebar -data C:\Workspace -b mySet.bar -o TestFlowProject\TestFlow\Test.msgflow
TestSetProject\TestSet\messageSet.mset
myflow.bar
. The
application Application1
is added to the BAR file and the trace function is
activated.mqsicreatebar -data C:\Workspace -b myflow.bar -a Application1 -trace
myBar.bar
and add the projects projectname1
,
projectname2
, the libraries LibraryName1
,
LibraryName2
, and the deployable files FilePath1
and
FilePath2
. In an existing workspace where these items are imported, the following
command achieves this
purpose:mqsicreatebar -data C:\Workspace -b myBAR.bar
In
a new (empty) workspace, the following command is
required:mqsicreatebar -data C:\Workspace -b myBAR.bar -p projectname1 projectname2 -l LibraryName1 LibraryName2 -o FilePath1 FilePath2