Using Merlin

Creating a default configuration

Merlin provides support for the association of a default with a component type. This is achieved by including a <classname>.xconfig resource co-located with the component class.

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

HelloComponent.xconfig

<configuration>
  <source>packaged default</source>
</configuration>

Build and run the tutorial again.

$ merlin -execute target\classes
        

In the logging output we see that the configuration supplied to the component has been overrided by the information we supplied inside the xconfig resource.

[INFO   ] (tutorial.hello): configuration stage
[INFO   ] (tutorial.hello): initialization stage
[INFO   ] (tutorial.hello): source: packaged default
        

Using Target Overrides

The next tutorial shows how you can modify configurations via declaration of a set configuration override targets. This is usefull when you have a packaged deployment scenario and you want to override/suppliment the configuration with different information (such as host name, username, passwords, etc.).