John Smith
John Smith

Reputation: 787

Eclipse integrating plugin in project

I have a plugin with a view and I tried to integrate it into a project. The problem is that I get the error :

!ENTRY org.eclipse.update.configurator 4 0 2014-08-20 16:17:35.087
!MESSAGE Plugin does not have a valid identifier: plugins/PluginTest.jar

and

!ENTRY org.eclipse.update.configurator 4 0 2014-08-20 16:17:35.088
!MESSAGE Plugin does not have a valid version: plugins/PluginTest.jar

and

!ENTRY org.eclipse.ui 4 0 2014-08-20 16:17:40.138
!MESSAGE Problems occurred restoring workbench.

I copied the .jar file in the eclipse/plugin/ folder. What can be the cause of this errors ?

Upvotes: 0

Views: 588

Answers (2)

greg-449
greg-449

Reputation: 111217

You should create a Eclipse plugin project using 'File > New > Project.. > Plug-in Project'.

This will prompt you for values such as the plugin id and version and create a META-INF/MANIFEST.MF file containing these values.

enter image description here

A minimal version of the MANIFEST.MF might look like:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: PluginTest
Bundle-SymbolicName: PluginTest;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

Other files important for plugins such as the build.properties will also be created and the 'plugin nature' will be added to .project file which makes many plugin specific entries appear in the Project Properties and context menus.

Upvotes: 2

Bruno Franco
Bruno Franco

Reputation: 2037

Is the plugin's header right?

Maybe it doesn't have the version on it's header, here is an example:

    Plugin Name: Test Plugin
    Plugin URI: http://testUri
    Description: Testing description
    Author: Us
    Version: 0.1-alpha
    Author URI: http://myProfile
    Text Domain: testing
    Domain Path: /lang

Here is a good link: http://codex.wordpress.org/File_Header

Are you building the plugin or just downloaded it?

Upvotes: 1

Related Questions