Add temporary test jetty server (to be removed later).
This commit is contained in:
@@ -18,6 +18,34 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Adding Jetty for a simple developement embedded server -->
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>6.1.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-embedded</artifactId>
|
||||
<version>6.1.5</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.0</artifactId>
|
||||
<version>6.1.5</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<!-- END : Adding Jetty for a simple developement embedded server -->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.libresonic.player</groupId>
|
||||
<artifactId>libresonic-rest-api</artifactId>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user