unable to deploy RTC scm cli plugin
kanjbala jawahar (60●1●8●16)
| asked Oct 21 '13, 1:08 p.m.
retagged Dec 16 '13, 5:48 p.m. by David Lafreniere (4.8k●7)
Hello,
I am extending RTC SCM CLI for tWAS (Websphere) production build environment. The entire coding/deploying process has been relatively smooth thus far. So far we have been able to successfully extend the snapshot/baseline, work item, approval and other work flows. This time I am extending parts of build system toolkit using the same plugin. Until now, all the dependency jars for this plugin were right under: C:\RTC-Client-Win-3.0.1.4\jazz\scmtools\eclipse\plugins i.e. directly where the "scm -v" would look for them. But for these new Jazz build engine classes (in the plugin) the dependency jars are located in another area of my file system: c:\rtc30\plugins\com.ibm.team.build.client_3.0.2.v20110831_0247.jar c:\rtc30\plugins\com.ibm.team.build.common_3.0.2.v20110831_0247.jar not where "scm" looks for, I suppose. So, I tried all of the variations shown below, with no success: --adding Class-Path to manifest file: Class-Path: \c:\rtc30\plugins\com.ibm.team.build.client_3.0.2.v20110831_0247.jar \c:\rtc30\plugins\com.ibm.team.build.common_3.0.2.v20110831_0247.jar --set Windows 7 system classpath env. variable .;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;c:\rtc30\plugins\com.ibm.team.build.client_3.0.2.v20110831_0247.jar;c:\rtc30\plugins\com.ibm.team.build.common_3.0.2.v20110831_0247.jar --I don't know how to pass classpath to scm.exe, so I tried to use lscm.bat: SET PRGPATH=%~dp0 SET JAVA="C:\Program Files (x86)\IBM\Java60\jre\bin\java" <<< I changed it to my java. SET SCM_DAEMON_PATH="%PRGPATH%scm.exe" %JAVA% -Xquickstart -Xshareclasses -classpath "%PRGPATH%\plugins\com.ibm.team.filesystem.cli.minimal_3.0.2.v20110819_0209.jar;%PRGPATH%\plugins\com.ibm.team.filesystem.cli.core_3.0.3.v20120308_1209.jar;%PRGPATH%\plugins\com.ibm.team.filesystem.client.daemon_3.0.2.v20110819_0209.jar;%PRGPATH%\plugins\org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100.jar;%PRGPATH%\plugins\com.ibm.team.filesystem.client_3.0.5.v20120531_0151.jar;%PRGPATH%\plugins\org.eclipse.osgi_3.5.2.R35x_v20100126.jar;%PRGPATH%\plugins\com.ibm.team.repository.common_1.3.100.v20120711_1525.jar;c:\rtc30\plugins\com.ibm.team.build.client_3.0.2.v20110831_0247.jar;c:\rtc30\plugins\com.ibm.team.build.common_3.0.2.v20110831_0247.jar;." com.ibm.team.filesystem.cli.minimal.client.FrontEndClient "lscm" %* None of the above worked. However, as soon as I copy and place those jars under: C:\RTC-Client-Win-3.0.1.4\jazz\scmtools\eclipse\plugins everything works great. But this is not acceptable. I need to be able point to these jar dependencies, not bundle them with my plugin jar. I need to do this for both windows and unix environments. Please advise. Thanks in advance. |
4 answers
Hi Kanjbala, sorry that this hasn't received any reply until now.
Can you clarify what you're trying to do, at a higher level? Which part of the build system toolkit do you want to extend, the Ant tasks or JBE? What are the extensions you're trying to make?
It's hard to tell just from the path what c:\rtc30 is referring to. Is it a Build System Toolkit install, an RTC Eclipse client, or something else?
Comments
kanjbala jawahar
commented Nov 06 '13, 10:41 a.m.
Hi Nick,
If you have the SDK as your target platform, then com.ibm.team.build.common and com.ibm.team.build.client should already be in there. You should be able to add them to your plugin's classpath in the same way you did for any of the other plugins you're compiling against. I recommend using a plugin project and using PDE's support for compiling against different plugins, even if the code will eventually run as a plain Java client (not under Eclipse/Equinox, i.e. OSGi). That way managing dedendencies is much easier -- you can just add prereq plugins using the plugin manifest editor.
kanjbala jawahar
commented Nov 10 '13, 10:59 a.m.
Nick, I did try it. As you will see from my original question, I added these two jars to my manifest and it did not help.
|
If you want to access jars from OUTSIDE the server runtime directory, you need to use the external keyword
note that this will only work where the paths are correct (and the server has access to those folders/files) of course Comments
kanjbala jawahar
commented Nov 14 '13, 3:59 p.m.
Ok, this fixes one aspect but breaks another piece. I would like to show what I am talking about. Is it possible to do this in a non-forum format, until we figure out the fix? Thanks.
sam detweiler
commented Nov 14 '13, 4:01 p.m.
you can send stuff to me.. sdetweil at gmail. not everything has to be external of course
kanjbala jawahar
commented Nov 14 '13, 6:51 p.m.
I will not be able to send company confidential source to external email.
sam detweiler
commented Nov 14 '13, 10:04 p.m.
show me the plugin.xml, and manifest.
kanjbala jawahar
commented Nov 20 '13, 11:25 a.m.
Sam, I will get back to you regarding the plugin.xml and manifest after I have tried a couple of things.
|
Hello Nick,
I tried your instructions, at least as best as I could, not knowing your complete environment. These were your instructions: I did some explorations on Friday, but this was hampered by the fact that the SCM CLI in RTC 4.x is missing the P2 bundles for supporting dropins, which would explain why putting the bundles in dropins wasn't having any effect.This is what I did, and was unsuccessful in getting the same results as you: (I was not sure about some of the instructions, so I made my own assumptions at some places, as you will see below.) Here is why I made some assumptions: 1. I do not have a .../jazz/scmtools/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info but I do have a ...\jazz\client\eclipse\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info (see the difference). 2. You said: "I put the jar for my test bundle (com.ibm.team.build.test.scm-cli-ext) in a new sibling to the plugins folder, called build, then changed ..." Sibling to which plugins folder? jazz\client\eclipse\plugins or jazz\scmtools\eclipse\plugins I chose jazz\client\eclipse\plugins due to the location of file bundles.info in my environment. Next, I did this: --Created a sibling dir called "build" to jazz\client\eclipse\plugins --Placed my bundle jar in there, namely, com.ibm.mrbuild.rtc.cli_2.0.0.testengine.jar --Modified jazz\client\eclipse\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info to have the following line: com.ibm.mrbuild.rtc.cli,2.0.0.testengine,build/com.ibm.mrbuild.rtc.cli_2.0.0.testengine.jar this bundles.info already had the following two lines: com.ibm.team.build.client,3.0.2.v20110831_0247,plugins/com.ibm.team.build.client_3.0.2.v20110831_0247.jar,4,false com.ibm.team.build.common,3.0.2.v20110831_0247,../../../../rtc30/plugins/com.ibm.team.build.common_3.0.2.v20110831_0247.jar,4,false Then I ran "scm -v" from under the ...\jazz\scmtools\eclipse directory and got no info. on my bundle. I need to be able to see the following info for my bundle: com.ibm.mrbuild.rtc.cli, version 2.0.0.testengine Please let me know what I am missing or where I am going wrong. Also as you can see it is difficult to do this via forum. I would like to continue this offline until we fig. out the solution and once we arrive at the answer I can post it here. I am assuming you wanted me to post this data here and not in the work item that you opened, i.e., work item 292967. Comments Hi Kanj, I was using RTC 4.x, which I assumed worked the same as RTC 3.x for how plugins got deployed by the SCM CLI, but it turns out 3.x does not use the P2 simple configurator, but rather the older Eclipse update manager. This explains why you don't have scmtools/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info. My apologies for the resulting confusion.
With 3.x, you should be able to:
- copy the jars for com.ibm.team.build.common and com.ibm.team.build.client to scmtools/eclipse/plugins (you can get these from either the build system toolkit, or the RTC Eclipse client, e.g. under jazz/client/eclipse/plugins)
- copy your jars to scmtools/eclipse/plugins
- run scm with -clean the first time, to get it to re-scan the plugins directory
For debugging, also add: -debug -consoleLog
which will show any plugin resolution / dependency issues in the console output.
kanjbala jawahar
commented Jan 08 '14, 11:14 a.m.
Nick, I have already done what you have described and that works.
However, as soon as I copy and place those jars under:But we want a better solution, that does not require moving jars around. Are we saying that there is no other better solution for 3.x? 1
I guess it depends on the existing install that you expect your users to have, that your stuff will install into. If it has the layout above, and you can rely on buildsystem being there as a sibling to scmtools, then you could use my approach above of including the buildsystem/buildengine directory as a link from scmtools/eclipse/links. If not, you'll either have to get them to install in this way manually first, or bring along your own copies of the relevant Build plugin jars.
kanjbala jawahar
commented Jan 08 '14, 4:22 p.m.
Thanks Nick. Yes, we (tWAS build team) will own the installations, so we can configure the setups as needed.
|
At this point I don't see any better solution than copying the plugin jars.
With the old update manager, you could point to different plugin 'sites', either by adding a site element to …eclipse/configuration/org.eclipse.update/platform.xml, or by adding an eclipse/links directory containing links files pointing to other sites. So you could point to the RTC Eclipse client or JBE install directories to include their plugins, but this would bring in more than you want/need. e.g. the Eclipse client includes all the UI plugins, and JBE has extra plugins for the Ant tasks and build engine itself.
I tried the latter adding a file: /Users/nedgar/Downloads/Applications/SCM-CLI-3.0.1.4/eclipse/links/bst.link
containing:
path=../../BuildSystem-Toolkit-3.0.1.4/jazz/buildsystem/buildengine
It expects to find an eclipse directory under the referenced path, with a plugins directory under that.
Comments This did bring in the build.common and build.client plugins, but also build.toolkit and build.engine. Running:
> ./scm.sh -debug -consoleLog -console -noexit help
and typing 'ss team.build' at the osgi> prompt produced:
389 <<LAZY>> com.ibm.team.build.engine_3.0.2.v20110901_0306
392 RESOLVED com.ibm.team.build.toolkit_3.0.2.v20110831_0247
Fragments=390, 391
595 RESOLVED com.ibm.team.build.client_3.0.2.v20110831_0247
Fragments=381, 382
596 RESOLVED com.ibm.team.build.common_3.0.3.v20120718_2351
Fragments=384, 385
Maybe having these extra plugins around is OK for you. But then this requires laying down a Build System Toolkit install in addition to the SCM CLI. If you can assume your SCM CLI install is from the one for the RTC Eclipse client, then it's probably easier to just copy the build.common and build.client plugins from there into the SCM CLI's plugins directory. Nick I am trying to understand what you have described above but am struggling a bit.
Continued:
Continued: (Why this limit on commenting?)
Hello Nick,
Hi Kanj, good to hear. I've refactored the thread a bit so you can mark the last answer as accepted. It would be good if you could post a brief summary of how you used the links folder approach in the end.
showing 5 of 7
show 2 more comments
|
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.
Comments
Hello, could you please give me an ETA for responding to this question.
Thanks much.