在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):stianh/gradle-jaxb-plugin开源软件地址(OpenSource Url):https://github.com/stianh/gradle-jaxb-plugin开源编程语言(OpenSource Language):Groovy 80.7%开源软件介绍(OpenSource Introduction):jacobono's instead.This plugin is not maintained anymore; look atGradle JAXB pluginThis is a Gradle plugin for generating JAXB classes with the xjc compiler from the given schemas. It also supports catalog and episode files for separate compilation. Usage
The java package for the generated code is extracted from the instruction jaxb:package inside the schema files. For the schema includes and the output directory sensible defaults are used:
Not many configuration options exists at the moment. You can configure
For a quite advanced example, consider a project having 2 schemas (
This will create 2 directories for the generated code, The source directory for Finally the compiled output from the Separate compilationTo be able to reference external schemas without specifying the location directly, you should put a
It should contain the link between the namespace or schema location and the actual schema file. More info in the unofficial JAXB guide. Here is a couple examples:
The built in catalog resolver in xjc resolves the path to the schema relative to the catalog.cat file. This does not work very well when doing separate compilation where these files are in different projects. Therefore the plugin enables lookup of schemas through the classpath using a resolver modeled after the one in the Maven JAXB plugin:
This will lookup If you have several schemas, you could put
in your catalog file. To simplify this, use
and it will resolve all references below Every project that applies this plugin will get an episode file generated under Further explanation of this can be found at the [inaugural source in Kohsuke Kawaguchi's blog] (http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html). Known issues and limitations
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论