Dan Kolar wrote:
> Hi,
>
> as I've noticed, you are developer, somehow responsible for xjc
> task.Because I can't find the answer anywhere else, I turned on you;-)
> I have a project using xjc and jaxb2.0 in netbeans 5.5. It parse .xsd
> schema and create appropriate jave classes via xjc, and then use them to
> marshall data to xml from some database input.
> But I face a serious issue (at least for me) that I can't force xjc to
> creates these classes from .xsd, anytime I build the project. Usually it
> ends with "files are up to date
> ", even if output directory for these classes doesn't exist. I tried to
> change .xsd to let it recognize the difference, but this sometimes
> works, sometimes it doesn't and I have no idea, how to make it
> regularly. I tried removeOldOutput, but this has its drawback and
> doesn't work either.
> I just want xjc to do ONE thing at all: creates these java classes from
> .xsds in specified place every time I build the project and hence invoke
> the xjc task.
> Is that possible??
That's how XJC works by default --- compiles a schema every time it's
invoked. It then has an additional feature to perform up-to-date checks
on files to avoid unnecessary compilations.
I'm not sure exactly how you are invoking XJC, but you have to find that
out and tell it not to do an up-to-date check.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com