On my pom.xml I have created some profiles. On my Eclipse project I have selected the profiles I must use to run with TestNG. The test must doing different things depends on the profile. I try use ${project.activeProfiles[0].id}
, but does not work for me.
The Eclipse selected profiles:
The TestNG execution error:
MVN commands:
When I run the mvn help:active-profiles
command the result is:
The following profiles are active:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
And the mvn help:all-profiles
command result is:
[INFO] Listing Profiles for Project: com.myproject:project:jar:1.0
Profile Id: UAT-Dev-Mt (Active: false , Source: pom)
Profile Id: UAT-Dev-Bg (Active: false , Source: pom)
Profile Id: PROD-Dev-Mt (Active: false , Source: pom)
Profile Id: PROD-Dev-Bg (Active: false , Source: pom)
Profile Id: Acceptance (Active: false , Source: pom)
Profile Id: Regression (Active: false , Source: pom)
Profile Id: CriticalPath (Active: false , Source: pom)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Why TestNG on Eclipse does not work, for me, with this selected profiles and with the maven pom variable?
Thank you in advance.