如下所示的Maven项目结构
Parent
Child1WithTestSuiteXML
Child2NoTestSuiteSXML
在父pom中具有如下的maven-surefire-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<argLine>@{argLine}</argLine>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
某些子模块没有testng.xml文件,maven构建失败
[ERROR] Suite file D:\Parent\Child2NoTestSuiteSXML\testng.xml is not a valid file