How to use sbt-scalabuff plugin with sbt 0.13? - scala

I am trying to use sbt-scalabuff plugin, but sbt keeps complaining that the plugin cannot be found.
The plugin documentation does not state out a resolver url, either. Is the plugin deprecated or my Scala version is not supported?
Details:
com.github.sbt:sbt-scalabuff:0.2 (sbtVersion=0.13, scalaVersion=2.10)
Here is my plugins.sbt:
libraryDependencies += "net.sandrogrzicic" %% "scalabuff-runtime" % "1.3.6"
addSbtPlugin("com.github.sbt" %% "sbt-scalabuff" % "0.2")
Here is part of the stack trace:
sbt.ResolveException: unresolved dependency: com.github.sbt#sbt-scalabuff;0.2: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
...
[error] (*:update) sbt.ResolveException: unresolved dependency: com.github.sbt#sbt-scalabuff;0.2: not found

The sbt-scalabuff plugin does not have the plugin jar published to any known repository sbt could use for your configuration - sbtVersion=0.13 and scalaVersion=2.10.
I also doubt the plugin supports sbt 0.13 (few attempts of mine failed miserably when I compiled the plugin myself to use the version).
It seems that your only options are to downgrade sbt to 0.12.4 or migrate the plugin to 0.13.
Since the plugin has been published to the Resolver.sbtPluginRepo("releases") repository, i.e. http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases as http://dl.bintray.com/sbt/sbt-plugin-releases/com.github.sbt/sbt-scalabuff/scala_2.10/sbt_0.12/ you will have to use the version of sbt.
Use the following in project/sbt-scalabuff.sbt:
addSbtPlugin("com.github.sbt" %% "sbt-scalabuff" % "0.2")
You should then specify the version of sbt in project/build.properties as follows:
sbt.version=0.12.4
or just use sbt-launch 0.12.4.
When in sbt console, you can use the scalabuff task or the settings: scalabuff-version, scalabuff-main and scalabuff-args.
> sbt-version
[info] 0.12.4
> about
[info] This is sbt 0.12.4
[info] The current project is {file:/Users/jacek/sandbox/sbt-scalabuff-test-project/}main
[info] The current project is built against Scala 2.9.2
[info] Available Plugins: org.sbtidea.SbtIdeaPlugin, com.timushev.sbt.updates.UpdatesPlugin, scalabuff.ScalaBuffPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.9.2
> scalabuff-version
[info] 1.1.1
> help scalabuff
Generate Scala sources from protocol buffers definitions
> scalabuff-args
[info] List()
> scalabuff-main
[info] net.sandrogrzicic.scalabuff.compiler.ScalaBuff
See the scalabuff.ScalaBuffPlugin object in the GitHub repository.
I also had to change the build object (as described in the Usage section) to set up a project with the plugin to import sbt._:
import sbt._
import scalabuff.ScalaBuffPlugin._
object build extends Build {
lazy val root = Project(
"main",
file("."),
settings = Defaults.defaultSettings ++ scalabuffSettings
).configs(ScalaBuff)
}

Related

Unable to import locally published Scala plugin

I have a project which I publish locally to my .m2 directory as a plugin, which later I need to import into a different Scala project and use it.
It seems like the publishing step is executed correctly.
The build.sbt file of the plugin project looks like this:
lazy val root = (project in file("."))
.enablePlugins(SbtPlugin)
.settings(
name := "pluginName",
organization := "com.myOrg",
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" => "1.4.6" // set minimum sbt version
}
}
)
resolvers += "confluent" at "https://packages.confluent.io/maven"
libraryDependencies ++= Seq(
"io.confluent" % "kafka-schema-registry-client" % "7.0.1"
// some other dependemcies
)
After running the compile and publishLocal commands in sbt shell I get the next message:
[info] delivering ivy file to /Users/me/Work/repos/external/pluginName/target/scala-2.12/sbt-1.0/ivy-1.0.0.xml
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/poms/pluginName.pom
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/jars/pluginName.jar
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/srcs/pluginName-sources.jar
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/docs/pluginName-javadoc.jar
[info] published ivy to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
[success] Total time: 0 s, completed 3 Jan 2022, 10:07:43
In order to import/install this plugin in the other Scala project, I have added the next line to the plugins.sbt file: addSbtPlugin("com.myOrg" % "pluginName" % "1.0.0")
I also added libs-release-local and libs-snapshot-local to the externalResolvers section in the buid.sbt file.
After reloading and compiling the project I received this error:
[error] (update) sbt.librarymanagement.ResolveException: Error downloading io.confluent:kafka-schema-registry-client:7.0.1
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/io/confluent/kafka-schema-registry-client/7.0.1/kafka-schema-registry-client-7.0.1.pom
[error] not found: /Users/me/.ivy2/local/io.confluent/kafka-schema-registry-client/7.0.1/ivys/ivy.xml
[error] not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/io.confluent/kafka-schema-registry-client/7.0.1/ivys/ivy.xml
[error] not found: https://repo.typesafe.com/typesafe/ivy-releases/io.confluent/kafka-schema-registry-client/7.0.1/ivys/ivy.xml
I am kind of new to Scala and I don't understand what and I doing wrong.
Can anyone shed some light on this problem?
You're publishing to your local Maven cache, but sbt uses Ivy.
Try removing the publishTo setting, it shouldn't be needed. Just use the publishLocal task to publish to your local Ivy cache.

