Quick Start - highsource/jaxb-tools GitHub Wiki
- Put your schemas (
*.xsd
) and bindings (*.xjb
) into thesrc/main/resources
folder. - Add the plugin to your build:
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
- Use at least Java 1.5 source and target versions:
<build>
<plugins>
...
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
Further resources:
- See the sample of a basic project for a simple project to start with
- See the User Guide for full usage information
- See the Configuration Cheat Sheet for a short reference of the configuration options
- See the Sample Projects for pre-configured ready-to-build project examples