如何更改 SBT 的 sbt-xjc 插件中的源目录? [英] How does one change the source directory in the sbt-xjc plugin for SBT?
本文介绍了如何更改 SBT 的 sbt-xjc 插件中的源目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据 docs,默认位置是:src/main/resources.
Per the docs, the default location is: src/main/resources.
我的 XSD 位于 src/main/schema,所以我需要更改源设置.
My XSD's are in src/main/schema, so I need to change the sources setting.
所以我使用了以下内容:
So I have used the following:
sources in (xjc, Compile) <+= sourceDirectory / "main" / "schema"
结果:
overloaded method value in with alternatives:
[error] (p: sbt.Reference,t: sbt.Scoped)sbt.ScopedTask[Seq[java.io.File]] <and>
[error] (p: sbt.Reference,c: sbt.ConfigKey)sbt.ScopedTask[Seq[java.io.File]] <and>
[error] (c: sbt.ConfigKey,t: sbt.Scoped)sbt.ScopedTask[Seq[java.io.File]]
[error] cannot be applied to (sbt.TaskKey[Seq[java.io.File]], sbt.Configuration)
[error] Error occurred in an application involving default arguments.
[error] sources in (xjc, Compile) <+= sourceDirectory / "main" / "schema"
[error] ^
[error] one error found
推荐答案
sources in (Compile, xjc) <<= sourceDirectory map (_ / "main" / "schema" ** "*.xsd" get)
文档已更新.
这篇关于如何更改 SBT 的 sbt-xjc 插件中的源目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文