phax / maven-jaxb2-plugin

The most advanced JAXB 2.x/3.0/4.0 Maven Plugin for XML Schema compilation.
BSD 2-Clause "Simplified" License
7 stars 2 forks source link

JAXB Maven Plugin (jvnet) - DEPRECATED FORK

Use https://github.com/highsource/jaxb-tools instead

Instead of

        <groupId>com.helger.maven</groupId>
        <artifactId>jaxb40-maven-plugin</artifactId>
        <version>0.16.1</version>

use

        <groupId>org.jvnet.jaxb</groupId>
        <artifactId>jaxb-maven-plugin</artifactId>
        <version>4.0.0</version>

and you should be good to go (worked for my repos)

old readme

CI Maven Central License

Provenance

This is a fork of the JAXB2 Maven Plugin from highsource/maven-jaxb2-plugin, and we suspect that was itself a fork of the javaee/metro-maven-jaxb2-plugin which originated from java.net.

The plugin from which this was forked has been commonly known as the: "jvnet JAXB2 Plugin".

The purpose of our fork is to add support for JAXB 3 and JAXB 4.

Notes on Licensing

The forks from which this project came claim that it is licensed under a BSD-2 Clause license. However, there is also evidence of Apache 2.0 licensed code within the project. The code in the original java.net project appears instead to have been dual-licensed as CDDL 1.1 and GPL 2 + Classpath Exception license.

Whilst we believe it is likely that this code is Open Source and resides under a mix of the above discussed licenses, the exact licensing of the code remains murky at best.

Introduction

Welcome to the JAXB Maven 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 Mojohaus JAXB2 Maven Plugin (org.codehaus.mojo:jaxb2-maven-plugin), please follow this link to the corresponding website.

Quick start

For JAXB 4:

<project ...>
  ...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>jaxb40-maven-plugin</artifactId>
        <version>0.16.1</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For JAXB 3:

Use: <artifactId>jaxb30-maven-plugin</artifactId> instead.

For JAXB 2:

Use: <artifactId>jaxb2-maven-plugin</artifactId> instead.

JAXB Versions

If you need a specific JAXB version, you can explicitly use one of the following variants:

Java versions

Supported Java versions are 1.8 and onwards.

For build time it requires Java 11, but for execution time version 1.8 is sufficient.

Documentation

Please refer to the Wiki for the full documentation.

Support

Whilst this fork is an Open Source project, developing this plugin is not our key occupation. We are happy for users to open issues, however we make no claims that we will investigate or resolve them.

We will gladly accept and merge Pull-Requests that address issues, but they must be accompanied by tests and be compatible with Java 8+.

The original author of the plugin may also be able to offer you some support, see Support.


My personal Coding Styleguide | It is appreciated if you star the GitHub project if you like it.