From 069e6f1ed275e072d1e4c808aeaaed574c2514c0 Mon Sep 17 00:00:00 2001 From: James Earl Douglas Date: Fri, 27 Sep 2024 08:33:51 -0700 Subject: [PATCH] Stop/destroy the connector and context --- .../com/earldouglas/sbt/war/WebappComponentsRunner.scala | 6 ++++++ .../earldouglas/sbt/war/WebappComponentsRunnerPlugin.scala | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunner.scala b/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunner.scala index ab66dcee..fc038eb5 100644 --- a/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunner.scala +++ b/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunner.scala @@ -113,7 +113,13 @@ object WebappComponentsRunner { override def start(): Unit = tomcat.start() override def join(): Unit = tomcat.getServer().await() override def stop(): Unit = { + + connector.stop() + context.stop() tomcat.stop() + + connector.destroy() + context.destroy() tomcat.destroy() } } diff --git a/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunnerPlugin.scala b/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunnerPlugin.scala index 3495844a..1282ced9 100644 --- a/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunnerPlugin.scala +++ b/src/main/scala/com/earldouglas/sbt/war/WebappComponentsRunnerPlugin.scala @@ -39,8 +39,8 @@ object WebappComponentsRunnerPlugin extends AutoPlugin { val runner: WebappComponentsRunner = WebappComponentsRunner( hostname = "localhost", // TODO this could be a settingKey - contextPath = "", // TODO this could be a settingKey port = webappPort.value, + contextPath = "", // TODO this could be a settingKey emptyWebappDir = emptyDir, emptyClassesDir = emptyDir, resourceMap = WebappComponentsPlugin.webappContents.value