Using MerlinUsing configuration overridesThe Merlin command line tool allows the specification of a set of overriding configuration targets. Each target in the <targets> set contains a 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<targets> <target path="/tutorial/hello"> <configuration> <source>External configuration target.</source> </configuration> </target> </targets> ExecutionThe following command line includes the -config argument referencing a configuration target file (example included in the tutorials/configuration package). $ 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 ] (sys.hello): configuration stage [INFO ] (sys.hello): initialization stage [INFO ] (sys.hello): source: External configuration target. NotesConfiguration 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/component-name"> <configuration> <!-- your configuration info --> </configuration> </target> </targets> Moving onWe are now ready to move on to the subject of context management . |