I am using JAXB on a project. the attraction of JAXB is that it is bundled with the JDK, I have been to use xjc.exe on the command line to generate ...
Is there a way to pass the option -mark-generated, which is applicable to xjc.bat:
%JAXB_HOME%\bin\xjc.bat -mark-generated c:\TEMP\my.xsd
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask"> <classpath refid="classpath" /> </taskdef> <xjc schema="my.xsd" destdir="src" package="gen.example"> ...
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, ...
we are using Jaxb with different schema files that include some common parts. To build this we are using the Ant XJCTask from the JAXB distribution:
<xjc classpath="bin" removeOldOutput="yes" schema="main-schema.xsd" target="src" extension="true"> ...