1
我看到了用於向SBT項目添加配置文件的代碼,但它在Scala 2.9.2中不適合我。值的值不是sbt.SettingKey在SBT 0.12下的成員?
val ProfileDev = config("dev") extend(Runtime)
val ProfileQA = config("qa") extend(Runtime)
val root = (project in file(".")).
configs(ProfileDev, ProfileQA). // add config here!
settings(
name := "helloworld",
....
).
settings(inConfig(ProfileDev)(Classpaths.configSettings ++ Defaults.configTasks ++ Defaults.resourceConfigPaths ++ Seq(
unmanagedResourceDirectories += {baseDirectory.value/"src"/configuration.value.name/"resources"}
)): _*).
settings(inConfig(ProfileQA)(Classpaths.configSettings ++ Defaults.configTasks ++ Defaults.resourceConfigPaths ++ Seq(
unmanagedResourceDirectories += {baseDirectory.value/"src"/configuration.value.name/"resources"}
)): _*)
這是錯誤我面對
Compiling 1 Scala source to /home/robin/workspace/active_projects/Republiq/server/project/target/scala-2.9.2/sbt-0.12/classes...
[error] /home/robin/workspace/active_projects/Republiq/server/project/Build.scala:121: value value is not a member of sbt.SettingKey[java.io.File]
[error] unmanagedResourceDirectories += {baseDirectory.value/"src"/configuration.value.name/"resources"}
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed