I'm trying to create an update-site that is a combination of my own features and Eclipse features, which I'm adding into a "parent" feature so I only have one feature option when installing.
One of my plugins depends on an Eclipse plugin - org.eclipse.jst.j2ee.webservice, which is a required plugin in org.eclipse.jst.enterprise_core.feature. When adding that feature to my parent feature, only the feature itself is added and not the required plugins. Which I guess is expected. Is the best practice to include just the required plugin or is there another way to handle this?
<feature
id="com.my.parent.feature"
label="%featureName"
version="1.0.0.qualifier">
<includes
id="com.first.feature"
version="0.0.0"/>
<includes
id="com.second.feature"
version="0.0.0"/>
<includes
id="com.third.feature"
version="0.0.0"/>
<!-- Only adds feature to update site -->
<includes
id="org.eclipse.jst.enterprise_core.feature"
version="0.0.0"/>
<!-- plugin gets added to update site -->
<plugin
id="org.eclipse.jst.j2ee.webservice"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
<feature
id="org.eclipse.jst.enterprise_core.feature"
label="%featureName"
version="3.10.0.v201803082036"
provider-name="%providerName">
<requires>
<import plugin="org.eclipse.jst.j2ee.webservice"/>
<import plugin="org.eclipse.jst.j2ee.ejb"/>
<import plugin="org.eclipse.jst.j2ee.jca"/>
<import plugin="org.eclipse.jst.jee.ejb"/>
</requires>
</feature>
This is the usual way to do a feature.
The 'contact all update sites to find required software' option in Help > Install New Software will find the included features in the appropriate update site. This ensures that the correct plugins for the user's release of Eclipse are used.
If you included the plugins in your update site they may be the wrong version for the user's Eclipse and might cause install or run-time problems.
Note that you should add standard Eclipse features as 'Dependencies' rather than included features (this will end up in the requires
section of the feature.xml). You can specify things like a minimum version for the dependent feature here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.