logo Maven JAXB 2.x Plugin

Maven-2 plugin that uses JAXB 2.x XJC compiler to generate java sources from schemas.

homepage: github.com/highsource/maven-jaxb2-plugin
fresh index:
last release: 4 years ago, first release: 1 decade ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
jaxb2:generate (phase: generate-sources)

JAXB 2.x Mojo.

jaxb2:help

Display help information on maven-jaxb2-plugin. Call mvn jaxb2:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

Often used code snippets:

<plugin>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <version>0.7.5</version>
  <configuration>
    <extension>true</extension>
    <args>
      <arg>-Xfluent-api</arg>
    </args>
    <schemaDirectory>src/main/resources</schemaDirectory>
    <generatePackage>org.xwiki.annotation.rest.model.jaxb</generatePackage>
    <verbose>true</verbose>
    <removeOldOutput>false</removeOldOutput>
    <plugins>
      <plugin>
        <groupId>org.jvnet.jaxb2_commons</groupId>
        <artifactId>jaxb2-fluent-api</artifactId>
        <version>3.0</version>
      </plugin>
    </plugins>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>generate</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <version>0.7.5</version>
  <configuration>
    <extension>true</extension>
    <args>
      <arg>-Xfluent-api</arg>
    </args>
    <schemaDirectory>src/main/resources</schemaDirectory>
    <generatePackage>org.xwiki.rest.model.jaxb</generatePackage>
    <verbose>true</verbose>
    <removeOldOutput>false</removeOldOutput>
    <plugins>
      <plugin>
        <groupId>org.jvnet.jaxb2_commons</groupId>
        <artifactId>jaxb2-fluent-api</artifactId>
        <version>3.0</version>
      </plugin>
    </plugins>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>generate</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <configuration>
    <generatePackage>org.xwiki.extension.repository.xwiki.model.jaxb</generatePackage>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>generate</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>generate</goal>
      </goals>
      <configuration>
        <args>
          <arg>-Xsetters</arg>
          <arg>-Xfluent-api</arg>
          <arg>-Xgenerated</arg>
          <arg>-Xannotate</arg>
          <arg>-XjsonProperty</arg>
        </args>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <configuration>
    <generatePackage>org.xwiki.rest.model.jaxb</generatePackage>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>generate</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.