Play Framework Scala Hello-World fail on Ubuntu 20

The basic Play Framework sample (play-scala-hello-world-tutorial) fails on Ubuntu 20 with OpenAdopt JDK but works fine on Macos. Is there something arry with my Linux setup?
Per https://www.playframework.com/getting-started) I...
> git clone https://github.com/playframework/play-samples.git
> cd play-samples/play-scala-hello-world-tutorial
> sbt run
[info] welcome to sbt 1.4.3 (AdoptOpenJDK Java 16)
[info] loading global plugins from /home/gp/.sbt/1.0/plugins
[info] loading settings for project play-scala-hello-world-tutorial-build from plugins.sbt,scaffold.sbt ...
[info] loading project definition from /home/.../play-samples/play-scala-hello-world-tutorial/project
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] loading settings for project root from build.sbt ...
[info] set current project to play-scala-hello-world-tutorial (in build file:/home/.../play-samples/play-scala-hello-world-tutorial/)
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /[0:0:0:0:0:0:0:0]:9000
(Server started, use Enter to stop and go back to the console...)
curl localhost:9000
results in this:
play.api.UnexpectedException: Unexpected exception[UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item]
at play.core.server.DevServerStart$$anon$1.reload(DevServerStart.scala:254)
at play.core.server.DevServerStart$$anon$1.get(DevServerStart.scala:148)
at play.core.server.AkkaHttpServer.handleRequest(AkkaHttpServer.scala:302)
at play.core.server.AkkaHttpServer.$anonfun$createServerBinding$1(AkkaHttpServer.scala:224)
at akka.stream.impl.fusing.MapAsync$$anon$30.onPush(Ops.scala:1297)
at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:541)
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:495)
at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:390)
at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:625)
at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:502)
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964)
at com.google.inject.internal.FailableCache.get(FailableCache.java:54)
at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:155)
at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:592)
at com.google.inject.internal.AbstractBindingProcessor$Processor.initializeBinding(AbstractBindingProcessor.java:173)
Caused by: java.lang.IllegalStateException: Unable to load cache item
at com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:79)
at com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:294)
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65)
at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:258)
at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:207)
at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:49)
at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:156)
at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:94)
Caused by: java.lang.ExceptionInInitializerError: null
at com.google.inject.internal.cglib.core.$DuplicatesPredicate.evaluate(DuplicatesPredicate.java:104)
at com.google.inject.internal.cglib.core.$CollectionUtils.filter(CollectionUtils.java:52)
at com.google.inject.internal.cglib.reflect.$FastClassEmitter.<init>(FastClassEmitter.java:69)
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:77)
at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.generate(AbstractClassGenerator.java:332)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94)
at com.google.inject.internal.cglib.core.internal.$LoadingCache$2.call(LoadingCache.java:54)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Caused by: com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module #5f574e3d
at com.google.inject.internal.cglib.core.$ReflectUtils.defineClass(ReflectUtils.java:464)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.generate(AbstractClassGenerator.java:339)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94)
at com.google.inject.internal.cglib.core.internal.$LoadingCache$2.call(LoadingCache.java:54)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:61)
at com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:294)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module #5f574e3d
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at com.google.inject.internal.cglib.core.$ReflectUtils$1.run(ReflectUtils.java:61)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at com.google.inject.internal.cglib.core.$ReflectUtils.<clinit>(ReflectUtils.java:52)
at com.google.inject.internal.cglib.reflect.$FastClassEmitter.<init>(FastClassEmitter.java:67)
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:77)
at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>java -version
openjdk version "16" 2021-03-16
OpenJDK Runtime Environment AdoptOpenJDK (build 16+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 16+36, mixed mode, sharing)
> sbt sbtVersion
[info] welcome to sbt 1.3.13 (AdoptOpenJDK Java 16)
[info] loading global plugins from /home/../.sbt/1.0/plugins
[info] loading settings for project play-scala-hello-world-tutorial-build from scaffold.sbt,plugins.sbt ...
[info] loading project definition from /home/.../play-samples/play-scala-hello-world-tutorial/project
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] loading settings for project root from build.sbt ...
[info] set current project to play-scala-hello-world-tutorial (in build file:/home/.../play-samples/play-scala-hello-world-tutorial/)
[info] 1.3.13
project/build.properties:
# sbt.version=1.3.13
sbt.version=1.4.3
I was having the same issue with JDK-11
Trying with Java8 solved the issue.
For me is the opposite of #ProofJS's solution. On Windows 10,
JDK8 would not work (it would not compile - sbt compile). JDK 11 worked without problems. JDK 17 did compile, but would not run - sbt run.
welcome to sbt 1.3.13 (Oracle Corporation Java 11.0.12)
In IntelliJ, in the context menu for the project (right click) -> Open Module Settings -> Project -> SDK 11.0.12.
build.properties (file):
sbt.version=1.3.13
plugins.sbt (file):
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.11")
build.sbt (file):
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(
name := """play-scala-forms-example""",
version := "2.8.x",
scalaVersion := "2.13.7",
libraryDependencies ++= Seq(
guice,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test,
),
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-Xfatal-warnings"
)
)
System Env: JAVA_HOME & Path set to JDK-11/bin
Play 2.8.16 is dependent on google Guice version 4.2.3, which only support jdk 14, to make this run with java 17, you need to add the following code snippet into your build.sbt
dependencyOverrides ++= Seq(
"com.google.inject" % "guice" % "5.1.0",
"com.google.inject.extensions" % "guice-assistedinject" % "5.1.0")
Here are few links you can have a look :-
https://github.com/google/guice/wiki/Guice423
https://github.com/google/guice/wiki/Guice510
https://github.com/playframework/playframework/releases/2.8.15
Adding the above snippet code would make it able to run with 17.

