Template is broken for Lift 4.x: pinned to Lift 3.3 + EOL xsbt-web-plugin 4.0.2
- Dominant language
- Scala
- Stars
- 5
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The framework README's "With sbt (new project)" section sends people here via `sbt new lift/basic-app.g8`, but the generated project no longer works with the current Lift line and its run instructions describe a dead plugin. Filed so this is tracked; I'm happy to take a pass at it.
## Problems in `src/main/g8/`
1. **Lift 3.3 / Scala 2.12.6 pin** (`default.properties`, `build.sbt`): Lift 4.0.0 is released (4.x cross-builds Scala 2.13 and 3), and `main` is on 4.1.0-SNAPSHOT. The template targets 3.3.0/2.12.6, so generated apps are immediately one major version behind.
2. **Removed dependencies**: `build.sbt` pulls `net.liftweb %% lift-mapper` — Mapper/Record were removed from the framework as of Lift 4.0. A Lift 4 build simply fails to resolve.
3. **`javax.servlet`**: the template uses `javax.servlet-api` 3.0.1 and the old servlet API throughout. Lift 4.x is on `jakarta.servlet` (6.x), so the generated `web.xml`/servlet wiring doesn't match.
4. **EOL web plugin**: `project/web-plugin.sbt` pins `com.earldouglas % xsbt-web-plugin % 4.0.2` and `build.sbt` uses `enablePlugins(JettyPlugin)`. xsbt-web-plugin is end-of-life at 4.2.5; its successor is **sbt-war** (`com.earldouglas % sbt-war`, currently 5.2.2, plugin id `SbtWar`).
5. **Stale run commands**: framework README now documents sbt-war commands (`~ warStart`, `warStartPackage`, `warStop`), but a template-generated project only supports the old `~jetty:start` / `jetty:quickstart` keys — the README and generated projects currently contradict each other.
## Suggested direction
- Bump `lift_version` to a 4.x release and `scala_version` to 2.13.x (or make it cross-build with 3.x).
- Drop `lift-mapper`; switch to `jakarta.servlet:jakarta.servlet-api` and a jakarta-era `web.xml`.
- Swap `web-plugin.sbt` for `addSbtPlugin("com.earldouglas" % "sbt-war" % "5.2.2")` + `enablePlugins(SbtWar)`.
- Bump `project/build.properties` (currently 1.3.12).
References: sbt-war docs at https://github.com/earldouglas/sbt-war (note: `warStart` serves from sources, `warStartPackage` serves the packaged WAR — semantics flipped vs xsbt-web-plugin's start/quickstart). Related older request: #6.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the files under src/main/g8/, especially default.properties, build.sbt, web.xml, and project/web-plugin.sbt, then compare the current Lift README with the sbt-war documentation. Verify the generated project builds against Lift 4.x and that its supported run commands match the README, including the distinction between warStart and warStartPackage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100