Skip to content

Instantly share code, notes, and snippets.

View aolshevskiy's full-sized avatar
👽

Artyom Olshevskiy aolshevskiy

👽
View GitHub Profile
@aolshevskiy
aolshevskiy / jetty-env.xml
Created December 18, 2011 16:09
Jetty generic resource factory configuration
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
<New class="org.mortbay.jetty.plus.naming.EnvEntry">
<Arg><Ref id="webAppCtx"/></Arg>
<Arg>bean/MyBeanFactory</Arg>
<Arg>
<New class="javax.naming.Reference">
<Arg>com.mycompany.MyBean</Arg>
<Arg>com.mycompany.MyBeanFactory</Arg>
<Arg />
<Call name="add" id="reference">
@aolshevskiy
aolshevskiy / Build.scala
Created December 3, 2011 00:24
Proguard test project
import sbt._
import ProguardPlugin._
object TestBuild extends Build {
lazy val rootSettings = Seq(
proguardOptions ++= Seq(
keepMain("Test")))
lazy val root = Project("root", file(".")) dependsOn(sub) settings(proguardSettings ++ rootSettings :_*)
lazy val sub = Project("sub", file("sub"))
}
import sbt._
object TestBuild extends Build {
lazy val scalaSsh = file("../scala-ssh-shell") toURI
lazy val root = Project("root", file(".")) dependsOn(scalaSsh)
}
import sbt._
import classpath._
import Keys._
import com.github.siasia._
import WebPlugin._
object TestBuild extends Build {
lazy val natives = SettingKey[Seq[File]]("natives")
lazy val nativeLoader = AttributeKey[ClassLoader]("native-loader")
@aolshevskiy
aolshevskiy / build.sbt
Created October 9, 2011 17:27
Hello world example
seq(webSettings :_*)
libraryDependencies ++= Seq(
"javax.servlet" % "servlet-api" % "2.5" % "provided",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "container"
)
seq(webSettings:_*)
libraryDependencies ++= Seq(
"net.liftweb" %% "lift-webkit" % "2.3" % "compile",
"org.eclipse.jetty" % "jetty-webapp" % "7.3.0.v20110203" % "jetty",
"org.slf4j" % "slf4j-api" % "1.6.1" % "jetty",
"ch.qos.logback" % "logback-classic" % "0.9.26" % "jetty"
)
ivyXML := <dependencies> <dependency org="net.liftweb" name="lift-webkit_2.8.1" rev="2.3"> <exclude module="slf4j-api"/> </dependency> </dependencies>
@aolshevskiy
aolshevskiy / build.sbt
Created July 24, 2011 11:51
web plugin export jars
seq(webSettings :_*)
scalaVersion := "2.8.1"
libraryDependencies ++= Seq(
"net.liftweb" %% "lift-webkit" % "2.3" % "compile",
"org.eclipse.jetty" % "jetty-webapp" % "7.3.0.v20110203" % "jetty",
"ch.qos.logback" % "logback-classic" % "0.9.26"
)
@aolshevskiy
aolshevskiy / build.sbt
Created July 10, 2011 21:38
Test scalatra project
name := "web"
version := "1.0"
scalaVersion := "2.9.0"
seq(webSettings :_*)
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % "2.0.0-SNAPSHOT",
@aolshevskiy
aolshevskiy / build.sbt
Created June 19, 2011 13:48
Sbt plugin depending on the web plugin
seq(scriptedSettings :_*)
scriptedBufferLog := false
organization := "com.example"
name := "depending-plugin"
version := "0.1-SNAPSHOT"
@aolshevskiy
aolshevskiy / build.sbt
Created June 19, 2011 09:38
xsbt-lift-basic
seq(WebPlugin.webSettings :_*)
scalaVersion := "2.8.1"
libraryDependencies ++= Seq(
"net.liftweb" %% "lift-webkit" % "2.3" % "compile",
"net.liftweb" %% "lift-mapper" % "2.3" % "compile",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "jetty,test",
"ch.qos.logback" % "logback-classic" % "0.9.26",
"junit" % "junit" % "4.5" % "test",