【发布时间】:2020-04-26 14:27:43
【问题描述】:
我正在尝试关注intructions 来设置 intellij scala 项目以使用 sbt。但是,我没有找到 intellij 2020.1 中描述的运行/配置。基于this post,我知道配置方式已经改变。但是,该帖子描述了如何使旧项目工作。我要为新项目做什么?
复制步骤
- 用已经配置 mainRunner 的 idea.sbt 创建漂亮的 sbt 项目
sbt new tillrohrmann/flink-project.g8
这包括idea.sbt
lazy val mainRunner = project.in(file("mainRunner")).dependsOn(RootProject(file("."))).settings(
// we set all provided dependencies to none, so that they are included in the classpath of mainRunner
libraryDependencies := (libraryDependencies in RootProject(file("."))).value.map{
module => module.configurations match {
case Some("provided") => module.withConfigurations(None)
case _ => module
}
}
)
它还附带一个 README.md,上面写着:
You can also run your application from within IntelliJ: select the classpath of the 'mainRunner' module in the run/debug configurations.
Simply open 'Run -> Edit configurations...' and then select 'mainRunner' from the "Use classpath of module" dropbox.
将项目导入 intellij 2020.1
现在呢?我在 intellij 2020.1 中找不到“使用模块的类路径”保管箱。
【问题讨论】:
标签: intellij-idea sbt