Moving Expanders to a new location
Renaming Expanders, changing the package, or changing the artifact path can lead to issues with backwards compatibility:
- Features from other expansion-resources are linked to the Expander by name and package. Changing them causes the links to be unresolvable.
- Harvest files are placed in a location specific to the artifact 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>