使用intellij我创建了一个sbt项目。添加到build.sbt
这样的子项目:
lazy val subProject = project in file("subProject")
将生成子项目。我错过了标准的源目录,如src/main/scala src/main/scala2_11
....
在IntelliJ的处理中,手动添加将很困难。在每次sbt更新时,我必须将子项目的所有源手动设置为源文件夹。
我该怎么办?
build.sbt:
name := "WizardLogisticSystem"
version := "1.0"
scalaVersion := "2.12.1"
lazy val scalaV = "2.12.1"
lazy val standardResolver = Seq(
"Sonatype Nexus Repository Manager" at "http://nexus.intelligyscience.de/content/repositories/thirdparty/",
"Sonatype Nexus Repository Manager" at "http://nexus.intelligyscience.de/content/repositories/releases/"
)
lazy val standardDeps = Seq(
"com.typesafe.akka" %% "akka-actor" % "2.4.17",
"com.typesafe.akka" %% "akka-agent" % "2.4.17",
"com.typesafe.akka" %% "akka-camel" % "2.4.17",
"com.typesafe.akka" %% "akka-cluster" % "2.4.17",
"com.typesafe.akka" %% "akka-cluster-metrics" % "2.4.17",
"com.typesafe.akka" %% "akka-cluster-sharding" % "2.4.17",
"com.typesafe.akka" %% "akka-cluster-tools" % "2.4.17",
"com.typesafe.akka" %% "akka-contrib" % "2.4.17",
"com.typesafe.akka" %% "akka-multi-node-testkit" % "2.4.17",
"com.typesafe.akka" %% "akka-osgi" % "2.4.17",
"com.typesafe.akka" %% "akka-persistence" % "2.4.17",
"com.typesafe.akka" %% "akka-persistence-tck" % "2.4.17",
"com.typesafe.akka" %% "akka-remote" % "2.4.17",
"com.typesafe.akka" %% "akka-slf4j" % "2.4.17",
"com.typesafe.akka" %% "akka-stream" % "2.4.17",
"com.typesafe.akka" %% "akka-stream-testkit" % "2.4.17",
"com.typesafe.akka" %% "akka-testkit" % "2.4.17",
"com.typesafe.akka" %% "akka-distributed-data-experimental" % "2.4.17",
"com.typesafe.akka" %% "akka-typed-experimental" % "2.4.17",
"com.typesafe.akka" %% "akka-persistence-query-experimental" % "2.4.17"
)
lazy val sharedBase = (project in file("sharedBase")).settings(
scalaVersion := scalaV,
credentials += Credentials(Path.userHome / ".sbt" / "isCredentials"),
resolvers ++= standardResolver,
libraryDependencies ++= standardDeps
)
lazy val dispositionDepartment = (project in file("dispositionDepartment")).settings(
scalaVersion := scalaV,
credentials += Credentials(Path.userHome / ".sbt" / "isCredentials"),
resolvers ++= standardResolver,
libraryDependencies ++= standardDeps
).enablePlugins(DockerPlugin).dependsOn(sharedBase)
我的plugins.sbt
logLevel := Level.Warn
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.4")