I use the Maven task in Azure DevOps Pipelines. I need to activate a concrete profile, but I don't understand how to do it. I try to pass a profile in 'options' and in 'goals' but it doesn't work. How can I activate a profile correctly?
- 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
I can see in logs:
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
But the profile 'someprofile' isn't activated in reality.