##### Customizing the inherited package set from a dependency

As shown in the example above, the effective package set of the dependency contributes to the effective package set of the feature-pack declaring the dependency. The feature-pack declaring the dependency, though, is allowed to customize the package set inherited from the dependency using the already seen before *include* and *exclude* XML elements in its *feature-pack.xml*. For example:

[source,xml]
----
 <feature-pack xmlns="urn:jboss:galleon:feature-pack:1.0"
                groupId="org.jboss.fp.group1" artifactId="fp1" version="1.0.0" >
    <dependencies>
        <dependency groupId="org.jboss.fp.group2" artifactId="fp2" version="2.0.0">
            <packages>
                <exclude name="p1"/>
                <exclude name="p2"/>
                <include name="p3"/>
                <include name="p4"/>
            </packages>
        </dependency>
    </dependencies>
    <default-packages>
        <package name="p1"/>
        <package name="p2"/>
    </default-packages>
 </feature-pack>
----

Package inclusion and exclusion under the dependency element in *feature-pack.xml* file follows the same principle (and the syntax) as it was described for the provisioning XML configuration file.

Now the original effective package set of *fp1* becomes:

* *fp1* packages *p1* and *p2*;

**   plus their dependencies on non-default packages (if any);

* the original effective package set of *fp2*;

** minus packages *p1* and *p2* from *fp2* and their dependencies on other packages;

** plus packages *p3* and *p4* from *fp2* and their dependencies on other packages.

[NOTE]
*Note*: in case *fp2* in its turn depended on other feature-packs then *fp1* would inherit effective package sets of those feature-packs (possibly customized using include/exclude in the corresponding dependency declaration in the *feature-pack.xml* of *fp2*).
