Pee*_*dhi 6 java dependencies pom.xml rest-assured rest-assured-jsonpath
嗨,我在使用放心 4.1.1 时无法解决错误。我的 Eclipse IDE 中的库。我在 pom.xml 文件中添加了放心库,但错误仍未解决。
我尝试从https://mvnrepository.com/artifact/io.rest-assured/rest-assured/4.1.1重新导入放心库 但仍然不起作用
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>RestAssuredTutorial</groupId>
<artifactId>RestAssuredTutorial</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.1.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-
simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
</dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)
导入io无法解析
Ime*_*gha 10
添加上述依赖项时,您已scope设置为test。这会限制您的代码访问源代码中该依赖项的类。也就是说,您只能在您的测试源中访问这些类(例如:${project.dir}/src/test/java/<package>, ${project.dir}/test/<package>.
如果这不是您的预期用例,只需删除该scope属性。
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.1.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8339 次 |
| 最近记录: |