Overriding or Merging Artifacts

Some types of artifacts can be overridden (effectively replaced) by adding an artifact with the same file name as an artifact in another component to your custom component. When building the application, the artifact in the highest priority component will be selected and the others ignored. Not all types of artifacts are overridden so completely. Other types of artifacts are merged with the same named artifacts in the lower priority components. The content of all of the artifacts is combined and, where the content is related, the content from the highest priority component is selected. The customized artifacts only need to share the same file name, they do not have to share the same relative folder location, though you may find it advantageous to organize them in a similar manner.

For example, for UIM files that share the same name, the file in the highest priority component will be selected and the others ignored; but for properties files that share the same name, all of the properties are merged together and, where the files contain properties with the same key name, the value of the property from the file in the highest priority component will be used. When building an application, the artifacts in the components are not modified. The selection and merging of artifacts is performed in temporary locations, leaving the original artifacts intact.

The different ways in which artifacts are merged or overridden is covered in the sections below.