如何在Maven-3下使用MOXy从XSD生成Java? [英] How to generate Java from an XSD using MOXy under Maven-3?
问题描述
在Maven-3下使用MOXy从XSD生成Java的最简单/最好的方法是什么?
参考JAXB接口有一个很好的Maven插件,但它似乎不支持MOXy。
What's the easiest/best way to generate Java from an XSD using MOXy under Maven-3? The reference JAXB interface has a nice Maven plugin, but it doesn't appear to support MOXy.
有没有人有什么具体的东西可以提供? (我知道我可以编写ant脚本或插件,或者......)
Does anyone have anything concrete to offer? (I know I can write ant-script, or a plugin, or ...)
推荐答案
EclipseLink MOXy ,尚未提供Maven插件来运行XML模式到Java编译器。我已输入以下增强请求以跟踪此功能:
EclipseLink MOXy, does not yet offer a Maven plugin to run the XML schema to Java compiler. I have entered the following enhancement request to track this functionality:
- https://bugs.eclipse.org/346486
MOXy利用XJC组件从参考实现中,您可以访问该Maven插件并添加然后添加 jaxb.properties
文件,指定MOXy作为JAXB提供者:
MOXy leverages the XJC component from the reference implementation, so you could access that Maven plug-in and add then add the jaxb.properties
file specifying MOXy as the JAXB provider:
- http://jaxb.java .net / jaxb-maven2-plugin /
- http://bdoughan.blogspot.com/2011/05/specifying-eclipselink-moxy-as-your.html
- http://jaxb.java.net/jaxb-maven2-plugin/
- http://bdoughan.blogspot.com/2011/05/specifying-eclipselink-moxy-as-your.html
这篇关于如何在Maven-3下使用MOXy从XSD生成Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!