authorjapps / zerocode-hello-world

Zerocode YAML and JSON based declarative steps hello world rest api testing example - soap, database
https://github.com/authorjapps/zerocode
MIT License
18 stars 36 forks source link

Running ./gradlew clean build is throwing build exception #18

Closed ankitshubham97 closed 4 years ago

ankitshubham97 commented 4 years ago

Note: You could face the error: "Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain". This got removed only after applying the hack mentioned in #17 . On running gradlew clean build, it throws the following error.

Ankits-MacBook-Air:zerocode-hello-world-fork ankitshubham$ ./gradlew clean build

> Task :compileJava FAILED
/Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/testhelp/localserver/RunMeFirstLocalMockRESTServer.java:3: error: package org.jsmart.simulator.annotations does not exist
import org.jsmart.simulator.annotations.ApiRepo;
                                       ^
/Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/testhelp/localserver/RunMeFirstLocalMockRESTServer.java:4: error: package org.jsmart.simulator.impl does not exist
import org.jsmart.simulator.impl.JsonBasedSimulator;
                                ^
/Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/testhelp/localserver/RunMeFirstLocalMockRESTServer.java:15: error: cannot find symbol
public class RunMeFirstLocalMockRESTServer extends JsonBasedSimulator {
                                                   ^
  symbol: class JsonBasedSimulator
/Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/testhelp/localserver/RunMeFirstLocalMockRESTServer.java:14: error: cannot find symbol
@ApiRepo("localhost_stubs")
 ^
  symbol: class ApiRepo
/Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/testhelp/localserver/RunMeFirstLocalMockRESTServer.java:27: error: cannot find symbol
        new RunMeFirstLocalMockRESTServer(PORT).start();
                                               ^
  symbol:   method start()
  location: class RunMeFirstLocalMockRESTServer
/Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/zerocodejavaexec/httpclient/CustomHttpClient.java:67: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: /Users/ankitshubham/workspace/zerocode/zerocode-hello-world-fork/src/main/java/org/jsmart/zerocode/zerocodejavaexec/httpclient/CustomHttpClient.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
2 actionable tasks: 1 executed, 1 up-to-date

It seems like the build.gradle lacks the required dependencies.

ankitshubham97 commented 4 years ago

This issue is fixed now in #19.