我有一个SBT项目聚合多个项目,如下所示:
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)
}
由于某些原因,某些项目最终会对“项目”文件夹进行深层嵌套。例如,Utils可能看起来像:'Util / project / project / project / project /...
我正在使用Intellij的SBT插件同步演示文稿,但使用SBT管理项目。我不确定这是SBT问题还是Intellij问题。
感谢您提供的任何帮助。
库尔特
答案 0 :(得分:0)
这是一个IntelliJ问题(与SBT插件有关的许多其他问题......)
我认为您可能在定义模块并将该模块添加到根项目聚合之前在某处刷新了您的配置,这会使IntelliJ陷入混乱。
这可以在IntelliJ中修复: