Create a library to add as Plugin Dependency of a node


I have several KNIME nodes created as different projects in Eclipse. In each one of these nodes there is a part where I have to use a common set of java classes (in a very dirty way I have to "repeat" java code). As a first, and rudimentary solution, I defined the common java classes just in one node. Thus, in the other nodes I only had to add the first node as a "Plugin Dependency". It worked fine (not elegant but fine). Currently, I would like to define some kind of "Library Plugin" to store _only_ common java classes tipically used along all my nodes. To do this I have created a normal Plug-in Project in Eclipse where I have developed those common java classes. Then if a new node needs those classes I only have to add this "Library Plugin" as a Dependenciy.

Honestly I am not sure if it is the correct way. Is there a standard or, let's say, correct way to manage with this  situation ?

thanks in advance!


Why don't you just implement all nodes in one single plug-in/project?

thanks for your comment1

I'll give a try to your approach.

But I am not sure if I can keep the development of each node strictly separated in this way. For instance, in the case of having to keep a different versioning pattern (node A is on version 1.2.1, and node B is on version 1.0.1 and node C is on version 3.2.0). I think that the version number is set at plugin level, isn't it ?

thanks again


Yes, the version is tied to the plug-in. Why do you want to version individual nodes?

If you want to share common classes/libraries over several plug-ins, you can create an additional plug-in which does not contain any nodes, but merely the library classes. The plug-ins containing the nodes can then depend on the common library plug-in.


Thanks for your comment. I have developed "one node per project" in order to keep a clear separation between them and manage versions or distribute them in an independent way.

thanks for the info!