FAQ  •  Register  •  Login

External JARs for Plugins

<<

CraigD

Serviio lover

Posts: 61

Joined: Tue Nov 08, 2011 2:05 pm

Post Tue Dec 06, 2011 2:08 am

External JARs for Plugins

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?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 06, 2011 9:21 am

Re: External JARs for Plugins

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.
<<

CraigD

Serviio lover

Posts: 61

Joined: Tue Nov 08, 2011 2:05 pm

Post Tue Dec 06, 2011 2:00 pm

Re: External JARs for Plugins

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?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 06, 2011 2:37 pm

Re: External JARs for Plugins


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.

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 8 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.