Maven 中执行标记的用途是什么? 我使用 POM 文件运行 testng.xml,使用和不使用执行标记,我使用 mvn clean 得到相同的输出。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<executions>
<execution>
<id>testngtest</id>
<phase>test</phase>
</execution>
</executions>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${testngxml.location}/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
那为什么我们要使用执行标签?
最佳答案
这是因为对于“maven-surefire-plugin”,测试是默认阶段。 因此没有任何改变。
将阶段更改为编译或其他阶段。
关于java - Maven中执行标签的使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61746270/