Skip to content
highsource edited this page Oct 11, 2014 · 4 revisions
  1. Put your schemas (*.xsd) and bindings (*.xjb) into the src/main/resources folder.

  2. 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>
  1. Reconfigure the compiler plugin to 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>

See the [Sample projects] for more examples.

Clone this wiki locally