karate - ./gradlew 测试失败,出现 netty WebSocketException
问题描述
在 karate-demo 包中运行 ./gradlew 测试时出现 websocket 异常
它在 ubuntu 中
debasis:~/project/api/karate/karate/karate-demo$ /gradlew test bash: /gradlew: No such file or directory dev@debasis:~/project/api/karate/karate/karate-demo$ ./gradlew测试
任务:compileTestJava /home/dev/project/api/karate/karate/karate-demo/src/test/java/demo/websocket/WebSocketClientRunner.java:5:错误:找不到符号导入com.intuit.karate.netty。 WebSocket选项;^ 符号:类 WebSocketOptions 位置:包 com.intuit.karate.netty 1 错误
FAILURE:构建失败并出现异常。
出了什么问题:任务“:compileTestJava”执行失败。
编译失败;有关详细信息,请参阅编译器错误输出。
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。
在https://help.gradle.org获得更多帮助
4 秒内构建失败 3 个可操作的任务:1 个已执行,2 个是最新的
即使在 mavan/gradle 中没有构建错误,import 语句也无法解析类 WebSocketException
解决方案
I had the same issue after cloning the github repository (master).
Resolved the same by running ./gradlew test from the parent directory since the dependencies of the karate-demo are built from the parent using the version 1.0.0 which is not yet published.
推荐阅读
- ajax - 成功时,div 仅通过 AJAX 加载一次
- jquery - 无法使用 jQuery 选择器抓取图像
- javascript - 在Node js中登录身份验证时出错
- java - 每当我运行由 java.lang.nullpointerException 引起的应用程序时,我都会收到此错误:findViewbyId(R.id.btn_start)must not be null
- python - Tkinter 窗口浮动在 i3 中,但也适用于 MS-Windows
- javascript - 过滤不等于特定文本jqgrid的数据
- flutter - 颤振中的上下文问题“未定义的名称'上下文'”
- docker - 使用 docker 运行 jmeter
- cypress - 与赛普拉斯的元素查询不一致
- blockchain - 如何通过保持相同的 CID 将文件上传到 IPFS