link
Avalon
Avalon Central
Home PlanetProductsCentral
Using Merlin
Using Configuration Overrides

The Merlin command line tool allows the specification of a set of overriding configuration targets. Each target in the <targets> set contains a configuration that may be applied to a named component. This allows modification of a configuration without modification of a packaged block.xml file.

Resources supporting this tutorial are contained in the tutorials/configuration/override directory.

Target Override Format

config.xml

<targets>
  <target path="/tutorial/hello">
    <configuration>
      <source>External configuration target.</source>
    </configuration>
  </target>
</targets>
Execution

The following command line includes the -config argument referencing a configuration target file (example included in the tutorials/configuration package).

$ maven
$ merlin -execute target\classes -config conf\config.xml 

Executing Merlin demonstrates that the configuration supplied to the hello component reflects the configuration element contained in the target name "\hello".

[INFO   ] (kernel): building application model
[INFO   ] (kernel): install phase
[INFO   ] (kernel): installing: file:${user.dir}/target/classes/
[INFO   ] (tutorial.hello): configuration stage
[INFO   ] (tutorial.hello): initialization stage
[INFO   ] (tutorial.hello): source: Custom configuration target.
        
Notes

Configuration target names represent a path. The path is the construction of container names seperated by the "/" character and ending with a component name. For example if the hello component were contained within a container named "container" the path would appear as follows:

<targets>
  <target path="/container-name/component-name">
    <configuration>
      <!-- your configuration info -->
    </configuration>
  </target>
</targets>
Moving on

We are now ready to move on to the subject of context management.