This project contains the CLI for filling in the blanks of the methodologist's framework.
Options:
- f (--folder): The path to the folder the Vitruv project should be instantiated in.
- m (--metamodel): A semicolon separated list of pairs of paths to the metamodels and their genmodels that are used in the reactions, e.g., MyMetamodel.ecore,MyGenmodel.genmodel;MyMetamodel1.ecore,MyGenmodel1.genmodel.
- r (--reation): The path to the file the Reactions are stored in.
- rs (--reactions): The path to a directory containing multiple .reactions files. All reaction files in this directory will be used during the build. Mutually exclusive with -r/--reaction.
- u (--userinteractor): Specify the path to a specific user interactor, use the keyword 'default' to denote that you want to use a default user interactor without functionality.
- pg (--precheck-genmodel): Precheck and standardize
.genmodelfiles before running the CLI workflow. - apply (--apply): Apply detected
.genmodelfixes immediately without interactive confirmation. Only relevant together with-pg/--precheck-genmodel.
The -pg (--precheck-genmodel) option validates and standardizes all provided .genmodel files to ensure compatibility with the Methodologist MWE2 generator workflow.
The following adjustments may be applied automatically:
-
Remove unsupported attributes:
complianceLevelcomplianceeditDirectoryeditorDirectorytestsDirectoryeditPluginIDeditorPluginIDtestsPluginID
-
Ensure required conventions:
basePackageequalsmodelPluginIDmodelDirectoryequals
/<modelPluginID>/target/generated-sources/ecorecreationIconsis set tofalseforeignModelexists (defaults to<genmodel-name>.ecoreif missing)
When -pg is used by itself, the CLI reports the detected .genmodel issues and asks whether they should be fixed.
vitruv-cli -pg -m MyMetamodel.ecore,MyGenmodel.genmodelIf you want the fixes to be applied immediately without confirmation, use --apply.
vitruv-cli -pg --apply -m MyMetamodel.ecore,MyGenmodel.genmodelIf -pg is combined with the normal generation workflow, --apply can also be used to fix .genmodel files first and then continue directly with generation.
vitruv-cli -pg --apply -f projectFolder -m MyMetamodel.ecore,MyGenmodel.genmodel -r reactions.reactionsIf issues are found and fixes are declined, the CLI stops execution and does not continue with generation or build.
1. Standalone validation
You can run the precheck to normalize .genmodel files before building.
vitruv-cli -pg -m MyMetamodel.ecore,MyGenmodel.genmodel2. As part of the normal CLI workflow
The precheck can also run together with project generation.
vitruv-cli -pg -f projectFolder -m MyMetamodel.ecore,MyGenmodel.genmodel -r reactions.reactionsIn this case the .genmodel files are validated and standardized before the build continues.
This project depends on the following other projects from the Vitruvius framework: