Skip to main content

Expansion Settings

Each NS project requires an expansionSettings.xml. This file contains all needed information to execute an expansion. It describes:

  • where to find the model files
  • where to generate the expanded artifactsArtifactA build or deployment result, such as a Docker container image or Java archive, produced by a software project.
  • which expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. (expansion-resources) to use

A pom.xml Maven project file is also required to set up Maven. It should include the expanders-maven-plugin, which is used to run the expansion.

project
├── pom.xml
├── conf
│ └── expansionSettings.xml
.
<expansionSettings>
<!-- modelDirectory is the root directory for the model files, i.e. where the applications and components directories can be found -->
<modelDirectory>..</modelDirectory>
<!-- expansionDirectory is the target directory where the expansion should place the generated files -->
<expansionDirectory>../expansions</expansionDirectory>
<expansions>
<!-- here you can define where the root of the model can be found, typically points towards an application -->
</expansions>
<expansionResources>
<!-- expansion resources are resources bundles that provide expanders, features etc.
If they are defined here, they will be fetched before expansion using maven and added to the classpath -->
<expansionResource name="org.normalizedsystems.beam:minimal-jee-beam" version="2.5.1"/>
</expansionResources>
<settingsDirectories>
<!-- settings directories contain settings xml files. -->
<settingsDirectory>
<directory>../settings</directory>
</settingsDirectory>
</settingsDirectories>
</expansionSettings>