StreamBase Archive Generator — runs the StreamBase archive generator


sbargen [OPTIONS] [app-name.[sbapp|ssql|sbdeploy]] {output.sbar}


Compiles a top-level StreamBase application and returns a precompiled application archive file with .sbar extension.

When you start StreamBase Server with an EventFlow or StreamSQL application argument, the server compiles the application on the fly, then runs the compiled application. By contrast, when you start a server with a precompiled archive file as an argument, the server runs the application immediately.

Specify the name of a top-level EventFlow or StreamSQL application file, or a deployment file that specifies an application, as the optional first sbargen argument. If not specified, sbargen reads the application from standard input. You must specify an output file name argument to contain the precompiled application archive.

StreamBase Server honors precompiled application archives compiled with the exact same release of StreamBase, and refuses to run applications generated with the sbargen commands from another StreamBase release. Use sbargen --version and sbd --version to determine the respective release numbers.


-f conf-file

Specifies a server configuration file to use when compiling the application.

-h, --help

Displays help, then exits.


Check the target .sbar file's dependencies, and only rebuild the target if it is older than its dependencies. By default, this option does not consider files whose names match the following regular expression patterns as dependencies:


You can customize the list of exclusion patterns with the --exclude-pattern option.


Specifies a system property setting or other JVM argument to be passed to the JVM running the archive generation process. Use this option to specify temporary settings that affect only the current invocation of sbargen. You must specify multiple -J options to specify multiple JVM arguments.

For example, specify -J-Xmx2G. Use the full option syntax for jvm-option that you would use at the Java command line, including the initial hyphen. For example, specify -J-Dstreambase.log-level=2 to increase the log level for this invocation of sbargen.

Your jvm-option argument might require surrounding quotes, depending on the characters it contains and the shell you are using. However, do not use quotes to escape the spaces between separate JVM arguments; instead use separate -J options. For example: -J-Xms512M -J-Xmx2G

-m module-directory, --module-search module-directory

Specifies a directory path in which to search for modules referenced by the specified application.

–P paramName=paramValue, –-parameter paramName=paramValue

Specifies a module parameter to pass to the top-level application module at runtime.


Suppresses compiler warnings.

-v, --version

Returns the StreamBase release number.

-X regex-pattern, --exclude-pattern regex-pattern

Specifies a regular expression pattern for files to ignore when considering changed dependency files with the --if-modified option. You can specify this multiple times to specify multiple patterns. This option replaces the default patterns shown above for the --if-modified option. For example, if you mean to append a fifth pattern, you must re-specify the four default patterns to continue using them.

-w path

Sets the working directory of the sbargen command to be the one specified as path. When this parameter is specified, at runtime, sbargen sets its working directory before any other files or paths are read. When -w is used, all files and paths specified elsewhere on the sbargen command line MUST either be absolute paths OR be relative to the directory specified with -w. This includes all input and output files. At runtime, the specified path is checked for existence, and the command halts with an error if the path does not exist.



Optional. Sets the minimum severity of messages that StreamBase writes to logging output. Default is 0, which gets NOTICE level messages and higher. Reasonable values are -1 (which disables NOTICE messages and shows only WARN, ERROR and FATAL messages), 1 (which adds INFO messages to the standard messages), and 2 (which adds DEBUG messages).