Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to the current develop branch

  • Loading branch information...
commit cdc16e07e5c3d0aefad267dc531841453e42f932 1 parent dcc6232
@casualjim casualjim authored
View
14 src/main/g8/build.sbt
@@ -9,12 +9,16 @@ scalaVersion := "$scala_version$"
seq(webSettings :_*)
libraryDependencies ++= Seq(
- "org.scalatra" %% "scalatra" % "2.1.0-SNAPSHOT",
- "org.scalatra" %% "scalatra-scalate" % "2.1.0-SNAPSHOT",
- "org.scalatra" %% "scalatra-specs2" % "2.1.0-SNAPSHOT" % "test",
- "ch.qos.logback" % "logback-classic" % "1.0.0" % "runtime",
- "org.eclipse.jetty" % "jetty-webapp" % "8.1.0.RC5" % "container",
+ "org.scalatra" % "scalatra" % "2.1.0-SNAPSHOT",
+ "org.scalatra" % "scalatra-scalate" % "2.1.0-SNAPSHOT",
+ "org.scalatra" % "scalatra-specs2" % "2.1.0-SNAPSHOT" % "test",
+ "ch.qos.logback" % "logback-classic" % "1.0.6" % "runtime",
+ "org.eclipse.jetty" % "jetty-webapp" % "8.1.3.v20120416",
"javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided"
)
resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
+
+ivyXML := <dependencies>
+ <exclude org="org.eclipse.jetty.orbit" />
+ </dependencies>
View
2  src/main/g8/project/build.properties
@@ -1 +1 @@
-sbt.version=0.11.2
+sbt.version=0.11.3
View
1  src/main/g8/project/plugins.sbt
@@ -1 +0,0 @@
-libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v+"-0.2.10"))
View
34 src/main/g8/src/main/scala/$package$/JettyMain.scala
@@ -0,0 +1,34 @@
+package $package$
+
+import org.eclipse.jetty.server.nio.SelectChannelConnector
+import org.eclipse.jetty.server.{ Server }
+import org.eclipse.jetty.server.handler.ContextHandlerCollection
+import org.eclipse.jetty.webapp.WebAppContext
+import org.eclipse.jetty.servlet.{ DefaultServlet, ServletContextHandler, ServletHolder }
+
+object JettyMain {
+
+ def main(args: Array[String]) = {
+ val server: Server = new Server
+
+ server setGracefulShutdown 5000
+ server setSendServerVersion false
+ server setSendDateHeader true
+ server setStopAtShutdown true
+
+ val connector = new SelectChannelConnector
+ connector setPort 8080
+ connector setMaxIdleTime 90000
+ server addConnector connector
+
+ val webapp = "src/main/webapp"
+ val webApp = new WebAppContext
+ webApp setContextPath "/"
+ webApp setResourceBase webapp
+ webApp setDescriptor (webapp+"/WEB-INF/web.xml");
+
+ server setHandler webApp
+
+ server.start()
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.