且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 gradle 中为 ant xjc 任务指定多个绑定文件

更新时间:2023-01-16 13:06:19

根据 本文档用于 ant xjc 任务 -

According to this documentation for the ant xjc task -

要同时指定多个外部绑定文件,请使用嵌套元素,其语法与文件集相同."

"To specify more than one external binding file at the same time, use a nested element, which has the same syntax as fileset."

在 gradle 中它看起来像这样:

In gradle it would look like this:

 binding(dir:'src/main/schema'){
    include(name:'A.xjb')
    include(name:'B.xjb')
 }

我认为这也行:

binding(dir:'src/main/schema', includes:'A.xjb,B.xjb')