Jenkins:调用 maven 部署时日志太多

Jenkins: too many logs when maven deploy called

jenkins日志中maven插件maven-deploy-plugin:2.8.2:deploy调用时日志过多

例如,当我尝试上传 50MB war 到 Nexus 时,有:

Uploading: ...
2/51018 KB
4/51018 KB
6/51018 KB
...
25412/51018 KB
...
51018/51018 KB
Uploaded: ...

每 2 KB 对应一行,本例中有 51018/2 = 25509 行!

如何将 jenkins(或 maven)配置为仅具有如下上传状态:

Uploading: ...
51018/51018 KB
Uploaded: ...

您可以将 --batch-mode 或缩写变体 -B 添加到您的 maven 命令中。