Skip to content

Instantly share code, notes, and snippets.

@nobeans
Created October 25, 2011 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nobeans/1313324 to your computer and use it in GitHub Desktop.
Save nobeans/1313324 to your computer and use it in GitHub Desktop.
#!/bin/bash
GROOVYSERV_HOME=/usr/local/Cellar/groovyserv/0.9/libexec
TEMP_TEST_SCRIPT=/tmp/testGroovyServ.groovy
BUILT_GROOVY_CMD=target/install/bin/groovy
ant install -DskipTests=true -DskipOsgi=true
cat << EOS > $TEMP_TEST_SCRIPT
import org.jggug.kobo.groovyserv.*
def cookie = new Cookie()
def socket = new java.net.Socket('localhost', 9999)
def runnable = new Runnable() {
String id = 'ID'
void run() { 'hoge' }
}
new RequestWorker(cookie, socket).newTaskFor(runnable, null)
EOS
export CLASSPATH=$CLASSPATH:$GROOVYSERV_HOME/lib/*
$BUILT_GROOVY_CMD $TEMP_TEST_SCRIPT
@nobeans
Copy link
Author

nobeans commented Oct 25, 2011

Before you use the script, run the command:
groovy -l 9999 -ne 'println line'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment