Skip to content
CAI
Software that uses CAICheck a score

earldouglas/sbt-war

68.9

Adequate · 20 September 2026

911

lines of production code

Scala

with Java

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is an SBT plugin library that provides tools for packaging Java web applications as WAR files and managing embedded server lifecycles. It supports multiple servlet specifications and enables running applications via embedded Tomcat, either from packaged WARs or directly from in-place webapp components. The codebase includes compatibility layers for Scala 2.12 and 3, along with comprehensive scripted tests to verify packaging and server behavior.

How it got here

2011 — Build modernization and cleanup

4 changes.

The project migrated its build configuration to sbt 1.13.0, replacing the legacy Build.scala script with a modern plugin structure. This period also involved removing outdated SBT container and Jetty runner implementations while establishing a standardized development environment with Nix, Scalafmt, and Scalafix.

2013–2024 — WAR packaging and embedded server support

5 changes.

This period focused on introducing the SbtWar plugin to standardize WAR packaging and embedded server lifecycle management. The runner was migrated from webapp-runner to Apache Tomcat Embed, enabling both packaged WAR and in-place webapp component serving. Comprehensive test coverage and dependency updates for Scala and Servlet specifications were also implemented.

2025 — Scala 3 compatibility and test expansion

7 changes.

This period focused on adding Scala 3 and sbt 2.0 compatibility layers to bridge API differences in file handling and classpath resolution. It also significantly expanded test coverage by introducing scripted tests for WAR packaging, servlet API support, and webapp component tasks, alongside a new MUnit-based test template for verifying application logic.

Features

Initial project setup with formatting, linting, and development environment configuration

The repository is initialized with configuration files for code style and quality: \.scalafmt.conf\ sets the formatter to version 3.11.5 with Scala 2.12 source 3 dialect, and \.scalafix.conf\ enables the OrganizeImports and RemoveUnused rules. A \shell.nix\ file provides a Nix-based development environment including JDK 17, sbt, Metals, and Neovim, along with shell hooks for running formatting and test commands. Documentation is added via \README.md\ and \CONTRIBUTING.md\, and the project includes a BSD-3-Clause \LICENSE\.

(repo-wide) · high confidence

Introduce SbtWar plugin for WAR packaging and server management

This change introduces the SbtWar plugin, which provides a standardized way to package web applications as WAR files and manage embedded server lifecycles. It adds new sbt settings and tasks including warStart, warStop, warJoin, and warStartPackage to control the server, along with warContextPath to configure the application's context path. The plugin automatically handles the inclusion of webapp resources, compiled classes, and library JARs into the WAR structure and configures the appropriate servlet API dependency (defaulting to Jakarta Servlet 6.1) based on the servletSpec setting.

src/main/scala/com/earldouglas · high confidence

Removals

Removal of legacy JettyRunner template

The \JettyRunner.scala\ template file has been removed from the project. This file previously provided a mechanism to start, reload, and stop a Jetty server instance for specific versions, handling web application context deployment and classloading. Its deletion indicates that this specific embedded server runner implementation is no longer part of the generated or supported codebase.

src/main/templates · high confidence

Removal of legacy SBT container and webapp plugins

The legacy SBT container and webapp plugins have been removed from the codebase. This change deletes the core implementation files (\Container.scala\, \Runner.scala\, \WebPlugin.scala\, \WebappPlugin.scala\) and the associated key definitions (\PluginKeys.scala\) that previously provided functionality for running embedded web servers (such as Jetty) and managing web application deployments within the SBT build tool. Users relying on these specific SBT integration features will no longer have access to them through this library.

src/main/scala/com/github · high confidence

Behavioural changes

Added Scala 3 compatibility layer for sbt 2.0 integration

A new compatibility module has been introduced to support Scala 3 and sbt 2.0. This change adds distinct implementation files for Scala 2.12 and Scala 3 that bridge API differences, specifically handling the conversion between standard Java \File\ objects and sbt's \HashedVirtualFileRef\ for managed jars and classpath resolution. This enables the plugin to function correctly in environments using the newer Scala 3 compiler and sbt 2.0 runtime.

src/main/scala-2.12, src/main/scala-3 · high confidence

Runner now uses embedded Tomcat to serve WARs and in-place webapp components

The runner has migrated from webapp-runner to Apache Tomcat Embed, introducing two new execution modes. The WarRunner now starts an embedded Tomcat instance to serve a specified WAR file, configurable via properties (hostname, port, context path, war file). Additionally, a new WebappComponentsRunner allows serving a webapp composed of individual in-place resources and classes without packaging a WAR, mapping specific source files to webapp paths via a resource map configuration. Both runners provide start, join, and stop handles for lifecycle management and include corresponding configuration loaders and tests.

runner · high confidence

Test coverage

Added scripted test for Servlet 3.0 API compatibility; Added scripted tests for WAR package manifest and exportJars behavior; Added scripted tests for WebappComponentsPlugin war tasks; Added scripted tests for warLib exportJars behavior; Added scripted tests for warStart, warStartPackage, and context-path configuration; Added test fixtures for webapp component rendering; Added test template with MUnit-based verification for servlet and runner components; Added tests for WebappComponents and test utilities.

Dependencies

Migrate build configuration to sbt 1.13.0 and modern plugin structure

The project build has been upgraded to sbt version 1.13.0, replacing the previous \Build.scala\ script with a modern \plugins.sbt\ file. This change updates the core build tooling and associated plugins, including scripted-plugin, sbt-pgp (2.3.2), sbt-scalafmt (2.6.2), sbt-scalafix (0.14.9), sbt-buildinfo (0.13.2), and sbt-java-formatter (0.13.1). The removal of the legacy \Build.scala\ eliminates the custom logic for generating Jetty runners and simplifies the build definition to standard sbt plugin declarations.

project · high confidence

Upgrade to Scala 2.12.21, Scala 3.8.4, and MUnit 1.3.6

The build system has been updated to use Scala 2.12.21 and Scala 3.8.4, with the test framework upgraded to MUnit 1.3.6. This change also introduces support for Servlet specifications 3.0, 3.1, 4.0, 5.0, 6.0, and 6.1, utilizing corresponding Tomcat embed versions (8.5.68, 9.0.120, 10.0.27, 10.1.57, and 11.0.25) for the war-runner modules.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 69.

Lenses

  • Code Health 100
  • Architecture 100
  • Maturity 73
  • Readiness 57
  • Security 75

Changes since last survey

  • 300 commits — 298 feature/other, 2 fixes

By area

  • (root) — 157 commits
  • project/build.properties — 28 commits
  • src/sbt-test — 26 commits
  • project/plugins.sbt — 25 commits
  • src/main — 18 commits
  • .github/workflows — 7 commits
  • examples/zio — 6 commits
  • runners/3.1 — 6 commits
  • (repo) — 5 commits
  • examples/payara-micro — 5 commits
  • src/test — 5 commits
  • runners/6.1 — 2 commits
  • src/template — 2 commits
  • examples/adder — 1 commit
  • examples/free — 1 commit
  • examples/mustache — 1 commit
  • examples/sbt-0.x — 1 commit
  • examples/sbt-1.x — 1 commit
  • runner/src — 1 commit
  • runners/3.0 — 1 commit

Notable commits

  • fix: Fix file paths when running on Windows (#999)
  • fix: Revert "tomcat: Drop unsupported versions (#1142)" (#1148)
  • change: Add Maven badge (#970)
  • change: Add a link to WAR (file format) on Wikipedia
  • change: Add a scripted test for WarPlugin / package (#958)
  • change: Add a scripted test to check the .war manifest (#972)
  • change: Add a servletSpec setting to choose among runners (#988)
  • change: Add a test for the @WebServlet annotation (#940)
  • change: Add docs on triggered execution and container logs (#1018)
  • change: Add jdk and nvim to the nix-shell derivation (#1042)
  • change: Add missing () to Java interface method calls (#969)
  • change: Add scripted tests for exportJars := true/false (#1069)
  • change: Add scripted tests for exportJars := true/false (#1077)
  • change: Add support for J2EE 9 / Servlet 5.0 / Tomcat 10.0 (#1208)
  • change: Block on stopping the server until the process exits (#1057)
  • change: Build status badge: build.yml -> test.yml
  • change: Chat link: Gitter -> Discord
  • change: Clarify which exportJars test is which (#1074)
  • change: Copy edit
  • change: Copy edit abstract; add Giter8 docs
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

earldouglas/sbt-war was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9d53126cf931503dcf23ab2a26cfda12c8bbaaf2 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.