Command Line Tool
Tools
The command line version provides all the functions available from the Eclipse IDE but without user interface. It is distributed as an executable JAR file with name CommaSuite-X.X.X.jar where X.X.X encodes the version.
Usage from Command Line
To run the executable jar file it is required to have Java version 11 or higher to be installed. Jar files in general can be run with the following command (args are arguments):
java -jar $jar_filename$ $args$
Arguments
The CommaSuite jar accepts the following arguments:
-l, --location; (required) Location of the .prj file or directory that contains the .prj file
-v, --validation; Turns off validation
-o, --output; Sets output location of the generated files
-mp, --modelpath; A list of directories separated by ';' that contain all the models used in the code generation
-h, --help; Shows options
Argument modelpath (mp)
This argument is relevant only if the used models make use of namespace imports. If the models use only explicit file imports this argument is not relevant.
The argument value is a list of semi-colon separated directory paths. These directories have to contain all the models used in the code generators.
When a namespace import is encountered in a model, the collection of the models from the provided directories in the -mp argument will be used to determine the content of the used namespaces.
Example:
java -jar CommaSuite-0.3.0.jar -l Camera.prj -mp C:\workspace\Camera;C:\workspace\Types
Examples
Location
The jar requires you to provide at least a location that can either be the .prj file or a directory in which it can find the .prj file. The location argument can be an absolute or relative path.
java -jar CommaSuite-3.4.0.jar -l C:\IBoss_example\iboss.prj
uses the iboss.prj file for the generation.
java -jar CommaSuite-3.4.0.jar -l C:\IBoss_example\
runs the generation for all .prj files in the directory.
Output location
By default the output location is the folder of the provided location argument. The CommaSuite framework will create two folders in the output location: "src-gen" that contains the generated code for the tasks in the .prj file, and "comma-gen" that contains the results of the execution of the monitoring tasks (if any). In order to change the default output location, an output argument can be provided as an absolute or relative path.
java -jar CommaSuite-3.4.0.jar -l C:\IBoss_example\iboss.prj
will use C:\IBoss_example\src-gen\ for generated code and C:\IBoss_example\comma-gen\ for monitoring results.
java -jar CommaSuite-3.4.0.jar -l C:\IBoss_example\iboss.prj -o generated
will use C:\IBoss_example\generated\ as output location
java -jar CommaSuite-3.4.0.jar -l C:\IBoss_example\iboss.prj -o C:\generated\
will use C:\generated\ as output location
Validation
By default the validation is turned ON. Warnings and errors will be printed to the console. Generation will continue when it encounters warnings but stops when one or more errors are found. Validation can be turned off by using the validation argument.
java -jar CommaSuite-3.4.0.jar -l C:\IBoss_example\iboss.prj -v
turns off validation