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

Adarsh
  • 73
  • 10

1 Answers1

0

I think it might be because of the lack of <scope>. The default scope is compile, used if none is specified, but we need test here.

<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>
Peter Quan
  • 788
  • 4
  • 9
  • 1
    Well i tried by adding 'scope' but it didn't work. I recreated a new project and it worked fine. – Adarsh Sep 15 '20 at 17:31