How to solve: Exception in thread "main" java.lang.NoClassDefFoundError: io/restassured/RestAssured ?

Exception in thread "main" java.lang.NoClassDefFoundError: io/restassured/RestAssured

Just Change Scope : Test --> Compile for rest-assured artifact in POM.xml

Before:
    <!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.1.0</version>
            <scope>test</scope>
        </dependency>

After:
    <!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.1.0</version>
            <scope>compile</scope>
        </dependency>       
How to solve: Exception in thread "main" java.lang.NoClassDefFoundError: io/restassured/RestAssured ? How to solve: Exception in thread "main" java.lang.NoClassDefFoundError: io/restassured/RestAssured ? Reviewed by Ishan Dev Shukl on September 07, 2018 Rating: 5

2 comments:

Thanks a lot for your valuable Comment!

Powered by Blogger.