earldouglas / sbt-war

Package and run .war files with sbt
BSD 3-Clause "New" or "Revised" License
382 stars 105 forks source link

Use BufferedOutput for forked JVM output strategy #971

Closed earldouglas closed 1 month ago

earldouglas commented 1 month ago

This reduces the noise caused when destroying the forked war/webapp processeses throws stream closure exceptions:

Exception in thread "Thread-4" java.io.IOException: Stream closed
        at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
        at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:289)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
        at scala.sys.process.BasicIO$.loop$1(BasicIO.scala:238)
        at scala.sys.process.BasicIO$.transferFullyImpl(BasicIO.scala:246)
        at scala.sys.process.BasicIO$.transferFully(BasicIO.scala:227)
        at scala.sys.process.BasicIO$.$anonfun$toStdErr$1(BasicIO.scala:216)
        at scala.sys.process.BasicIO$.$anonfun$toStdErr$1$adapted(BasicIO.scala:216)
        at scala.sys.process.ProcessBuilderImpl$Simple.$anonfun$run$4(ProcessBuilderImpl.scala:83)
        at scala.sys.process.ProcessImpl$Spawn$$anon$1.run(ProcessImpl.scala:27)

Fixes #961