We are developing plugins for Eclipse and we have a plugin (let's call it pluginA) that has a p2.inf under /pluginA/META-INF. This file contains some configuration instructions when installed/updated. Along with pluginA is another plugin (i.e. pluginB). This is where my custom ProvisioningAction class is located.
The issue is when I updated the p2.inf in pluginA and the custom action in pluginB and then build the Update Site, then do a 'Check for Updates' in Eclipse using the new Update Site, the p2 process runs the new version of the p2.inf but runs the old version of the action code in pluginB.
I read online that I need to change the version in the metaRequirement in my p2.inf. I changed it from 1.0.0, to 1.14.7 to coincide with our release id. I did that and now it throws an error that says a conflict between the old and new plugin so it cannot be installed.
It throws this error during the update.
Cannot complete the install because of a conflicting dependency.
Software being installed: FSD Core Application (Required) 1.14.7.202509161557 (com.mycorp.pluginApp.feature.group 1.14.7.202509161557)
Only one of the following can be installed at once:
FSD P2 Touchpoint 1.14.1.v20250327-518478546144 (com.mycorp.pluginB 1.14.1.v20250327-518478546144)
FSD P2 Touchpoint 1.14.7.202509161557 (com.mycorp.pluginB 1.14.7.202509161557)
Cannot satisfy dependency:
From: FSD Core Application (Required) 1.14.7.202509161557 (com.mycorp.pluginApp.feature.group 1.14.7.202509161557)
To: org.eclipse.equinox.p2.iu; com.mycorp.pluginB [1.14.7.202509161557,1.14.7.202509161557]
Cannot satisfy dependency:
From: FSD Core Application (Required) 1.14.7.202509161557 (com.mycorp.pluginApp.feature.group 1.14.7.202509161557)
To: org.eclipse.equinox.p2.iu; com.mycorp.pluginA [1.14.7.202509161557,1.14.7.202509161557]
Cannot satisfy dependency:
From: FSD Product 1.14.7.202509161557 (com.mycorp.pluginA 1.14.7.202509161557)
To: org.eclipse.equinox.p2.iu; com.mycorp.pluginB [1.14.7,2.0.0)
Here is my p2.inf. I don't think the update.replace helps, if I remove it, it still throws the same error as above.
metaRequirements.0.namespace=org.eclipse.equinox.p2.iu
metaRequirements.0.name=com.mycorp.pluginB
metaRequirements.0.range=1.14.7
# Tell p2 that the new IU replaces older ones in this range
update.replace.0.id=com.mycorp.pluginB
update.replace.0.range=[1.0.0,1.14.7)
... <some p2 touchpoint instructions below> ...
Here is the plugin.xml entry for the custom action.
<plugin>
<extension
point="org.eclipse.equinox.p2.engine.actions">
<action
class="com.mycorp.pluginB.actions.UpgradeCopyAction"
name="upgradeCopy"
touchpointType="com.mycorp.pluginB.touchpoints.type"
version="1.14.7">
</action>
</extension>
<extension
id="fsd"
name="FSD Touchpoint"
point="org.eclipse.equinox.p2.engine.touchpoints">
<touchpoint
class="com.mycorp.pluginB.touchpoints.FsdP2Touchpoint"
type="com.mycorp.pluginB.touchpoints.type"
version="1.14.7">
</touchpoint>
</extension>
</plugin>
What am I missing? Thanks in advance!