1

I have added the below dependencies to the maven project pom.xml file and i did a mvn clean, install. I can see the dependencies added to the .m2 folder in my c-drive/users, but they are not listed under the IntelliJ "External Libraries" section. Also when i try to import them to the class i am not seeing them and i get 'Not found' error.

Dependencies added -

    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>json-path</artifactId>
        <version>3.3.0</version>
    </dependency>
  
    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>4.3.0</version>
    </dependency>

enter image description here

4

1 回答 1

0

我想可能是因为缺少<scope>. 默认范围是compile,如果没有指定,则使用,但我们需要test在这里。

<dependency>
    <groupId>io.rest-assured</groupId>
    <artifactId>json-path</artifactId>
    <version>4.3.1</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>io.rest-assured</groupId>
    <artifactId>json-schema-validator</artifactId>
    <version>4.3.1</version>
    <scope>test</scope>
</dependency>
于 2020-09-14T02:57:13.177 回答