From f6541632bb4b216d5b23c71195a812f8fb8c3539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cocula?= Date: Tue, 29 Nov 2016 23:03:07 +0100 Subject: [PATCH] Add temporary test jetty server (to be removed later). --- libresonic-main/pom.xml | 28 +++++++++++++++++++ .../org/libresonic/player/TestServer.java | 20 +++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 libresonic-main/src/main/java/org/libresonic/player/TestServer.java diff --git a/libresonic-main/pom.xml b/libresonic-main/pom.xml index 6583e36d..95dabbaf 100644 --- a/libresonic-main/pom.xml +++ b/libresonic-main/pom.xml @@ -18,6 +18,34 @@ + + + org.mortbay.jetty + jetty + 6.1.5 + + + + org.mortbay.jetty + jetty-embedded + 6.1.5 + + + javax.servlet.jsp + jsp-api + + + + + + org.mortbay.jetty + jsp-2.0 + 6.1.5 + pom + + + + org.libresonic.player libresonic-rest-api diff --git a/libresonic-main/src/main/java/org/libresonic/player/TestServer.java b/libresonic-main/src/main/java/org/libresonic/player/TestServer.java new file mode 100644 index 00000000..eab79fb8 --- /dev/null +++ b/libresonic-main/src/main/java/org/libresonic/player/TestServer.java @@ -0,0 +1,20 @@ +package org.libresonic.player; + +import org.mortbay.jetty.Server; +import org.mortbay.jetty.webapp.WebAppContext; + +public class TestServer { + + public static void main(String[] args) throws Exception { + Server server = new Server(8080); + WebAppContext webapp = new WebAppContext(); + webapp.setContextPath("/libresonic"); + String baseDir = TestServer.class.getResource("/" + TestServer.class.getName().replaceAll("\\.", "/") + ".class").getFile(); + baseDir = baseDir.substring(0,baseDir.indexOf("/target")); + webapp.setWar(baseDir + "/src/main/webapp"); + server.setHandler(webapp); + server.setAttribute("reload", "automatic"); + server.start(); + server.join(); + } +} \ No newline at end of file