更改 SBT 0.10.x 中的项目布局
我感觉自己像个白痴,但我无法使用 SBT 0.10.x 更改我的项目布局。在我的 sbt 0.7.x 项目中,我添加了以下几行:
override def mainScalaSourcePath = "src" / "scala"
override def testScalaSourcePath = "test" / "scala"
override def mainResourcesPath = "resources"
override def mainJavaSourcePath = "src" / "java"
override def testJavaSourcePath = "test" / "java"
override def testResourcesPath = "test" / "resources"
0.10.x 中的等效项是什么?
I feel like an idiot, but I am not able to change my project layout with SBT 0.10.x. In my sbt 0.7.x project I added the lines:
override def mainScalaSourcePath = "src" / "scala"
override def testScalaSourcePath = "test" / "scala"
override def mainResourcesPath = "resources"
override def mainJavaSourcePath = "src" / "java"
override def testJavaSourcePath = "test" / "java"
override def testResourcesPath = "test" / "resources"
What would be the equivalent in 0.10.x ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至少,您可以在
Test
和Compile
范围中配置基本源目录,然后在Compile
范围中配置资源目录。该设置在Test
范围内是正确的,因为默认情况下它是相对于sourceDirectory
的。同样,scala-source 和 java-source 设置也是正确的。要查看实际效果:
您可以使用
inspect
检查 shell 中设置之间的关系;或者浏览SBT 来源Minimally, you can configure the base source directory in the
Test
andCompile
scopes, then configure the resource directory in theCompile
scope. That setting will be correct in theTest
scope because by default it is relative to thesourceDirectory
. Similarly, thescala-source
andjava-source
settings will be correct.To see this in action:
You can inspect the relationships between settings in the shell with
inspect
; or by browsing the source of SBT