4
我對SBT比較陌生。我想在我的SBT配置中包含jooq-sbt-plugin(GitHub)。我正在使用Build.scala來處理多個項目,我想在其中包含jooq-sbt-plugin配置,但我無法弄清楚它放在哪裏。如何配置jooq-sbt-plugin
import sbt._
import Keys._
object SampleBuild extends Build {
lazy val all = Project(id = "all", base = file("."), settings = defaultSettings) aggregate(
one, two
)
lazy val one = Project(
id = "one",
base = file("one"),
settings = defaultSettings ++ Seq(
libraryDependencies ++= Dependencies.one
)
)
lazy val two = Project(
id = "two",
base = file("two"),
settings = defaultSettings ++ Seq(
libraryDependencies ++= Dependencies.two
)
) dependsOn (one)
override lazy val settings = super.settings ++ buildSettings
lazy val buildSettings = Seq(
organization := "org.sample",
version := "0.1-SNAPSHOT",
scalaVersion := "2.10.2"
)
lazy val defaultSettings = Defaults.defaultSettings ++ Seq(
scalacOptions in Compile ++= scalacParams,
externalResolvers in Compile := Resolvers.commonResolvers,
shellPrompt := ShellPrompt.buildShellPrompt,
resolvers ++= Resolvers.commonResolvers
)
}
object Resolvers { /* ... */ }
object Dependencies { /* ... */ }
object ShellPrompt { /* ... */ }
而且,我已經添加了以下到plugins.sbt
但任務jooq:codegen
沒有發現,當我嘗試運行它。
// JOOQ plugin for SBT
resolvers += "sean8223 Releases" at "https://github.com/sean8223/repository/raw/master/releases"
addSbtPlugin("sean8223" %% "jooq-sbt-plugin" % "1.0")
我想什麼是與項目one
運行jOOQ插件。我應該如何將這個配置添加到我的Build.scala?非常感謝幫助。提前致謝!
謝謝!我錯過了導致jooqSettings不可見的JOOQPlugin導入。 – mkko