问题
While creating the sample, I noticed very strange behavior and due to which I am somewhat stuck. I will explain the problem in 2 scenarios
Scenario 1.
- Create two Plug-ins.
- Create two features.
- Create one product & include only one feature.
- Create a category and include both the features.
- Export the product and test it using the generated launcher. Everything works fine.
Now export the deployable feature and copy the generated files into webserver.
Open install new software option and install the 2nd feature using the URL.
The feature gets installed and even gets updated with every build.
Scenario 2
- Create two Plug-ins.
- Create two features.
- Create one product & include both features. (This differs from 1st scenario, where only one feature is included.)
- Create a category and include both the features.
Export the product and test it using the generated launcher. Everything works fine.
Now export the deployable feature and copy the generated files into webserver.
Open install new software option and update the application using the URL.
The updater complains as the feature is already installed and update will be performed instead.
Unfortunately the update doesn't work and the step shows error as:
Your original request has been modified.
"Mail Protection" is already installed, so an update will be performed instead.
"Core" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
Software being installed: Mail Protection 1.0.0.201103061657 (com.example.mail.protection.feature.group 1.0.0.201103061657)
Software currently installed: RCP Product 1.0.0.201103061656 (com.example.mail.product 1.0.0.201103061656)
Only one of the following can be installed at once:
Mail Protection 1.0.0.201103061656 (com.example.mail.protection.feature.jar 1.0.0.201103061656)
Mail Protection 1.0.0.201103061657 (com.example.mail.protection.feature.jar 1.0.0.201103061657)
Cannot satisfy dependency:
From: RCP Product 1.0.0.201103061656 (com.example.mail.product 1.0.0.201103061656)
To: com.example.mail.protection.feature.group [1.0.0.201103061656]
Cannot satisfy dependency:
From: Mail Protection 1.0.0.201103061656 (com.example.mail.protection.feature.group 1.0.0.201103061656)
To: com.example.mail.protection.feature.jar [1.0.0.201103061656]
Cannot satisfy dependency:
From: Mail Protection 1.0.0.201103061657 (com.example.mail.protection.feature.group 1.0.0.201103061657)
To: com.example.mail.protection.feature.jar [1.0.0.201103061657]
This seems to be surprising as update works when I install the feature after the product has been exported.
But if the feature is already bundled with the product, then the updates to the feature are not working.
Do you know why?
回答1:
I had the same problem but i figured it out. The problem is the base plugins that are bundled with product can't be updated if we export them as a deployable features or build them through update site. The only way is to re-export your product(from product configuration) and copy the required base plugins and feature from the export folder into web server. Now check for updates again, you will see your updated base feature and updated product version in the list. You can't update only you base feature, you have to update both(feature and product). This was the show stopper and now it works for me.
回答2:
I had the same problem to update my features independent from my product. The solution is you need to make your feature as updatable by make it as a “Root level feature”
<features>
<feature id="org.eclipse.e4.rcp"/>
<feature id="org.eclipse.platform"/>
<feature id="com.codeandme.tycho.plugin.feature" installMode="root"/>
<feature id="com.codeandme.tycho.product.feature"/>
<feature id="org.eclipse.help" installMode="root"/>
<feature id="org.eclipse.emf.ecore"/>
<feature id="org.eclipse.equinox.p2.core.feature"/>
<feature id="org.eclipse.emf.common"/>
<feature id="org.eclipse.equinox.p2.rcp.feature"/>
<feature id="org.eclipse.equinox.p2.user.ui"/>
<feature id="org.eclipse.rcp"/>
<feature id="org.eclipse.equinox.p2.extras.feature"/>
</features>
I found this solution from http://codeandme.blogspot.com/2014/06/tycho-11-install-root-level-features.html and from http://www.lorenzobettini.it/2015/03/build-your-own-custom-eclipse/
来源:https://stackoverflow.com/questions/5210293/eclipse-rcp-update