### Excluding default configs from the installation

To be able to exclude a config, it needs to be identifiable. I.e. it must have a `name` associated with it. If a config doesn't have a name it still can be excluded but only altogether with the other configs like this

[source,xml]
----
<installation xmlns="urn:jboss:galleon:provisioning:1.0">
    <feature-pack groupId="org.pm.test" artifactId="fp1" version="1.0.0.Final">

        <default-configs inherit="false"/>

    </feature-pack>
</installation>
----

`inherit="false"` attribute indicates that none of the configs should be included into the installation by default. If the attribute is not present, its value is assumed to be true.

NOTE:`feature-pack` element in the example above could as well appear under `dependecies` element of another feature pack's *feature-pack.xml* file. Meaning the XML type of these elements are equivalent - they both describe a customized feature pack. The examples below will display only `feature-pack`.

If a config is a named config which is not associated with any model then it can be excluded by specifying its name, e.g.

[source,xml]
----
<feature-pack groupId="org.pm.test" artifactId="fp1" version="1.0.0.Final">
    <default-configs>
        <exclude name="config1"/>
    </default-configs>
</feature-pack>
----

If a config is associated with a name and a model, both of them have to be specified, e.g.

[source,xml]
----
<feature-pack groupId="org.pm.test" artifactId="fp1" version="1.0.0.Final">
    <default-configs>
        <exclude name="config1" model="model1"/>
    </default-configs>
</feature-pack>
----

In case there are multiple named configs that are associated with the same model, e.g.

[source,xml]
----
<feature-pack xmlns="urn:jboss:galleon:feature-pack:1.0"
              groupId="org.jboss.pm.test" artifactId="fp1" version="1.0.0">

  <config model="model1" name="config1">
    <!-- config body -->
  </config>
  <config model="model1" name="config2">
    <!-- config body -->
  </config>

  <config model="model2" name="config1">
    <!-- config body -->
  </config>
  <config model="model2" name="config2">
    <!-- config body -->
  </config>

</feature-pack>
----

[[excl-configs-by-model]]They can be excluded altogether by specifying the model name, e.g.
[source,xml]
----
<installation xmlns="urn:jboss:galleon:provisioning:1.0">
    <feature-pack groupId="org.pm.test" artifactId="fp1" version="1.0.0.Final">
        <default-configs>
            <exclude model="model1"/>
        </default-configs>
    </feature-pack>
</installation>
----

This installation will include configs *model2:config1* and *model2:config2*.
