##### Including features of specific feature specs from a group

[[fg-include-features-by-specs]]When a feature group is included into another group or a config, by default all the features it contains are added to the configuration. There is a way though to pick features of which feature specs should be included.

Suppose, we have the following group spec:
[source,xml]
----
<feature-group-spec name="group1" xmlns="urn:jboss:galleon:feature-group:1.0">

  <feature spec="feature1">
    <param name="id" value="a1"/>
  </feature>
  <feature spec="feature1">
    <param name="id" value="a2"/>
  </feature>
  <feature spec="feature2">
    <param name="id" value="b1"/>
  </feature>
  <feature spec="feature2">
    <param name="id" value="b2"/>
  </feature>

</feature-group-spec>
----

Here is how all the features of spec `feature1` can be included into the config:
[source,xml]
----
<config>
  <feature-group name="group1" inherit-features="false">
    <include spec="feature1"/>
  </feature-group>
</config>
----

NOTE: `inherit-features` attribute indicates whether the whole feature set of the group should be included into the config or not. If this attribute is not specified, its value is assumed to be `true`.

Then `include` element is specifying the feature spec features of which should be included into the config.

The config will include `feature1:id=a1` and `feature1:id=a2`.

NOTE: `<exclude feature-id="xxx"/>` elements can be used to exclude certain features from the feature set of the included feature spec.
