Java 是否可以通过Maven POM文件针对特定的TestNG.xml文件?
可以只针对Maven POM文件中列出的两个TestNG xml文件中的一个吗 我的Maven POM文件指向两个xml文件:uat.xml和prepod.xml,如何使用Maven命令(如mvn clean compile test)仅针对其中一个xml文件Java 是否可以通过Maven POM文件针对特定的TestNG.xml文件?,java,xml,maven,testing,selenium-webdriver,Java,Xml,Maven,Testing,Selenium Webdriver,可以只针对Maven POM文件中列出的两个TestNG xml文件中的一个吗 我的Maven POM文件指向两个xml文件:uat.xml和prepod.xml,如何使用Maven命令(如mvn clean compile test)仅针对其中一个xml文件 <build> <pluginManagement> <plugins> <plugin> <group
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<!--<executable>C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe</executable> -->
<executable>${env.JAVA_HOME}\bin\javac.exe</executable>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>uat.xml</suiteXmlFile>
<suiteXmlFile>preprod.xml</suiteXmlFile>
</suiteXmlFiles>
<testErrorIgnore>false</testErrorIgnore>
<testFailureIgnore>false</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
org.apache.maven.plugins
maven编译器插件
3.6.1
1.8
1.8
真的
${env.JAVA\u HOME}\bin\javac.exe
org.apache.maven.plugins
maven surefire插件
2.20
uat.xml
prepod.xml
假的
假的
见下文。您将按名称引用该文件。所以
mvn清洁测试-Dtestfile=uat.xml
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${testfile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
${testfile}
见下文。您将按名称引用该文件。所以
mvn清洁测试-Dtestfile=uat.xml
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${testfile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
${testfile}