earldouglas / sbt-war

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

warStop/webappStop are noisy on stdout/stderr #961

Closed earldouglas closed 1 month ago

earldouglas commented 1 month ago
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)

We used to pipe stderr to /dev/null when stopping the container: https://github.com/earldouglas/sbt-war/blob/4.2.5/src/main/scala/com/earldouglas/xwp/ContainerPlugin.scala#L239

We might want to move some/all of the output to streams. On the other hand, it can be useful to see it directly in the sbt console.

Related: