karate - 如何在 VSCode 上运行自定义空手道项目
问题描述
我正在使用自定义 Java 库在 IntelliJ 上编写一个测试项目。是否可以通过 VSCode 运行它以使用空手道插件的调试功能?如果我尝试运行它,我会收到以下错误:
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
(20 kB at 23 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml (14 kB at 15 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.954 s
[INFO] Finished at: 2020-10-27T16:50:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix '.options=c' in the current project and in the plugin groups
[org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local
(C:\Users\asd\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command mvn clean
test -f "c:\Users\asd\Documents\test-karate\com.testK\com.testK-karate\pom.xml" -
Dtest=_SyncRunner "-Dkarate.options=c:\Users\asd\Documents\test-karate\com.testK\com.testK-
karate\src\test\java\test.feature" "
terminated with exit code: 1.
该项目在 IntelliJ 上正常运行。
解决方案
从命令中可以清楚地看出您正在使用 Powershell。请将 VS Code 的“默认 shell”切换为cmd
. 您可以在此处找到说明:https ://github.com/intuit/karate/wiki/Karate-Robot-Windows-Install-Guide#install-visual-studio-code
推荐阅读
- vb.net - 没有为字符串“”定义错误运算符“&”并键入“范围”。'?
- php - 计算比例是多少?
- laravel - Laravel 5.7 从存储中获取图像
- xplane - xplane11控制飞行员飞机冻结松动设置
- python - Python protobuf 解码 base64 字符串
- flutter - 我收到一个错误,名为没有属性“BoxShadow”。我有一个代码如下:
- typescript - 重复页面的 React Native Typescript 上的导航结构
- xml - Mule 4 嵌套 XML 模式导入在 APIKit 路由器中失败
- php - 如何在 $_POST 中搜索动态添加的输入值?
- sql - 计算一周内花费的总时间