Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Latest commit

 

History

History
138 lines (99 loc) · 5.62 KB

README.md

File metadata and controls

138 lines (99 loc) · 5.62 KB

JAXB Maven Plugin (jvnet) - DEPRECATED FORK

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

  • Supports JAXB 2.2, JAXB 2.3, JAXB 3 and JAXB 4.

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

  • Put your schemas (*.xsd) and bindings (*.xjb) into the src/main/resources folder.
  • Add the plugin to your pom.xml:

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:

  • com.helger.maven:jaxb40-maven-plugin - JAXB 4.0.
  • com.helger.maven:jaxb30-maven-plugin - JAXB 3.0.
  • com.helger.maven:jaxb23-maven-plugin - JAXB 2.3.
  • com.helger.maven:jaxb22-maven-plugin - JAXB 2.2.
  • com.helger.maven:jaxb2-maven-plugin - "latest 2.x version"; at the moment this is same as com.helger.maven:jaxb23-maven-plugin.

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.

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.