Page 1 of 1

External JARs for Plugins

PostPosted: Tue Dec 06, 2011 2:08 am
by CraigD
If we are developing a plugin that requires some JAR that serviio doesn't provide, what is the best practice on where the JAR should be stored and how it is loaded?

Re: External JARs for Plugins

PostPosted: Tue Dec 06, 2011 9:21 am
by zip
I haven't tried it myself and you should not really require any external jars as it'll be a pain to

1) distribute the plugin
2) there might be problems with licensing, ie your plugin/serviio would have to be licensed GPL possibly and you'd have to include the license text with the plugin/jar#

If it's a super useful functionality let me know and I might add it to Serviio.

Re: External JARs for Plugins

PostPosted: Tue Dec 06, 2011 2:00 pm
by CraigD
The libraries I've been trying to use in my plugins so far are:

OpenAMF - http://sourceforge.net/projects/openamf/

org.apache.commons.lang [specifically StringEscapeUtils] - http://commons.apache.org/lang/api-2.3/ ... Utils.html

Groovy HTTP Builder - http://groovy.codehaus.org/HTTP+Builder


I use OpenAMF to serialize data to server side flash code to get streams (specifically used by aetv.com). The 2nd one is probably obvious. And I use HTTP builder because I like it's interface for HTTP (and it supports various content types that are returned that get parsed automatically)

On a related note, I tried to use Grape for HTTP builder in my plugin and it seemed to cause the plugin compile thread to hang. Is Grape supported in plugins?

Re: External JARs for Plugins

PostPosted: Tue Dec 06, 2011 2:37 pm
by zip

Can't you implement the bits you need in the plugin?

org.apache.commons.lang [specifically StringEscapeUtils] - http://commons.apache.org/lang/api-2.3/ ... Utils.html

Doesn't Groovy already include some of this functionality?

On a related note, I tried to use Grape for HTTP builder in my plugin and it seemed to cause the plugin compile thread to hang. Is Grape supported in plugins?

Don't see why not if it can be compiled by Groovy.