#### Feature package dependencies

[[feature-package-deps]]Feature specs representing configurable components of the installation may include dependencies on feature-pack packages that contain certain binary content (e.g. JAR files) of those installation components. So that, when a feature is included into configuration, the packages the feature will require at runtime will automatically be added to the list of the installed packages.

Package dependencies are configured under `packages` element of the feature spec which is equivalent to the <<package-deps,`dependencies` element of the package spec metadata>>. Here is an example
[source,xml]
----
 <feature-spec name="feature1" xmlns="urn:jboss:galleon:feature-spec:1.0">
   <params>
     <param name="id" feature-id="true"/>
   </params>
   <packages>
     <package name="p1"/>
     <package name="p2" optional="true"/>
     <origin name="another-feature-pack">
       <package name="p2"/>
       <package name="p3" optional="true"/>
     </origin>
   </packages>
 </feature-spec>
----

In this case, any feature of spec `feature1` will have:

* a required dependency on package `p1`;

* an optional dependency on package `p2`;

* a required dependency on package `p2` from the feature-pack dependency refered to as `another-feature-pack`;

* an optional dependency on package `p3` from the feature-pack dependency refered to as `another-feature-pack`.

