jenkins中的sbt输出给出了垃圾字符

时间:2017-06-21 01:07:27

标签: jenkins sbt sbt-assembly jenkins-docker

在输出中打印以下内容

> [A
[2K[0m[[0minfo[0m] [0mResolving org.scala-sbt#task-system;0.13.13 ...[0m
[A
[2K[0m[[0minfo[0m] [0mResolving org.scala-sbt#tasks;0.13.13 ...[0m
[A
[2K[0m[[0minfo[0m] [0mResolving org.scala-sbt#tracking;0.13.13 ...[0m
[A
[2K[0m[[0minfo[0m] [0mResolving org.scala-sbt#cache;0.13.13 ...[0m
[A
[2K[0m[[0minfo[0m] [0mResolving org.scala-sbt#testing;0.13.13 ...[0m
[A
[2K[0m[[0minfo[0m] [0mResolving org.scala-sbt#test-agent;0.13.13 ...[0m
[A

而不是

[info] Resolving org.scala-sbt#task-system;0.13.13 ...
[info] Resolving org.scala-sbt#tasks;0.13.13 ...
[info] Resolving org.scala-sbt#tracking;0.13.13 ...
[info] Resolving org.scala-sbt#cache;0.13.13 ...
[info] Resolving org.scala-sbt#testing;0.13.13 ...

我怎样才能摆脱多余的垃圾角色?我正在使用jenkins使用sbt构建scala项目。

1 个答案:

答案 0 :(得分:3)

Turn off the color output(来自here):

-Dsbt.log.noformat=true