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

Putting prerequisites in plugin.xml for a component plugin

I am writing a Java plugin (extension) that provides some common utilities to the other plugins.
Actually, it is neither an advisor nor a participant, but a component instead.
The other plugins (advisors and participants) leverage its methods to retrieve some pieces of information and perform some common tasks.
I would like this plugin to be able to retrieve also the services that advisors and participants use (IWorkItem server, IRepositoryItemService, ...), but I need to declare their interfaces as prerequistes of the component plugin in the plugin.xml file.
Is it possibile or not?
So far, I could not find any point in plugin.xml where it is possible to put this piece of xml:

<prerequisites>
       <requiredService interface="com.ibm.team.workitem.service.IWorkItemServer"/>
       <requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/>
 </prerequisites>

The current content of plugin.xml of the component plugin is:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension point="com.ibm.team.repository.common.components">       
      <component id="com.ibm.team.custom.common" name="[Custom] Common">
      </component>
   </extension>
</plugin>


I am working with RTC 4.0.6.

0 votes


Accepted answer

Permanent link
Please see Rational Team Concert Extensions Workshop Page 63 and 64.
Also see https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ at the end of the post.
Luca Martinucci selected this answer as the correct answer

0 votes

Comments

In the provided examples the services are retrieved by advisor and participant plugins.
Of course, it works, but I would like to do a different thing.
I am trying to retrieve those services in the component plugin: this way, I would provide a single, common point to retrieve these services.
I have no problem in retrieving the services in the component plugin (there are no changes in the code), but at runtime the plugin generates and exception, because the interfaces are not declared in the plugin.xml.
If I put the <prerequisites> tag anywhere in the plugin.xml. it is just ignored at runtime,

You can not just put the stuff somewhere because it is more convenient. The other plugins don't know anything about the component plugin. All are isolated. You have to put the required services into each plugin that requires them!


One other answer

Permanent link
Yes, the Eclipse interface for declaring this stuff is hidden behind the right click of the mouse.

if you right click on the service entries in the extensions tab of the plugin.xml you will find 'New'

which will have the entry fields for different capabilities

0 votes

Comments

I find it way easier to just paste it into the plugin.XML.

yeh, you might do it enough to be able to get it in the right spot.

altho I have a lot of plugins, I still struggle with the plugin.xml syntax.

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,938

Question asked: Jul 08 '15, 4:17 a.m.

Question was seen: 2,316 times

Last updated: Jul 13 '15, 5:11 a.m.

Confirmation Cancel Confirm