Как изменить исходный каталог в плагине sbt-xjc для SBT? - PullRequest
1 голос
/ 08 ноября 2011

Согласно документам расположение по умолчанию: src / main / resources.

Мои XSD находятся в src / main / schema, поэтому мне нужно изменить настройку источников.1005 *

Итак, я использовал следующее:

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

1 Ответ

1 голос
/ 16 ноября 2011
sources in (Compile, xjc) <<= sourceDirectory map (_ / "main" / "schema" ** "*.xsd" get)

Документы были обновлены.

...