当我在 Linux 机器中运行时显示其执行日志的命令,但当我通过 ssh 触发相同的命令时,它不显示日志



当我在其显示执行日志的 putty 中运行以下命令时,

如下所示
sourceanalyzer -b sample mvn com.fortify.sca.plugins.maven:sca-maven-plugin:18.10:translate
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.test:sample:jar:0.0.5-SNAPSHOT`
----------
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 159, column 12
[WARNING] 'build.plugins.plugin.version' for org.springframework.boot:spring-boot-maven-plugin is missing. @ line 155, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]

当我在TFS中对ssh任务运行相同的命令时,上面的执行日志不会显示并获取输出,如下所示。

2019-01-31T17:48:41.2940860Z sourceanalyzer -b sample mvn com.fortify.sca.plugins.maven:sca-maven-plugin:18.10:translate
2019-01-31T17:48:42.2004980Z ##[section]Finishing: Fortify scanning

我希望获得与TFS构建中的第一步相同的输出。

一个简单的解决方法是将命令的输出通过管道传输到文本文件。

[Fortify_command] > outputfile.txt

相关内容

最新更新