### Disabling package inheritance from a dependency

The effective package set of a dependency is inherited by the feature-pack declaring the dependency. However, it is possible to declare the dependency without inheriting its effective package set and simply pick the packages explicity under `dependency` element (in other words, explicitly define the effective package set of the dependency).

Optional boolean attribute `inherit` of element `packages` controls whether package inheritance is enabled or disabled. In case the attribute is not explicitly specified, its value is assumed to be true. Here is an example of a dependency with disabled package inheritance:

[source,xml]
----
 <feature-pack xmlns="urn:jboss:galleon:feature-pack:2.0"
                location="fp1@maven(org.jboss.universe:community-universe):1#1.0.0" >
    <dependencies>
        <dependency location="fp2@maven(org.jboss.universe:community-universe):2#2.0.0">
            <packages inherit=”false”>
                <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>
----

Now the effective package set of the distribution provisioned from `fp1` becomes:

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

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

* `fp2` packages `p3` and `p4`;

** plus their dependencies on non-default packages minus packages `p1` and `p2` from `fp2` and their dependencies on other packages.
