Some brief instructions for using the maven xmlbeans2 plugin
1. Include something like this in your maven.xml:
namespace declaration:
xmlns:xmlbeans="xmlbeans:maven"
where
sourcedir is a base directory for the list in sourceschema
sourceschema is a comma-delimited list of all the schemas you want to compile
xmlconfigs points to your xmlconfig.xml file
targetdir is where you want generated java source to appear
cataloglocation is the location of an entity resolver catalog to use for resolving namespace to schema locations.
The generated binary files, both .xsd and the TypeHolder class, will end up in the target/classes directory.
In addition, you can add precompiled schemas to the "schema classpath" by including them as
dependencies in project.xml with a properties tag like this:
geronimo
geronimo-naming-builder
${pom.currentVersion}
true
You will probably also want to add a dependency on the plugin to your project.xml file and the other dependencies if you use xmlbeans in unit tests:
xmlbeans
xmlbeans-maven-plugin
2.0-beta1
plugin
xmlbeans
xbean
${xmlbeans_version}
stax
stax
${stax_version}
stax
stax-api
${stax_api_version}