How do I troubleshoot an error when exporting an Eclipse feature as a p2 repository?

331 views Asked by At

I'm ready to test a plugin I've been developing in the "real world". I mean that now that I have it working in an Eclipse Application launch configuration (from an Eclipse workspace where I have sources of all the plugins required or imported by my plugin), I want to export the plugin and install it into an IDE built with all the plugins my plugins depends on already installed.

I first tried exporting my plugin to a directory. (I chose the "Directory" radio button in the Destination tab of the export wizard.) That works without error, and a plugins directory is created containing a JAR file. I tried copying the JAR to the dropins folder of the IDE, and launching it. But my plugin doesn't appear. The functionality isn't there, and it doesn't appear in the Installation Details.

I then thought I'd try creating a p2 repository and explicitly installing from that. First I tried exporting the plugin directly, but choosing the "Install into host. Repository" radio button in the export wizard. I got this error:

Operation details
Cannot complete the install because one or more required items could not be found.
Software being installed: Toolchain 1.0.0.201312091256 (com.company.myplugin 1.0.0.201312091256)
Missing requirement: Toolchain 1.0.0.201312091256 (com.company.myplugin 1.0.0.201312091256) requires 'bundle com.company.product.otherplugin 1.0.1' but it could not be found

I'm puzzled by "complete the install". Is creating a repository considered an install?

Why would that other plugin not be found? My plugin builds just fine, because I have the sources for the other plugin in Eclipse.

In spite of the error message, these files are in the directory I specified in the export wizard: artifacts.jar, content.jar, and plugins/com.company.myplugin_1.0.0.201312091256.jar. I tried opening Install New Software… in the IDE in which I want to test my plugin, and adding the directory containing those files as a repository. But "There are no items available" is displayed. I suppose it's possible in spite of the error that the feature is successfully exported, but I don't understand how to install it.

I then tried creating a feature, which wraps only my plugin. I get a similar error message when I export it:

Operation details
Cannot complete the install because one or more required items could not be found.
Software being installed: MyPlugin Feature 1.0.0.201312091051 (com.company.MyPlugin.feature.group 1.0.0.201312091051)
Missing requirement: Toolchain 1.0.0.201312091051 (com.company.MyPlugin 1.0.0.201312091051) requires 'bundle com.company.product.otherplugin 1.0.1' but it could not be found
Cannot satisfy dependency:
From: MyPlugin Feature 1.0.0.201312091051 (com.company.MyPlugin.feature.group 1.0.0.201312091051)
To: com.company.MyPlugin [1.0.0.201312091051]

I'm at a loss on how to troubleshoot or work around this error. Any advice you have is appreciated.

0

There are 0 answers