Jonathan Johnson wrote:
> Should I be using the following XJC2Task method to ensure it will determine
> if the generation is necessary?
>
> XJC2Task.addConfiguredDepends(dependencies);
> XJC2Task.addConfiguredProduces(products);
Yes, if possible, you should consider filling them, as that allows XJC
to skip unnecessary compilation, which is crucial, IMO.
> I was thinking of just adding all the schemas and binding files to the
> addConfiguredDepends
> and adding the *.java in the generated package directory to
> addConfiguredProduces
Yes, that should do. You might also add "pom.xml" in the depends list,
so that if people change pom.xml it will trigger recompilation.
> Or is there a better way? We could do the calculation in the maven plugin,
> but thought it better to delegate to the existing code in XJC2Task.
Ideally XJC should compute all such dependencies by itself. Ideally. For
now, please fill in addConfiguredDepends and addConfiguredProduces.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com