Exclude dependency from project in multi-module SBT project [duplicate]

In Build.scala I have a dependency between projects:
val coreLib = Projects.coreLib()
val consoleApp = Projects.consoleApp().dependsOn(coreLib)
val androidApp = Projects.androidProject().dependsOn(coreLib/*, exclusions = xpp */)
Core library project defines a library in its libraryDependencies (XPP parser), which I want to exclude in androidApp, since Android framework have its own XPP implementation out of the box.
How can I exclude XPP library from transitive dependencies of coreLib in androidApp project?
EDIT:
According to my research exclusion is possible ONLY to ModuleID which is used in conjunction with libraryDependency. Meanwhile dependsOn puts all transitive dependencies to classpath, there is no way in api to exclude some transitive dependencies of this project, you dependsOn
DETAILS:
I'm running sbt 0.13.5 currently.
libraryDependencies of commonLib as well as it various settings supplied in build.sbt so that this project could be reused as standalone, and because it feels right and natural way of supplying settings in sbt.
This appears to work for me:
val someApp = project.settings(
libraryDependencies += "junit" % "junit" % "4.11"
)
val androidApp = project.dependsOn(someApp).settings(
projectDependencies := {
Seq(
(projectID in someApp).value.exclude("junit", "junit")
)
}
)
What the projectDepenendencies is doing is what sbt, by default, attempts to do. It converts any inter-project dependencies into ModuleIDs which Ivy will use during resolution. Because the Project API has no way to specify excludes currently, we bypass this automatic layer and manually declare the Ivy dependency as well.
Result:
> show someApp/update
...
[info] Update report:
...
[info] compile:
[info] org.scala-lang:scala-library:2.10.4 (): (Artifact(scala-library,jar,jar,None,List(),None,Map()),/home/jsuereth/.sbt/boot/scala-2.10.4/lib/scala-library.jar)
[info] junit:junit:4.11: (Artifact(junit,jar,jar,None,ArraySeq(master),None,Map()),/home/jsuereth/.ivy2/cache/junit/junit/jars/junit-4.11.jar)
[info] org.hamcrest:hamcrest-core:1.3: (Artifact(hamcrest-core,jar,jar,None,ArraySeq(master),None,Map()),/home/jsuereth/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar)
...
And the dependent project with junit/hamcrest excluded:
> show androidApp/update
...
[info] Update report:
...
[info] compile:
[info] org.scala-lang:scala-library:2.10.4 (): (Artifact(scala-library,jar,jar,None,List(),None,Map()),/home/jsuereth/.sbt/boot/scala-2.10.4/lib/scala-library.jar)
[info] someapp:someapp_2.10:0.1-SNAPSHOT:
...

