An include directive instructs Merlin to load and deploy the block defined within the referenced jar file as a subcontainer within the enclosing container. The include directive is equivalent to the nesting of a full block definition within another block. Block includes enable composition of pre-packaged component based solutions as the included block appears to other components as a regular component (exposing services and dependecies, etc.).
The following example block.xml demonstrates the inclusion of three blocks within another enclosing block. In this example, the common shared API (containing service interfaces classes is declared in the containing block classloader).
<container name="tutorial">
<classloader>
<classpath>
<repository>
<resource id="tutorial:composition-api" version="1.0"/>
</repository>
</classpath>
</classloader>
<include name="publisher">
id="tutorial:composition-publisher" version="1.0"/>
<include name="application">
id="tutorial:composition-application" version="1.0"/>
<include name="location">
id="tutorial:composition-location" version="1.0"/>
</container>