Skip to main content

Expansion Settings

Each NS project requires an expansionSettings.xml. This file is the starting point of each each expansion. It describes:

  • where to find the model files
  • where to generate the expanded artifacts
  • which expanders (expansion-resources) to use

It is also useful to have a pom-expansion.xml file. This is a maven project file that includes the expanders-maven-plugin, which is used to run the expansion.

project
├── pom-expansion.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="2024.16.6"/>
  </expansionResources>
  <settingsDirectories>
    <!-- settings directories contain settings xml files. -->
    <settingsDirectory>
      <directory>../settings</directory>
    </settingsDirectory>
  </settingsDirectories>
</expansionSettings>