FAQ  •  Register  •  Login

Help running groovy from cmd line

<<

dmasters

Serviio newbie

Posts: 7

Joined: Sat Feb 08, 2014 9:39 pm

Post Wed Mar 05, 2014 1:44 pm

Help running groovy from cmd line

I'd like to test some mods to the Arte.groovy, so I'm trying to test it from the command line like:

  Code:
SERVIIO_CLASSPATH=/opt/serviio/lib/commons-codec.jar:/opt/serviio/lib/commons-imaging.jar:/opt/serviio/lib/commons-io.jar:/opt/serviio/lib/commons-jxpath.jar:/opt/serviio/lib/commons-lang.jar:/opt/serviio/lib/concurrent.jar:/opt/serviio/lib/derby.jar:/opt/serviio/lib/freemarker.jar:/opt/serviio/lib/groovy-all.jar:/opt/serviio/lib/gson.jar:/opt/serviio/lib/httpcore.jar:/opt/serviio/lib/jaudiotagger.jar:/opt/serviio/lib/jcl-over-slf4j.jar:/opt/serviio/lib/jcs.jar:/opt/serviio/lib/jdom.jar:/opt/serviio/lib/jnat-pmplib.jar:/opt/serviio/lib/jul-to-slf4j.jar:/opt/serviio/lib/log4j.jar:/opt/serviio/lib/lucene-analyzers-common.jar:/opt/serviio/lib/lucene-core.jar:/opt/serviio/lib/org.restlet.ext.gson.jar:/opt/serviio/lib/org.restlet.ext.net.jar:/opt/serviio/lib/org.restlet.ext.xstream.jar:/opt/serviio/lib/org.restlet.jar:/opt/serviio/lib/padlock.jar:/opt/serviio/lib/rome-modules.jar:/opt/serviio/lib/rome.jar:/opt/serviio/lib/sbbi-upnp.jar:/opt/serviio/lib/serviio-client.jar:/opt/serviio/lib/serviio-media-browser.jar:/opt/serviio/lib/serviio.jar:/opt/serviio/lib/slf4j-api.jar:/opt/serviio/lib/slf4j-log4j12.jar:/opt/serviio/lib/streamflyer-core.jar:/opt/serviio/lib/winp.jar:/opt/serviio/lib/xstream.jar

groovy -v
Groovy Version: 1.7.5 JVM: 1.6.0_27

groovy -cp "$SERVIIO_CLASSPATH" /opt/serviio/plugins/Arte.groovy

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/opt/serviio-1.4/plugins/Arte.groovy: 19: unable to resolve class FeedItemUrlExtractor
 @ line 19, column 1.
   class Arte extends FeedItemUrlExtractor {
   ^

/opt/serviio-1.4/plugins/Arte.groovy: 36: unable to resolve class PreferredQuality
 @ line 36, column 47.
   ntainer extractUrl(Map links, PreferredQ
                                 ^

/opt/serviio-1.4/plugins/Arte.groovy: 36: unable to resolve class ContentURLContainer
 @ line 36, column 5.
       ContentURLContainer extractUrl(Map links, PreferredQuality requestedQuality) {
       ^

/opt/serviio-1.4/plugins/Arte.groovy: 93: unable to resolve class ContentURLContainer
 @ line 93, column 16.
           return new ContentURLContainer(contentUrl: contentUrl, thumbnailUrl: ThumbnailUrl)
                  ^

4 errors


It seems groovy is not finding certain classes. This same error occurs for YouTube.groovy as well or using the groovyConsole. It's probably my environment, but what am I missing? Any ideas? Thanks!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16505

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Mar 05, 2014 2:09 pm

Re: Help running groovy from cmd line

Somehow it doesn't see serviio.jar on the classpath
<<

dmasters

Serviio newbie

Posts: 7

Joined: Sat Feb 08, 2014 9:39 pm

Post Wed Mar 05, 2014 2:20 pm

Re: Help running groovy from cmd line

OK, I used the CLASSPATH environment variable rather than passing in via the command-line option, and it works now. Seems my groovy version is not respecting it's own options!

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 2 guests

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