Skip to content

Commit

Permalink
Use sbt.Keys.forkOptions as the default fork options (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
earldouglas authored Feb 1, 2025
1 parent 5ee8423 commit 2781d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Create a WAR file with `package`:
| `warClasses` | `Map[String,File]` | project classes | .class files to copy into the *WEB-INF/classes* directory |
| `warLib` | `Map[String,File]` | project libs | JAR files to copy into the *WEB-INF/lib* directory |
| `warPort` | `Int` | `8080` | The local container port to use when running with `warStart` |
| `warForkOptions` | [`ForkOptions`] | [`BufferedOutput`] | Options for the forked JVM used when running with `warStart` |
| `warForkOptions` | [`ForkOptions`][1] | [`forkOptions`][2] | Options for the forked JVM used when running with `warStart` |

## Commands

Expand Down Expand Up @@ -363,5 +363,5 @@ To stop the running container, use `warStop`:
> warStop
```

[`ForkOptions`]: https://www.scala-sbt.org/1.x/api/sbt/ForkOptions.html
[`BufferedOutput`]: https://www.scala-sbt.org/1.x/api/sbt/OutputStrategy$$BufferedOutput.html
[1]: https://www.scala-sbt.org/1.x/api/sbt/ForkOptions.html
[2]: https://www.scala-sbt.org/1.x/api/sbt/Keys$.html#forkOptions:sbt.TaskKey[sbt.ForkOptions]
6 changes: 0 additions & 6 deletions src/main/scala/com/earldouglas/sbt/war/SbtWar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ object SbtWar extends AutoPlugin {
}
}

val forkOptions: Initialize[Task[ForkOptions]] =
Def.task {
ForkOptions()
.withOutputStrategy(Some(BufferedOutput(streams.value.log)))
}

val runnerLibrary: Initialize[ModuleID] =
Def.setting {

Expand Down

0 comments on commit 2781d6c

Please sign in to comment.