Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAXB Ant Task - Where to get JARs?

Tags:

java

jaxb

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!

like image 209
Janos Avatar asked May 11 '11 17:05

Janos


Video Answer


1 Answers

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.

like image 174
skaffman Avatar answered Sep 19 '22 00:09

skaffman