Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Extending the RTC command line

Hi, It looks as thought it should be possible to extend the SCM command line - see https://jazz.net/forum/questions/53567/extending-the-scm-command-line,  https://jazz.net/forum/questions/16622/trying-to-extend-the-rtc-scm-cli and the wiki page : https://jazz.net/wiki/bin/view/Main/SCMCommandLineDevelopment#Building.

I'm using RTC 4.3 and think I must be missing something. I made a plugin that depends on com.ibm.team.rtc.cli.infrastructure and uses the extension point com.ibm.team.rtc.cli.infrastructure.subcommand.
My plugin xml looks like this:
<extension point="com.ibm.team.rtc.cli.infrastructure.subcommand">
      <subcommand
            class="com.ibm.team.filesystem.cli.client.internal.custom.HelloWorld"
            id="com.ibm.stg.svc.hello"
            initpolicy="scratch"
            name="hello"
            scope="FrontEndClient default"
            shortHelp="%subcommand.shortHelp.0">
      </subcommand>
  </extension>

The HelloWorld class looks like this:
package com.ibm.team.filesystem.cli.client.internal.custom;

import com.ibm.team.rtc.cli.infrastructure.internal.core.AbstractSubcommand;
import com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException;
import com.ibm.team.rtc.cli.infrastructure.internal.core.IClientConfiguration;

public class HelloWorld extends AbstractSubcommand{

    @Override
    public int run(IClientConfiguration config) throws CLIClientException {     
        System.out.println("Hello World");
        return 0;
    }
 
}

I exported it using the export wizard and it creates a valid bundle which I can load into an OSGi framework - it resolves correctly. I dropped the plugin into the scmtools/eclipse/plugins directory hoping (optimism!) that the command would be found when I ran lscm or scm. It wasn't. I've tried adding and removing activators without any effect.

What completely obvious thing am I missing? Or is this much harder that I think it should be?

0 votes



One answer

Permanent link
Hi Zoe,
Copying the plugin to plugins dir is not enough. Try running
scm -clean
To cause reloading bundles. Let us know if it helps.

0 votes

Comments

Hi Krzysztof


Thanks for your reply -  I'm afraid it didn't make any difference:

I created a sample plugin (same as you have done) and dropped it into the scmtools/plugins folder and it worked fine. I ran scm -clean just to be sure that my plugin gets loaded.


Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,953

Question asked: Jan 02 '14, 1:13 p.m.

Question was seen: 4,714 times

Last updated: Jan 08 '14, 5:46 a.m.

Confirmation Cancel Confirm