Last updated October 19, 2014 22:31, by lexi
Feedicon  

Fork me on GitHub

JAXB2 Maven Plugin


The project was moved to GitHub, please visit the following link:

https://github.com/highsource/maven-jaxb2-plugin


Welcome to the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin, the most advanced and feature-full Maven plugin for XML Schema compilation.

This Maven plugin wraps and enhances the JAXB Schema Compiler (XJC) and allows compiling XML Schemas (as well as WSDL, DTDs, RELAX NG) into Java classes in Maven builds.

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

Quickstart

  1. Put your schemas (*.xsd) and bindings (*.xjb) into the src/main/resources folder.

  2. Add the plugin to your pom.xml:

    <project ...>
    	...
    	<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>
    	...
    </project>

See the basic sample project for example.

Project Homepage

The project is now hosted on GitHub, please visit the following link:

https://github.com/highsource/maven-jaxb2-plugin

Documentation

Please refer to the project Wiki on GitHub for full documentation.