### Content of config element

`config` element is basically an extended version of <<_feature_groups,`feature-group` element>>. Meaning that everything that is allowed in the body of `feature-group` is allowed in `config` element. Which means `feature` and `feature-group` elements (as well as `origin` element for explicit dependency origins).

Besides that `config` element supports already mentioned in an earlier chapter the <<_configuration_model_attributes, config attributes>> and `props` element.

NOTE: When a `config` element appears in a `feature-pack.xml` or as a child of `installation` element, it represents all the configs with the matching identity merged into one model from all the feature-pack dependencies up to the current point.

E.g. if feature-pack *FP1* depends on feature-pack *FP2* which includes config model *M1* named *N1*. Element `config` with attributes `model="M1" name="N1"` added to *FP1* will represent the corresponding config from *FP2* (unless the config inheritance was explicitly disabled in *FP1*), i.e. the content of config *M1:N1* from *FP2* may be manipulated in `config` element in *FP1* by excluding certain features or overwriting their parameters.

The same applies to `config` elements under `installation` element. If `installation` includes feature-packs *FP3* and *FP4*, both of which include configs *M1:N1*, `config` element with attributes `model="M1" name="N1"` added under the `installation` element will represent the result of merging configs *M1:N1* from feature-packs *FP3* and *FP4*.

#### Config properties

`props` element allows to attach various properties to the configuration described by the `config` element that can be meaningful for the provisioning plugin processing the configuration. 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.Final">
  <config name="main" model="modelA">
    <props>
      <prop name="save-to-file" value="model-a.xml"/>
      <prop name="other" value="thing"/>
    </props>
    <feature spec="feature1">
      <param name="id" value="1"/>
      <param name="a" value="fp1-modelA"/>
    </feature>
  </config>
</feature-pack>
----

#### Overwriting properties during config inclusion

When a default config is included, its properties can be overwritten, 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>
            <include name="main" model="modelA">
              <props>
                <prop name="save-to-file" value="main-model-a.xml"/>
              </props>
            </include>
        </default-configs>
    </feature-pack>
</installation>
----

The resolved config will include the following properties:

* save-to-file=main-model-a.xml;

* other=thing.

#### Overwriting properties when merging configs

When the <<_configuration_model_merges,configs are merged>>, their properties are also merged. The config that is included later into the installation overwrites the properties of the config which was added before. 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.Final">
  <config model="modelA">
    <props>
      <prop name="save-to-file" value="model-a.xml"/>
      <prop name="other" value="thing"/>
    </props>
    <feature spec="feature1">
      <param name="id" value="1"/>
      <param name="a" value="fp1-modelA"/>
    </feature>
  </config>
</feature-pack>
----

[source,xml]
----
<feature-pack xmlns="urn:jboss:galleon:feature-pack:1.0"
              groupId="org.jboss.pm.test" artifactId="fp2" version="1.0.0.Final">
  <dependencies>
    <dependency groupId="org.jboss.pm.test" artifactId="fp1" version="1.0.0.Final">
      <name>fp1-dep</name>
    </dependency>
  </dependencies>
  <config name="main" model="modelA">
    <props>
      <prop name="save-to-file" value="main-model-a.xml"/>
    </props>
    <origin name="fp1-dep">
      <feature spec="feature1">
        <param name="id" value="1"/>
        <param name="a" value="fp2-modelA"/>
      </feature>
    </origin>
  </config>
</feature-pack>
----

The resolve configuration *modelA:main* will contain the following properties:

* save-to-file=main-model-a.xml;

* other=thing.

