Setting Runtime Dependency in Eclipse Plugin Development
Hi,
I m very new to Eclipse plugin development. I m trying to develop a plugin to extend some features of Rational Team Concert (RTC). I m trying to understand very basic concept here. Whenever we extend some functionality we are adding the corresponding plugin in Dependencies Tab and eventually it gets updated in Manifest.MF. After saving the file i can see the changes under the section Require-Bundle: of Manifest.MF.
My question is - When i deploy the new plugin which i developed, how the runtime environment will be able to pick the plugin from the corresponding path in the file system though in Manifest.mf we just have require-bundle names. ( I understand that during the development time we specify the Target Platform because of which we are able to add the dependent plugin in the Manifest.mf).
I m trying to understand is there any setting or config file in which we specify the path of the SDK or plugin repository when the server starts up. I searched in many sites but i didnt get any solution ( may be its a very basic)
|
Accepted answer
ok, on the server side, you should be able to find each of those plugins in one of the server plugin directories
on my 3.0.1.1 server these are in one of these directories Directory of M:\rtc server 3.0.1.1\server\conf\ccm\sites <p> 11/27/2012 10:32 PM <DIR> enterprise-update-site 11/27/2012 10:31 PM <DIR> rtc-commons-update-site 11/27/2012 10:31 PM <DIR> update-site </p> if not, then your sdk and server runtime are out of synch. the eclipse plugin.xml dependency checker can help make sure at least you have the right info according to the eclipse Window->Preferences->Plugin Development->Target Platform selection. my operation advisors install without problems like this.. the other thing you could do is to remove the version dependency from manifest. here is one of my advisor manifest.mf file, note that no specific versions are required. Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Enforce resolving dependencies Bundle-SymbolicName: Save_Operation_Advisor;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-RequiredExecutionEnvironment: J2SE-1.5 Require-Bundle: com.ibm.team.process.common, com.ibm.team.workitem.common, com.ibm.team.repository.common, com.ibm.team.repository.service Import-Package: org.eclipse.core.runtime, org.osgi.framework Bundle-ActivationPolicy: lazy ADALARASU R S selected this answer as the correct answer
Comments
ADALARASU R S
commented Dec 05 '12, 1:22 p.m.
Hi Sam, Thats a great explanation. I agree that all the above plugin jars mentioned are available in one of the directories of RTC server 3.0.1.1\server\conf\ccm\sites. One last ques from the above explanation, you mentioned tht my SDK & Server runtime may out of sync.. But what if one of the plugin is missing, How to sync the server runtime with SDK plugins ?
eg: lets say i need to use the following plugin dependencies - com.ibm.team.jface; com.ibm.team.workitem.ide.ui, com.ibm.team.repository.client in one of the plugin customization, which is currently not part of Server runtime. But I know where the dependency jars are located in my file system. Where am i supposed to copy these jars in the server so that when the plugin looking for the above mentioned jars is loaded it will not through missing require bundle error.
1
you can NEVER EVER use a ____.client jar on the server.. you must find the equivalent function in some server SERVICE.jar (and you WILL have to change your code, as the server api parameters are usually different)
ADALARASU R S
commented Dec 05 '12, 2:00 p.m.
Thank you so much for the explanation Sam. I really appreciate the help. |
3 other answers
now that you have BUILT the code (jars) , you have to INSTALL in into eclipse
Help->Install New Software, Add, push Local, navigate to the location of site.xml in your development environment for the update site project. give the entry a Name. press Save then select the new 'site' in the dropdown, and make sure to deselect group by in the lower left then select your Update site name. then follow the install button path. if you are replacing one of the IBM distributed JAR files (like I do), then the install requires one extra step as the install won't overlay same named files.. you have to do that manually. then after all that, restart Eclipse with the -clean parameter to get it to re-read the plugins folder.. for Web there is a different process.. you have to deploy to the server\conf\ccm\sites folder and create a provisioning profile, then tell the server to reload plugins, and then restart the server so that it actually does this. (and to uninstall, its the same).. I know there are documents on the jazz.net/library, but I don't know which one covers which topic anymore. (maybe Ralph will be along soon to help out here) my client plugin talks to a new server service, so I have to do both.. and one of my prior exercises also had web javascript changes as well. |
Hi Sam, Thank you so much for the reply. I completely accept the solution which you provided above for a plugin which works in Eclipse IDE environment.
But in my case what i m trying to do is to deploy a plugin in a server. For example i was trying to follow the example mentioned in the following link. ( https://www.ibm.com/developerworks/mydeveloperworks/blogs/extendingrtc/entry/checksummaryadvisor?lang=en) in which they are trying to extend the Extension point ( com.ibm.team.proccess.service.operationAdvisors).
In this case, plugin will be deployed to a RTC Jazz server (tomcat server with OSGI). I developed the same example and deployed in my local server and when the plugin was starting, it just stopped in INSTALLED state because of missing bundles. Please find the following errors. But all the jars mentioned were part of RTC SDK, still when the plugin is deployed in server its not able to resolve it.
Direct constraints which are unresolved:
Missing required bundle com.ibm.team.process.common_1.2.1.
Missing required bundle com.ibm.team.repository.common_1.1.1.
Missing required bundle com.ibm.team.repository.service_1.1.1.
Missing required bundle com.ibm.team.workitem.common_3.0.1.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.