Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Problem updating singleton plugins with p2

We are building an Eclipse RCP based application. It consists of several features. Our team is developing one of them. Let’s call this feature ‘update’. It consists of three bundles: ‘util’, ‘ws’ and ‘ui’.

My current task is to trigger an update with p2 of this ‘update’ feature. For that purpose I have a repository with the new version of my feature and its plugins uploaded on a web server.
Within one of the above bundles ( the ‘ui’ bundle to be precise) I have the following code snippet:
        URL guiRepositoryLocation = getGuiRepository();
        DirectorApplication director = new DirectorApplication(); String[] { "-repository", guiRepositoryLocation.toString(), "-installIU",
                "", "-uninstallIU", "", "-destination", ".", "-profile",
                "profile" });
The director application loads the profile and the repository, finds the features in both locations, but at the end fails with the following error:
Installation failed.
Cannot complete the install because of a conflicting dependency.
Software being installed: Feature (
Software currently installed: Product (product
Only one of the following can be installed at once:
  Product - Update Web Service Client (ws
  Product - Update Web Service Client (ws
Cannot satisfy dependency:
  From: Feature (
  To: ws []
Cannot satisfy dependency:
  From: Feature (
  To: ws []
Cannot satisfy dependency:
  From: Product (product
  To: []
Indeed the ‘ws’ plugin is singleton (actually all three plugins are). I can easily change it not to be singleton, but I’m afraid I cannot do it with the ‘ui’ plugin. As its name implies, it contains the UI controls of our feature. They are described in plugin.xml. So when I tried to change the ‘ui’ plugin to be non-singleton, my IDE complained that it was not possible.
Anyway, I would expect that p2 handles both singleton and non-singleton plugins.
Could you please advise me how to trigger the update?

Back to the top