我有一个带布局的项目
MyProject
-- src
-- target
-- myfiles
-- myfile1.txt
-- myfile2.txt
-- built.sbt
现在我想将myfiles / myfile1.txt和myfiles / myfile2.txt打包到输出jar中。
我尝试将其包含在build.sbt文件中:
mappings in (Compile, packageBin) += {
baseDirectory.value / "myfiles" / "myfile1.txt" -> "File/myfile1.txt"
}
mappings in (Compile, packageBin) += {
baseDirectory.value / "myfiles" / "myfile2.txt" -> "File/myfile2.txt"
}
但是当我使用sbt assembly命令时,它们不包含在jar中。
哪里错了?