Skip to content

Instantly share code, notes, and snippets.

@vilu
Created July 3, 2014 10:10
Show Gist options
  • Save vilu/11f4a6e5f6b30ff53584 to your computer and use it in GitHub Desktop.
Save vilu/11f4a6e5f6b30ff53584 to your computer and use it in GitHub Desktop.
----- Build.scala
import sbt._
import Keys._
import org.scalatra.sbt._
import org.scalatra.sbt.PluginKeys._
import com.mojolly.scalate.ScalatePlugin._
import ScalateKeys._
object CaptureBuild extends Build {
val Organization = "com.github.vilu"
val Name = "capture"
val Version = "0.0.1"
val ScalaVersion = "2.11.1"
val ScalatraVersion = "2.3.0"
lazy val project = Project (
"capture",
file("."),
settings = Defaults.defaultSettings ++ ScalatraPlugin.scalatraWithJRebel ++ scalateSettings ++ Seq(
organization := Organization,
name := Name,
version := Version,
scalaVersion := ScalaVersion,
resolvers += Classpaths.typesafeReleases,
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % ScalatraVersion,
"org.scalatra" %% "scalatra-scalate" % ScalatraVersion,
"org.scalatra" %% "scalatra-specs2" % ScalatraVersion % "test",
"ch.qos.logback" % "logback-classic" % "1.0.6" % "runtime",
"org.eclipse.jetty" % "jetty-webapp" % "8.1.8.v20121106" % "container",
"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container;provided;test" artifacts (Artifact("javax.servlet", "jar", "jar")),
"org.slf4j" % "slf4j-nop" % "1.6.4",
"com.typesafe.slick" % "slick_2.10" % "2.1.0-M2",
"org.postgresql" % "postgresql" % "9.3-1100-jdbc41",
"c3p0" % "c3p0" % "0.9.1.2",
"com.github.tminglei" % "slick-pg_joda-time_2.10" % "0.5.3"
),
scalateTemplateConfig in Compile <<= (sourceDirectory in Compile){ base =>
Seq(
TemplateConfig(
base / "webapp" / "WEB-INF" / "templates",
Seq.empty, /* default imports should be added here */
Seq(
Binding("context", "_root_.org.scalatra.scalate.ScalatraRenderContext", importMembers = true, isImplicit = true)
), /* add extra bindings here */
Some("templates")
)
)
}
)
)
}
---- sbt show full-classpath
> show full-classpath
[info] Generating /Users/viktorlund/code/scala/capture/target/scala-2.11/resource_managed/main/rebel.xml.
[info] Compiling Templates in Template Directory: /Users/viktorlund/code/scala/capture/src/main/webapp/WEB-INF/templates
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[info] Compiling 5 Scala sources to /Users/viktorlund/code/scala/capture/target/scala-2.11/classes...
[info] List(Attributed(/Users/viktorlund/code/scala/capture/target/scala-2.11/classes), Attributed(/Users/viktorlund/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.1.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scalatra/scalatra_2.11/jars/scalatra_2.11-2.3.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scalatra/scalatra-common_2.11/jars/scalatra-common_2.11-2.3.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.7.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.clapper/grizzled-slf4j_2.11/jars/grizzled-slf4j_2.11-1.0.2.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scalatra.rl/rl_2.11/jars/rl_2.11-0.4.10.jar), Attributed(/Users/viktorlund/.ivy2/cache/com.googlecode.juniversalchardet/juniversalchardet/jars/juniversalchardet-1.0.3.jar), Attributed(/Users/viktorlund/.ivy2/cache/eu.medsea.mimeutil/mime-util/bundles/mime-util-2.1.3.jar), Attributed(/Users/viktorlund/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.3.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-1.6.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.1.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.2.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scalatra/scalatra-scalate_2.11/jars/scalatra-scalate_2.11-2.3.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scalatra.scalate/scalate-core_2.11/bundles/scalate-core_2.11-1.7.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scalatra.scalate/scalate-util_2.11/bundles/scalate-util_2.11-1.7.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.0.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.slf4j/slf4j-nop/jars/slf4j-nop-1.6.4.jar), Attributed(/Users/viktorlund/.ivy2/cache/com.typesafe.slick/slick_2.10/bundles/slick_2.10-2.1.0-M2.jar), Attributed(/Users/viktorlund/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.postgresql/postgresql/jars/postgresql-9.3-1100-jdbc41.jar), Attributed(/Users/viktorlund/.ivy2/cache/c3p0/c3p0/jars/c3p0-0.9.1.2.jar), Attributed(/Users/viktorlund/.ivy2/cache/com.github.tminglei/slick-pg_joda-time_2.10/jars/slick-pg_joda-time_2.10-0.5.3.jar), Attributed(/Users/viktorlund/.ivy2/cache/com.github.tminglei/slick-pg_core_2.10/jars/slick-pg_core_2.10-0.5.3.jar), Attributed(/Users/viktorlund/.ivy2/cache/org.eclipse.jetty.orbit/javax.servlet/jars/javax.servlet-3.0.0.v201112011016.jar))
[success] Total time: 12 s, completed Jul 3, 2014 12:09:13 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment