【发布时间】:2021-01-28 08:44:22
【问题描述】:
即使目标任务失败,我也会在 Maven 任务日志中看到“构建成功”。如果任务有以下错误,如何使工作失败?谢谢。
Yaml 文件:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'integration-test -DskipIntegrationTests=false -Dmaven.test.failure.ignore=false'
错误如下:
[Error] Failures:
[Error] <Filename> errror details
[INFO]
[ERROR] Tests run:2, Failures:2, Errors:0, Skipped:0
[INFO]
[INFO]----------------------------------------------
[INFO] BUILD SUCCESS
[INFO]----------------------------------------------
【问题讨论】:
标签: azure maven azure-devops task pipeline