在我的pom.xml我已经创造了一些配置文件。在我的Eclipse项目中,我选择了必须使用TestNG运行的配置文件。测试必须做不同的事情取决于配置文件。我尝试使用${project.activeProfiles[0].id}
,但不适合我。如何在Eclipse中使用Maven的有效配置文件使用TestNG执行
Eclipse的选择的配置文件:
TestNG的执行错误:
MVN命令:
当我运行mvn help:active-profiles
命令的结果是:
The following profiles are active:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
而且mvn help:all-profiles
命令的结果是:
[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] ------------------------------------------------------------------------
为什么TestNG的Eclipse的不工作,对我来说,这个选择的配置文件,并与maven pom变量?
预先感谢您。