JAXB Ant 任务 - 从哪里获取 JAR?
有许多来源解释了 JAXB Ant 任务。例如,Oracle 本身: http:// /download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/1.6/jaxb/ant.html。 然而,显然,没有任何来源似乎提供 JAXB 库,特别是jaxb-xjc.jar,或者至少给出了下载位置的提示。
我的JDK 1.6.0_24的XJC JABX编译器的版本是2.1.10。 JDK中似乎没有提供任何JAXB库。
我尝试了 jaxb-builder Eclipse 插件 (http://sourceforge. net/projects/jaxb-builder),但我一直遇到版本冲突。
我在这里错过了什么吗?有什么线索可以让我获得 JABX 库的正确 v2.1.10 版本,尤其是 Ant 任务吗?
非常感谢您的评论!
There is a number of sources, explaining the JAXB Ant Task. For example, Oracle itself: http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/1.6/jaxb/ant.html.
Apparently however, none of the sources seem to provide the JAXB libraries, particularly jaxb-xjc.jar, or at least give a hint for where to download it.
The XJC JABX compiler of my JDK 1.6.0_24 is of version 2.1.10. There doesn't seem to be any JAXB library provided in the JDK.
I tried out things like the jaxb-builder Eclipse Plugin (http://sourceforge.net/projects/jaxb-builder), but i keep running into version conflicts.
Am i missing something out here? Any clues where i can obtain a proper v2.1.10 release of the JABX libraries, especially the Ant Task?
Thanks a lot for your comments!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您提到的链接适用于 JAXB 的旧版本 - 忽略它,它不相关。
Java6 确实附带了 JAXB 2.1,但(据我所知)没有附带任何适用于 XJC 的 Ant 任务。如果您想使用 JDK 附带的 XJC,则需要使用
xjc.exe
命令行实用程序(当然,您可以从 Ant 使用) 。或者,从 http://jaxb.java.net/ 获取 JAXB 参考实现,它确实有一个 Ant任务,或者使用其他 JAXB 实现,例如 MOXy,它应该具有类似的工具。
The link you mention is for an ancient version of JAXB - ignore it, it's not relevant.
Java6 does come with JAXB 2.1, but doesn't (as far as I'm aware) come with any Ant tasks for XJC. If you want to use the XJC that comes with the JDK, you need to use the
xjc.exe
command-line utility (which of course, you can use from Ant).Alternatively, get the JAXB reference implementation from http://jaxb.java.net/, which does have an Ant task, or use another JAXB implementation such as MOXy, which should have comparable tools.
我使用 www.findjar.com
对于 jaxb-xjc,它返回
http://www .findjar.com/jar/com.sun.xml.bind/jars/jaxb-xjc-2.0.1.jar.html
I use www.findjar.com
For jaxb-xjc, it returns
http://www.findjar.com/jar/com.sun.xml.bind/jars/jaxb-xjc-2.0.1.jar.html