I tried importing a plugin as a source project in my workspace. Now I am getting a package does not exist in this plugin error in the Manifest.mf file. But the packages do exist in the source folder of the same plugin. What could be the issue? I tried googling but I could find only these kind of errors when the package is coming from a different eclipse project. Pls give me some light on this
http://i.stack.imgur.com/g2lrE.png
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: xyz Plug-in 2.1.0
Bundle-SymbolicName: com.abc.xyz
Bundle-Version: 2.1.0
Bundle-ClassPath: xyz.jar
Bundle-Activator: com.abc.xyz.xyzPlugin
Bundle-Vendor: FHG
Bundle-Localization: plugin
Export-Package: xyz.common,
xyz.common.pattern,
xyz.cursor,
xyz.dm.common,
xyz.dom,
xyz.dom.bootModel,
xyz.dom.exception,
xyz.dom.x,
xyz.errmsg,
xyz.eventHandling,
xyz.mof,
xyz.mof.exception,
xyz.mof.x,
xyz.versioning.extent,
xyz.versioning.versionstore,
com.CH_co.cryptx,
com.CH_co.util,
com.abc.xyz,
com.abc.xyz.uuid,
com.tools,
config,
mdd.delta.model,
mdd.diffmerge,
mdd.diffmerge.event,
mdd.model,
transactionHandling,
uuidGenerator
Eclipse-AutoStart: true
Require-Bundle: org.eclipse.core.runtime,
com.abc.mdd.common
This is the manifest.mf file
The answer I found was a bit strange and I am unable to find the logic behind it. I deleted the errors in the Problems view and restarted the eclipse in clean mode. It started working. Pls let me know what could be the reason behind it
Related
We have an eclipse Luna plugin application which we're trying to build with Tycho. When we try to do a mvn clean verify, we're getting this type of message:
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: our.app 1.0.0.qualifier
[ERROR] Missing requirement: our.app 1.0.0.qualifier requires 'bundle org.eclipse.core.runtime 3.7.0' but it could not be found
When we look at the logs it appears that any Eclipse plugin that is required will give us this error, and that this is merely the first item in the list on the MANIFEST.MF for the plugin being verified.
I have looked at other questions, but none of them seem to address this particular issue. Any suggestions would be greatly appreciated.
MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Our App
Bundle-SymbolicName: our.app;singleton:=true
Built-By: Our Team (2014)
Bundle-ClassPath: .,
<some jars>
Bundle-Vendor: Our Team
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.ui.forms;bundle-version="3.6.0",
org.eclipse.wst.sse.ui;bundle-version="1.3.0",
org.eclipse.jface.text;bundle-version="3.8.100",
org.eclipse.ui.workbench.texteditor;bundle-version="3.8.101",
org.eclipse.ui.views;bundle-version="3.6.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Version: 1.0.0.qualifier
I get a similar error if I remove the <repository>-tag from the pom.
Without that information Tycho does not know where to download the required packages.
Therefore you have to add the following snippet to your pom:
<repository>
<id>eclipse-indigo</id>
<url>http://download.eclipse.org/releases/indigo</url>
<layout>p2</layout>
</repository>
I copied the snippet from here, for more information look here.
Tycho reads your MANIFEST.MF and feature.xml to find the dependencies of your plugins and adds them (temporarily) to your POMs which are used by Maven to perform the build. The idea of Tycho is to maintain the dependencies solely in the MANIFEST.MF and feature.xml, freeing you from the need to add them to the POMs, too. However, you still need to add an appropriate repository, usually in the parent POM, in which the dependent plugins can be found. This is obviously missing in your POMs.
It is known that any dependent plugin in a plugin gets loaded only when referenced portion (of dependent plugin) gets called up due to lazy loading concept . In that case, I have a doubt how does the dependencies in a plugin gets resolved. Is it via the name check in plugin registry ?
Platform plug-in loader checks the plug-in dependencies in MANIFEST.MF file. The content of typical MANIFEST.MF file looks like:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: XXX;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: XXX
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Eclipse-BundleShape: dir
Require-Bundle: Plugin id 1,
Plugin id 2,
Plugin id 3,
Plugin id 4
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Here Require-Bundle property lists all dependent plug-ins.
Read more about this here
Use this plugin to check dependencies.
im not sure whether its an issue with the plugin or eclipse.Recently im working on this plugin and i was using Indigo /JavaSE7 .When i launch it as an eclipse application im getting my plugin on top. I also exported it as a plugin(export>deployable plugins...) and put in the plugins folder, it is visible and working fine.I tried putting it in Eclipse/Galileo in my machine and it works fine.The problem is When my colleague puts this jar in Eclipse /Indigo Plugins folder(Any other system apart from mine) it is not visible and not even any signs of it.
i'm not sure if it has some thing to do with the JRE/SDK,please help me out.
Im attaching the manifest file if anything missing:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: XTechnologySolutions
Bundle-SymbolicName: com.xquery.review.plugin; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.xquery.review.plugin.Activator
Bundle-Vendor: CognizantTechnologySolutions
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources;bundle-version="3.7.101",
org.eclipse.ui.ide
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: src/lib/log4j-1.2.17.jar,
.,
src/lib/XQueryReview.jar
Import-Package: org.eclipse.jface.text
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
thanks in advance ...
Take a look at the answers from this Stackoverflow post... has good information on how to debug plugin loading issues
Eclipse doesn't load plugins in the dropins folder
Firstly, I have tried the method given in official page of eclipse . But I really do not get my gson jar working, the error is still : Class not found.
This is my manifest.fm :
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Eclipseplugin
Bundle-SymbolicName: com.snipplr.eclipseplugin; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.snipplr.eclipseplugin.Activator
Bundle-Vendor: SNIPPLR
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jface.text;bundle-version="3.7.1",
org.eclipse.ui.editors;bundle-version="3.7.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: com.google.gson
Bundle-ClassPath: library.jar,
.
Import-Package: com.google.gson
I just declare a simple gson as : Gson gson = new Gson();
My question is:
What's wrong in my doing ?
After the success following Francis answer, I have another question. Can I simplify the steps to how to include 3rd jar :
Step 1 : add jar file to your project
Step 2 : Bundle-ClassPath: library.jar, . << Add bundle-classpath which lead to your jar to manifest.fm
Does it work ?
If you need any information, just ask in comment. I will watch this all day till it's done :P . Thanks
Your Bundle-Classpath needs to have gson.jar in it. You can do this in the manifest file directly, or on the Runtime tab add it to the classpath part with the GUI.
To answer your further questions:
Well step 2 would be to include your gson.jar file. I don't know what's in library.jar. As I said above you can do that through the GUI by using the classpath portion of the Runtime tab in the manifest editor. Adding it to the classpath there will also add it to your Java build classpath.
You also don't need to have the Export-Package for com.google.json if you are just using it in your plugin, the purpose of Export-Package is to provide it to another plugin that might use your plugin.
Most esteemed host of Eclipse magi ..
I am trying to create an instance of the org.eclipse.jdt.ui.wizards.NewClassWizardPage class. I have one project where I do this, and it will compile & run on Linux, but not on a Mac. Both machines are running the Helios edition of Eclipse with the PDE, both were downloaded with the last week.
The bundle org.eclipse.jdt.ui is available on the Mac, but for some reason the Mac will not compile the phrase
import org.eclipse.jdt.ui.wizards.NewClassWizardPage;
Saying "The import org.eclipse.jdt.ui.wizards.NewClassWizardPage cannot be resolved". The MANIFEST.MF is a simple one ..
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: RcpTest0
Bundle-SymbolicName: rcpTest0; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: rcptest0.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt,
org.eclipse.jdt.core,
org.eclipse.jdt.ui
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Your clues & boos are all most welcome.
Aha! The answer was that I had current versions of the JDT checked out in other projects in the workspace. They were being picked in preference over the JARs. Now to understand how I can get the PDE and JDT source bundles downloaded & installed.