Skip to main content

NSX Metamodel Project

Creates a new NS metamodel project, provisioned with everything needed for NSX infrastructure.

  • Expansion resource: net.democritus.initializer:nsx-metamodel-initializer@4.21.0
  • Command: nsinit metamodel
  • Example project: Bitbucket


The NSX metamodel project initializer is an initializer bundle which is used to create new NS projects which define metamodels that can optionally extend the default elements model, alongside additional integrations for tooling and infrastructure used at NSX.

This initializer can provision a very comprehensive setup for a new metamodel project containing the following:

  • An metamodel component depending on elements or defining its own ProgramType and DataElement for that ProgramType. This includes expansion settings for the metamodel stack.
  • A Maven project to expand the metamodel stack project with or without expanders module and deploy the model artifact.
  • Some typical project files are generated, such as and as stub files to be filled out by the user. Also an EditorConfig file with a basic setup for clean editing of the files in the repository is generated.
  • Support for the Jenkins CI/CD platform with a Jenkinsfile that expands, builds and deploys the entire project.
  • Initialization of a local git repository for the project, with an initial commit containing everything that should be committed to the repository.

Generated files

  • applications directory with the Application/ApplicationInstance model, which is used to by program type for metamodels to define the project.
  • components directory with the metamodel component model and ProgramType DataElement if requested.
  • components/models.xml file which defines a ModelResource with the path to the directory containing the metamodel components.
  • conf/expansionSettings.xml file with the expansion settings for the project.
  • pom.xml file to expand the project and deploy the model artifact.
  • .gitignore file to ignore any known files that should not be committed to a Git repository.
  • .editorconfig file with some basic standard rules for formatting code in files.
  • file to provide some basic information about the project.
  • file to document changes to the project.
  • Jenkinsfile file with basic configuration to expand and build the project in Jenkins.
  • A local git repository with a first commit containing all generated files.


For an overview, run nsinit metamodel -h.

Returns the help with an overview of all commands.
--artifact-idThe artifact identifier that will be used for the model artifact and root POM file of the project.
Used to specify the name for the metamodel component.
--program-typeName of the ProgramType that will be defined. Only has an effect if --elements is not present.
--program-type-elementName of the DataElement that will be defined for the ProgramType. Only has an effect if --elements is not present.
The groupId for the pom-expansion.xml Maven project file.
--[no-]jenkinsGenerate a Jenkinsfile. Default: true
--[no-]elementsAdd dependency on the elements model to extend it, rather than define a new ProgramType. Default: false
--[no-]expandersGenerate an expanders module. Default: true
--[no-]gitInitialize a local git repository and generate a .gitignore file. Default: true
-DAllows you to set any argument or flag defined for the project type, even those that are implicit. For an argument, the key should be prefixed by arg. and for a flag with flag.. E.g.: -Darg.applicationInstance=test-app
The directory where the project should be generated, rather than the current directory.
Disables the interactive mode and accepts defaults for all settings that were not specified as arguments.
Forces the creation of the project, even when the output directory is not empty.


nsinit metamodel -y -o metaTest --group-id com.example.metatest

Resulting project:

| .editorconfig
| .gitignore
| Jenkinsfile
| pom.xml
| \---metaTest
| +---harvest
| | | pom.xml.harvest
| | |
| | \---metaTest-core
| | \---main
| | \---common
| | \---resources
| | \---data
| | \---meta
| | \---metaTest
| | programTypes.xml.harvest
| |
| \---model
| | metaTest-1.0.0-SNAPSHOT.xml
| |
| \---instances
| metatest.xml
| | models.xml
| |
| \---metaTest
| \---model
| | metaTest.xml
| |
| \---dataElements
| MetaTest.xml