sbt - 构建一个 sbt 程序集,然后使用 sbt 'run-main 运行' 失败并出现 [error] Not a valid command: run-main
问题描述
该问题出现在其他地方,人们建议使用 runMain,但最终会出现 ClassNotFoundException,而我得到的是这个跟踪:
sbt:reach-exe> run-main org.clulab.processors.server.ProcessorServer
[error] Expected ID character
[error] Not a valid command: run-main
[error] Expected project ID
[error] Expected configuration
[error] Expected ':'
[error] Expected key
[error] Not a valid key: run-main (similar: runMain, bgRunMain, fgRunMain)
[error] run-main org.clulab.processors.server.ProcessorServer
[error] ^
对于好的 googlefoo,这是一个困难的查询。我错过了什么?提前致谢。
解决方案
它runMain
在较新版本的 sbt 中。破折号分隔的名称前段时间已弃用。
如果只有一个main
,您可以使用run
命令。
推荐阅读
- flutter - 如何使用颤振编辑pdf?
- python - 选择性地禁用继承的成员
- google-forms - 谷歌形成多项选择网格:添加“其他”选项
- amazon-cloudformation - 如果帐号为 XXXXXX,则取消 VPC 配置
- ssl - certbot 生成 ssl 证书的问题
- node.js - 在独立 nodejs 脚本中访问 serverless.yaml 中定义的环境配置
- python - 在文件中写入行后如何在文件顶部写入行数?
- javascript - 对人类隐藏元素,但对机器人隐藏
- angular - Highcharts - Point Angular 12 类型上不存在属性值
- c# - 规则中的 FluentValidation 链式验证器接收缓存的实例和/或属性值?