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 artifacts
  • which expanders (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="net.democritus:nsx-default-stack" version="2025.1.1"/>
</expansionResources>
<settingsDirectories>
<!-- settings directories contain settings xml files. -->
<settingsDirectory>
<directory>../settings</directory>
</settingsDirectory>
</settingsDirectories>
</expansionSettings>