Idea中maven项目pom文件引入testng

编程入门 行业动态 更新时间:2024-10-06 04:01:17

Idea中maven项目pom<a href=https://www.elefans.com/category/jswz/34/1771438.html style=文件引入testng"/>

Idea中maven项目pom文件引入testng

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=".0.0"xmlns:xsi=""xsi:schemaLocation=".0.0 .0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>yjk</groupId><artifactId>yjk</artifactId><version>1.0-SNAPSHOT</version><!--在pom.xml文件插入如下依赖引入textng:--><dependencies><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.14.3</version><scope>test</scope></dependency></dependencies>
</project>

在pom.xml文件引用testng的时候,有个标签<scope>test</scope>限制了只能在test目录下使用

**

解决:

**

将上面pom.xml文件中的<scope>test</scope>去掉就可以在main文件夹下使用。

    <dependencies><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.14.3</version></dependency></dependencies>

更多推荐

Idea中maven项目pom文件引入testng

本文发布于:2024-02-28 06:44:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1768491.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   项目   maven   Idea   pom

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!