Setting Runtime Dependency in Eclipse Plugin Development
Accepted answer
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
Comments
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 ?
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)
com.ibm.team.repository.service, com.ibm.team.workitem.service..
and just to be clear.. SDK means SERVER SIDE jars,
plain java means CLIENT SIDE jars.. you cannot mix.
IF you had CLIENT jars as part of the compile, then your plugin platform was set incorrectly.
com.ibm.team.workitem.ide.ui is also a client side only jar.
the libraries are split up (workitem for example)
1. com.ibm.team.workitem.client -- client only
2. com.ibm.team.workitem.common --- either
3. com.ibm.team.workitem.service -- server only
client code can use 1 & 2
server code can use 2 & 3
1 vote
Thank you so much for the explanation Sam. I really appreciate the help.
3 other answers
code plugin project<- feature plugin project <- update site plugin project (here is where the build happens, off the site.xml)
then, if you are replacing an IBM provided jar file, because the names are the same(specified in the source import, manifest,mf file, in my case 'Bundle-Version: 1.1.1.v20110524_1821', you have to manually copy your new jar file
in my case "com.ibm.team.feed.core_1.1.1.v20110524_1821.jar"
my update site contains 3 jar files after build complete
then, after install, and copy, you need to do an Eclipse - clean startup..(otherwise eclipse won't read the plugins folder for new files)
you should be able to test the code using a debug version of eclipse from the developer eclipse..
(I launch the 3.0.1.1 eclipse to test, from my 4.x eclipse development environment), the debug pass does a -clean by default
Comments
Hi Sam, Thanks for the reply. Yes i did create a feature project and update site project. I added the plugin project in feature project and then i added the feature in the update site project. When i triggered the build using site.xml --> PDE tools --> Build Site, it generated just the plugin jar and feature jar and it didnt generate or copy any of the plugin jars which i added in the manifest.mf. Am i missing something here ? (the plugin which i m developing is for both web view of RTC and for eclipse version of RTC, which means i have to deploy that to the RTC Tomcat server and start the server)
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.