我在Azure DevOps Pipelines中使用Maven任务。我需要激活一个具体的profile,但是我不知道如何做到。我尝试在'options'和'goals'中传递profile,但都没有成功。请问如何正确地激活profile?
- task: Maven@3
displayName: maven_project_profile
inputs:
mavenPomFile: 'my_project/pom.xml'
options: '-DskipTests=true -P someprofile'
goals: 'clean deploy -p someprofile'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
testRunTitle: 'fixBypassService'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: false
我可以在日志中看到:
2020-01-13T08:45:13.1695224Z [command]/usr/share/apache-maven-3.6.2/bin/mvn -f /home/vsts/work/1/s/my_project/pom.xml -DskipTests=true -P someprofile clean deploy -P someprofile
但实际上,配置文件“someprofile”并未激活。