use ivy to manage libraries

#1

Hi,

I used to use ivy in previous projects to manage importing packages from online or local space. Now I want to ask if it if possible to combine ivy into KNIME source, so it can import *.jar packages online?? And how??

PS: I think the example KNIME source codes can only use *.jar files with precondition those *.jar files are downloaded locally into lib folder in source codes.
If it can import *.jar automatically online, then how to set it??

Best Regards
Kefang

0 Likes

#2

KNIME builds on top of Eclipse, from which it also inherits its modularity in the form of plug-in management. While I have no experience with Apache ivy myself, my understanding is that if you want to use an external library within your own KNIME plug-in, you’ll have to bundle this library in that same or another plug-in. See https://www.knime.com/developer/faq#q19 for a little more info.

Best Regards,

Marc

0 Likes

#3

Hi Marc,

I have worked with external libraries by copying them at first in the lib folder and then setting them later in META-INF/MANIFEST.MF.
It cause some obstacles in this way, eg. the libraries must be downloaded manually, added and set manually. So I wonder if there is a way to download the libraries online only by giving some instructions??

Regards
Kefang

0 Likes

#4

I’m not aware of a way to specify dependencies to external libraries in an Eclipse plugin by specifying download instructions. Maybe you’ll find some useful information in the Ivy documentation on building Eclipse plugins at http://ant.apache.org/ivy/history/2.3.0/osgi/eclipse-plugin.html

If you’re using the same external library over and over again, you could create a dedicated plugin that only wraps that external library. Then, you can add this plugin as a dependency in all of your plugins that require it without downloading it manually every time.

2 Likes

#5

Thanks!! Currently I work in this way… sometimes feel it not so convenient. . Will find a way later.

Regards
Kefang

0 Likes