users@jaxb.java.net

Re: How to use CopyBuilder?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sat, 11 Oct 2008 14:55:30 +0200

Hi.

> Now my understanding is that jaxb2_commons will build several JARs, and one
> is runtime.jar that include these two classes and another is basic.jar that
> is required at build time for XJC to make the generated classes to implement
> the Copyable interface.
>
> These JARs are not related to the other plugins listed on the page, such as
> fluent-api plugin, commons-lang plugin, etc.
>
> Is this correct?

Yes.

Let me put it this way. jaxb2_commons is a collection of jaxb2 plugins
developed by independent developers. Each plugin has its dependencies
- compile-time and runtime. How these dependencies are managed differs
from plugin to plugin, there is no uniformal approach.

I am the author of the "basic" plugin package and the "annotate"
plugin. The "basic" plugin package contains among others the
-Xcopyable plugin we've discussed here above. This plugin has some
compile-time dependencies (see runtime and tools modules) as well as
runtime dependencies (runtime module).

Bringing all of this down to JAR files isn't that easy, there may be
transitive dependencies and so on. My developments are based on Maven2
which manages the dependencies very nice. If you're building with Ant,
you may need to figure out which JAR do you need to generate, compile
and run the code. Concerning the basic plugins, the easiest way is to
take a look at the basic ant sample:

http://download.java.net/maven/2/org/jvnet/jaxb2_commons/samples-basic-ant/0.4.1/samples-basic-ant-0.4.1-src.zip

Bye.
/lexi