From 5b25794f5db09ed16d9fdc4bd3db34c1a16b235a Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Wed, 8 Jul 2015 14:02:07 -0500 Subject: [PATCH] Removed GroovyDirectoryServer (became it's own project). --- build.gradle | 5 +-- .../net/GroovyDirectoryServer.groovy | 42 ------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100755 src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy diff --git a/build.gradle b/build.gradle index 565a3b8..c19e85f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: "groovy" apply plugin: "maven" group = "com.jdbernard" -version = "3.10" +version = "4.0" repositories { mavenCentral() } @@ -12,9 +12,6 @@ dependencies { compile 'org.slf4j:slf4j-api:1.7.10' compile 'ch.qos.logback:logback-core:1.1.2' compile 'ch.qos.logback:logback-classic:1.1.2' - compile 'javax.servlet:servlet-api:2.4' - compile 'javax.servlet.jsp:jsp-api:2.1' - compile 'org.eclipse.jetty.aggregate:jetty-all:7.6.15.v20140411' testCompile 'junit:junit:4.12' } diff --git a/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy b/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy deleted file mode 100755 index fd6c055..0000000 --- a/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy +++ /dev/null @@ -1,42 +0,0 @@ -package com.jdbernard.net - -import org.eclipse.jetty.server.Server -import org.eclipse.jetty.servlet.* -import groovy.servlet.* - - public class GroovyDirectoryServer { - - public static void runJetty(int port) { - def server = new Server(port) - - def handler = new ServletContextHandler(ServletContextHandler.SESSIONS) - handler.contextPath = '/' - handler.resourceBase = '.' - - // Groovy Scripts - handler.addServlet(GroovyServlet, '*.groovy') - - // Files - def filesHolder = handler.addServlet(DefaultServlet, '/') - filesHolder.setInitParameter('resourceBase', '.') - - server.handler = handler - server.start() - } - - public static void main(String[] args) { - def port = 9002 - - if (args.length < 1) { - port = 9002 - println "Defaulting to port 9002" } - - else try { port = args[0] as int } - catch(Exception e) { - println "Usage: GroovyDirectoryServer.grooy " - System.exit(1) } - - println "Starting Jetty on port $port, press Ctrl-C to stop." - runJetty(port) - } -}