Skip to main content

Moving Expanders to a new location

Renaming ExpandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact., changing the package, or changing the artifactArtifactA build or deployment result, such as a Docker container image or Java archive, produced by a software project. path can lead to issues with backwards compatibility:

  • Features from other expansion-resources are linked to the ExpanderExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. by name and package. Changing them causes the links to be unresolvable.
  • Harvest files are placed in a location specific to the artifactArtifactA build or deployment result, such as a Docker container image or Java archive, produced by a software project. path. Changing this causes harvested custom code to disappear.

For this purpose, there is a DataResource type ExpanderRelocation, which describes how to remap the old locations to the new ones.

<dataResource type="expansionControl::ExpanderRelocation">
<relocation name="Move ComponentDefaultTranslationExpander to COMMON">
<!-- Original Expander name and package -->
<expanderName>ComponentDefaultTranslationExpander</expanderName>
<expanderPackage>net.democritus.expander.struts.component</expanderPackage>

<!-- All of these are optional: -->
<!-- Change Expander name/package so Features can be remapped -->
<newExpanderName>ComponentDefaultTranslationExpander</newExpanderPackage>
<newExpanderPackage>net.democritus.expander.common.component</newExpanderPackage>
<!-- Define original artifact path/name, so that outdated harvest files can be found. -->
<originalArtifactPath>$componentRoot.directory$/control/$genDir$struts2/resources</originalArtifactPath>
<originalArtifactName>$component.name$.properties</originalArtifactPath>

</relocation>
</dataResource>