[英]Maven build in Jenkins writes the output of execution to a file
I have a Maven build job in Jenkins and in the "Build" section, I have given Maven Version and Root POM and in the "Goals and Options" filed, I am executing the pom with customized goals. 我在詹金斯(Jenkins)有一个Maven构建工作,在“构建”部分,给出了Maven版本和Root POM,在提交的“目标和选项”中 ,我正在执行具有自定义目标的pom。 I need to write the output of the execution to a file, I tried below
我需要将执行的输出写入文件,我在下面尝试过
clean install -Dmaven.test.skip=true -nsu -l output.log
clean install -Dmaven.test.skip=true -nsu -DoutputFile=output.log
clean install -Dmaven.test.skip=true -nsu -Doutput=output.log
Nothing works for me. 什么都不适合我。 Could anyone please help in either the above way or any other option available to direct the output log to a file?
任何人都可以通过上述方式或任何其他可用于将输出日志定向到文件的选项来提供帮助吗?
According to mvn -help
, the following works for me: 根据
mvn -help
,以下对我mvn -help
:
clean install -l output.log
The file is stored to the job workspace, if you want to publish it as an artifact, you need to add a Publish artifact or Publish document post-step (or Publish document post-build option in Maven project). 该文件存储在作业工作区中,如果要将其发布为工件,则需要添加“发布工件”或“发布文档后步骤”(或Maven项目中的“发布文档后生成”选项)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.