link
Avalon
Avalon Central
Home PlanetProductsCentral
Using Merlin
Declaring a Configuration in the Component Directive

We can overwrite the default configuration behaviour by including a configuration within the block.xml deployment directive.

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

<container name="hello">

     <component name="hello" class="tutorial.HelloComponent">
       <configuration>
         <source>explicit configuration within block</source>
       </configuration>
     </component>

</container>

Build and run the tutorial again.

$ maven
$ 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 <component> directive.

[INFO   ] (hello): configuration stage
[INFO   ] (hello): initialization stage
[INFO   ] (hello): source: explicit configuration within block
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.).