Scala SBT多项目中项目文件夹的深度嵌套
我有一个SBT项目,它集合了多个项目,如下所示:Scala SBT多项目中项目文件夹的深度嵌套,scala,sbt,Scala,Sbt,我有一个SBT项目,它集合了多个项目,如下所示: object ClientCore extends Build { /** * This is the root project */ lazy val rootProj = Project(id = "clientcore", base = file(".")) aggregate( utilsProj, commonUiProj, spatialMathProj, sessionManagerProj,
object ClientCore extends Build {
/**
* This is the root project
*/
lazy val rootProj = Project(id = "clientcore", base = file(".")) aggregate(
utilsProj,
commonUiProj,
spatialMathProj,
sessionManagerProj,
lobbyProj,
)
/**
* This is a utils library
*/
lazy val utilsProj = Project(id = "utils", base = file("Utils"))
/**
* A shared library for UI elements
*/
lazy val commonUiProj = Project(id = "commonui", base = file("CommonUI"))
/**
* This is a spatial math library
*/
lazy val spatialMathProj = Project(id = "spatialmath", base = file("SpatialMath"))
lazy val sessionManagerProj = Project(id = "sessionmanager", base = file("sessionManager"),
settings = buildSettings ++ assemblySettings) settings(
outputPath in assembly := new File(s"$outDir\\SessionManagerClient.jar"),
jarName in assembly := "SessionManagerClient.jar",
test in assembly := {}
) dependsOn(utilsProj)
lazy val lobbyProj = Project(id = "lobby", base = file("Lobby"),
settings = buildSettings ++ assemblySettings) settings(
outputPath in assembly := new File(s"$outDir\\Lobby.jar"),
jarName in assembly := "Lobby.jar",
test in assembly := {}
) dependsOn(utilsProj)
}
出于某种原因,一些项目最终会有一个“项目”文件夹的深层嵌套。例如,Util可能看起来像:“Util/project/project/project/project/
我使用Intellij的SBT插件来同步演示文稿,但使用SBT管理项目。我不确定这是SBT问题还是Intellij问题
谢谢你能提供的帮助
Kurt这是一个IntelliJ问题(与SBT插件相关的许多其他问题…)
我认为在定义模块并将该模块添加到根项目聚合之前,您可能已经在某个地方刷新了配置,这会在IntelliJ中造成混乱
这可以在IntelliJ中修复:
- 从IntelliJ分离项目
- 重新启动IntelliJ
- 重新导入您的项目