Expansion Settings XML

The expansionSettings.xml looks as follows:

<applicationExpansionSettings>
  <applicationInstance shortName="testApp" version="1.1" name="testApp: TomEE"/>
  <!-- Prime Radiant typically autogenerates <expansionDirectory> as <expandBase>/<applicationInstance.shortName>(-<applicationInstance.id>) -->
  <!-- applicationInstance will be expanded to <expansionDirectory>/<application.shortName> -->
  <expansionDirectory>C:\expansions\testapp_next\</expansionDirectory>

  <applicationDirectories>
    <applicationDirectory>
      <directory>../applications</directory>
    </applicationDirectory>
  </applicationDirectories>
  <componentDirectories>
    <componentDirectory>
      <directory>../components</directory>
    </componentDirectory>
  </componentDirectories>
  <settingsDirectories>
    <settingsDirectory>
      <directory>C:\NSF-3.0\repositories\settings</directory>

    </settingsDirectory>
    <settingsDirectory>
      <directory>../applications/testApp/settings</directory>
    </settingsDirectory>
  </settingsDirectories>
  <expansionResources>
    <expansionResource name="net.democritus.experimental:testExpanders" version="1.0"/>
  </expansionResources>
  <expansionOptions>
  </expansionOptions>

  <excludeDefaultExpanders value="false"/>
  <useComponentFile value="false"/>

</applicationExpansionSettings>

It contains:

  • a reference to the applicationInstance to be expanded
  • the directory to be used for expansion
  • applications and components-directories (e.g. NSF-3.0/workspace/descriptors/components)
  • settingsDirectories
  • expansionResources to add external expanders
  • expansion options and other configuration

The file is generated when calling nsf init.

The applicationInstance contains the the application instance filename in name and the application filename in shortname and version. Note that the application xml should be named <applicationName>-<version>.xml.

Expansion options

dryRun

When the option dryRun is added, the expansion will run, but no files will be generated.

To add to expansion, run:

nsf add-option --name dryRun

excludeExpanders

The option excludeExpanders can be defined to exclude expanders using a glob pattern

To add to expansion, run:

nsf add-option --name excludeExpanders --value net.democritus.experimental*

There are similar options for features and additionalExpansionSteps; excludeFeatures and excludeExpansionSteps.

hideAnchors

The option hideAnchors will hide all anchors except for custom anchors:

nsf add-option --name hideAnchors