进入到项目目录后执行:
mvn clean package docker:build
错误信息如下:
程序包org.testng.annotations不存在,XX符号找不到
此时的pom.xml文件如下:
pom.xml
将该行删除后,再次mvn构建,就不会再报找不到testng包了
原因解释:
Even though we have imported the maven dependency for Testng, when you add scope tag in XML file, it treats as JUnit annotation and not as Testng. So when I removed scope tag, My @Test Annotation was treated as Testng Annotation.