Currently I have a plugin project at hand. I want to export it as an archived zip file so my colleagues can simply grab the file and install it by themselves.
There are dependencies, icons, and some files in my plugin. Everything works in debug mode, but problems arise once I try to deploy the plugin.
Below are the approaches I have tried with no success.
Approach 1
- Right click on my plugin project
- Click "Export..."
- Select "Deployable plug-ins and fragments"
- Check my plugin
- Under "Destination" tab, select "Archive file", then set the export path
- Under "Options" tab, check "Package plug-ins as individual JAR archives" and "Allow for binary cycles in target platform"
- Click "Finish"
The archive file contains a "plugin" folder with one jar file inside. Then, I copy the jar file to "C:\eclipse\dropins" and restart Eclipse. I can see my plugin there but an error will be generated if I run the wizard defined in the plugin, saying that the "Activator" class cannot be found.
Approach 2
- Create a Feature Project
- Enter a name and click "Next"
- Select "Initialize from the plug-ins list" and check my plugin
- Click "Finish"
- Open "feature.xml" and go to the "Dependencies" tab
- Click "Compute"
- Save the file
- Right click the feature project and click "Export..."
- Select "Deployable features" and click "Next"
- Check my feature in "Available Features"
- Under "Destination" tab, select "Archive file", then set the export path
- Under "Options" tab, select "Package as individual JAR archives" and check the two sub-checkboxes, check "Allow for binary cycles in target platform"
- Click "Finish"
There are 2 folders and 2 jar files in the zip file. I copy the contents in both the folders "features" and "plugins" to their counterparts in my Eclipse folder. It is better this time, I can see my icon next to my wizard, but there is an error "Unexpected Exception: MyTestPlugin Feature does not exist (org.eclipse.jdt.core)".
I tried using different export options, and use the Eclipse UI (Help --> Install new software...) to install the plugin. They just did not work.
As I am new in this field, I would like to know how to export and import an Eclipse plugin.