Howto use a Plugin as a kind of library?

Description
bt_roke
Posts: 8
Joined: Thu Jun 24, 2010 7:46 am

Howto use a Plugin as a kind of library?

Postby bt_roke » Wed Sep 01, 2010 8:41 am

Hello all

Mr. Engele wrote a plugin for us a while ago which I later extended. Recently I started writing another one, realizing, that some code can be shared. Hence I extracted the common code from plugin "com.polarion.alm.extension.export" placing it in "com.bt.polarion.alm.extensions.utils" in a class WorkItemUtils.

What I now want is that the "com.polarion.alm.extension.export" and the new "com.bt.polarion.alm.extensions.workflow" use the WorkItemUtils.class in "com.bt.polarion.alm.extensions.utils".

First I had the issue that "The import 'com.bt.polarion.alm.extensions.utils' could not be resolved" when exporting "com.polarion.alm.extension.export" and the new "com.bt.polarion.alm.extensions.workflow" from Eclipse. Even adding com.bt.polarion.alm.extensions.utils to "Dependencies/Required Plug-ins" did not help to solve this issue. That was yesterday. This morning, for no explainable reason the export run through without error messages.(???)

After now starting Polarion in Eclipse IDE, I get the following exception:

2010-09-01 09:31:56,046 [TP-Processor2] ERROR com.polarion.portal.internal.server.rpc.JSRPCValve - Exception in RPC: while calling method: com.polarion.alm.tracker.web.internal.server.WorkItemDataProvider/loadWorkitem cause:com/bt/polarion/alm/extensions/utils/WorkItemUtils
java.lang.NoClassDefFoundError: com/bt/polarion/alm/extensions/utils/WorkItemUtils
at com.bt.polarion.alm.extensions.workflow.functions.XsltUpdateFromLinkedUri.<clinit>(XsltUpdateFromLinkedUri.java:108)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
....and some more which I deleted not to make the post to large...

The hivemodule.xml is rather empty, since the other plugins shall simple access the WorkitemUtils.class and use its code. I could not see a need to define a hook point in Eclipse. Or should I not have the hivemodule.xml at at? Or register where or not at all?

<?xml version="1.0" encoding="UTF-8"?>
<module id="com.bt.polarion.alm.extensions.utils" version="1.0.0">
</module>

Does any one know how to do this?

Kind regards

Roman

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 9 guests