If a feature needs functionality provided by another feature, it can be declared via the feature.xml
file of the feature itself. For example, installing the E4 feature may depend on some runtime components provided by JGit, so installing the JGit feature will mean that everything required is present.
To add JGit as a dependency to the E4 feature.
Edit the
feature.xml
file and go to the Dependencies tab:Click on Add Feature and select
org.eclipse.jgit
from the list. It will fill in a version range using the exact version specified in the plug-in; invariably it is better to substitute that with a lower-bound version number since that will allow the feature to be installed with a dependency that is slightly lower. This will result in afeature.xml
that looks like:<feature id="com.packtpub.e4.feature" label="Feature" version="1.0.0.qualifier" provider-name="PACKTPUB"> <requires> <import feature="org.eclipse.jgit" version="4...