Skip to content
highsource edited this page Oct 12, 2014 · 23 revisions

JAXB2 Maven Plugin

Welcome to the maven-jaxb2-plugin wiki!

These pages document the maven-jaxb2-plugin (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin).

If you are interested in the Codehaus JAXB2 Maven Plugin (org.codehaus.mojo:jaxb2-maven-plugin), please follow the following link.

Quick start

  • Put your schemas (*.xsd) and bindings (*.xjb) into the src/main/resources folder.
  • Add the plugin to your build:
<build>
	<plugins>
		<plugin>
			<groupId>org.jvnet.jaxb2.maven2</groupId>
			<artifactId>maven-jaxb2-plugin</artifactId>
			<version>...</version>
			<executions>
				<execution>
					<goals>
						<goal>generate</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
		<!-- ... -->
	</plugins>
</build>
  • Configure your maven-compiler-plugin to use at least Java 1.5 source and target versions.

See the [[basic project sample|Sample Basic Project].

Clone this wiki locally