scalatra issue when running ./sbt: sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;2.1.1: not found

I tried adding eclipse support to my project by running ./sbt eclipse after adding addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.1") to project/plugins.sbt.
I get this error message
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;2.1.1: not found
I created the project by g8 using the simplest template. I'm trying to add eclipse support
[Edit: sbt version]
Detected sbt version 0.13.0
Starting sbt: invoke with -help for other options
Using /Users/andre/.sbt/0.13.0 as sbt dir, -sbt-dir to override.
Which version of sbt are you using? typesafehub/sbteclipse says the latest is 2.3.0 for sbt 0.13, and 2.2.0 for sbt 0.12.

Getting started with Lift and Lifty

I am trying to get started with the Lift framework, reading Lift in Action. I would like to follow along with the examples, but I immediately stumble into a problem with installing Lift. I know that there are various ways to get started easily with Lift, but I would like to use Lifty, as the book does, to be able to follow it.
The problem is that both Lifty and sbt (and Lift too!) have moved forward since the book was published. I installed sbt from the Typesafe repository for Ubuntu. Now I am stuck trying to install Lifty.
Following Lifty documentation and this answer on SO - due to the fact that Lifty has not released a binary for sbt 0.11.3 - I figured I should put the following in ~/.sbt/plugins/build.sbt:
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("org.lifty" % "lifty" % "1.7.4")
libraryDependencies +=
Defaults.sbtPluginExtra(
"org.lifty" % "lifty" % "1.7.4",
"0.11.2",
"2.9.1"
)
The latter is to tell sbt to use the Lifty plugin for sbt 0.11.2.
Now sbt seems to be able to download Lifty and starts correctly, but I do not have a lifty command. So when I do
lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
sbt complains:
[error] Not a valid key: lifty (similar: history)
[error] lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
[error] ^
How should I install Lifty? Please note that I am new to Scala, sbt and Lift.
EDIT
I managed to install Lifty by downgrading to sbt 0.7.7. But then if I do
> lift create project-blank
> reload
> update
I get the error
[error] sbt.ResolveException: unresolved dependency: net.liftweb#lift-webkit_2.9.1;2.3-RC3: not found
[error] unresolved dependency: org.scala-tools.testing#specs_2.9.1;1.6.6: not found
[info] == update ==
[error] Error running update: sbt.ResolveException: unresolved dependency: net.liftweb#lift-webkit_2.9.1;2.3-RC3: not found
[error] unresolved dependency: org.scala-tools.testing#specs_2.9.1;1.6.6: not found
I hate to break it to you, but lifty is gone. As of this writing, sbt's stable is 0.13.0. Looking at sbt community repo, the only version that was released was 1.7.4 for sbt 0.11.2.
The official website says:
The Lift Cookbook is the most up-to-date resource to learn how to use Lift.
There's a section named Creating a Lift Project from Scratch Using SBT:
Problem
You want want to create a Lift web project from scratch without using the ZIP files provided on the official Lift website.
Solution
You will need to configure SBT and the Lift project yourself. Luckily, only five small files are needed.
First, create an SBT plugin file at project/plugins.sbt (all filenames are given relative to the project root directory):
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.3.0")
This file tells SBT that you will be using the xsbt-web-plugin.
Next, create an SBT build file, build.sbt...
Unfortunately xsbt-web-plugin 0.3.0 is for sbt 0.12. So you have to either use sbt 0.12, or modify the instruction a bit. The latest xsbt-web-plugin for sbt 0.13 is 0.4.2, so in project/plugins.sbt put:
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.4.2")
resolvers += Resolver.sonatypeRepo("public")
I was able to follow along with the rest of instructions on the page...
Eventually I got everything pulled in by sbt 0.13, and was able to start the container:
> container:start
[info] Compiling 1 Scala source to /foo/sbt-lift-test/target/scala-2.10/classes...
[info] jetty-8.1.7.v20120910
....
[success] Total time: 2 s, completed Sep 20, 2013 10:34:22 PM
Open http://localhost:8080/ using the browser:
Welcome, you now have a working Lift installation