-
Notifications
You must be signed in to change notification settings - Fork 99
JAXB Tools Migration Guide
Laurent Schoelens edited this page Aug 6, 2024
·
16 revisions
This migration guide will help you migrate through major version of JAXB Tools
If you're coming from phax/maven-jaxb2-plugin :
- you can follow the following migration section on how to get from
com.helger.maven:jaxbXX-maven-plugin
to our's.
Starting from v2 of jaxb-tools, the following breaking changes occurs :
- JDK8 Baseline : minimal support of jdk is JDK8; code is tested against JDK8 / JDK11 / JDK17
- Drop of v2.0 / v2.1 / v2.2 plugins : older version of JAXB (prior to 2.3) are no longer supported
- Artifact renaming / package changes : in order to provide a full set of tools, group and artifacts have been reorganized.
Artifact | Older coordinates | New coordinates |
maven-plugin |
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.15.x</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>2.0.14</version> |
jaxb2-basics |
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.13.x</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>2.0.14</version> |
jaxb2-basics-runtime |
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>0.13.x</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>2.0.14</version> |
annox |
<groupId>org.jvnet.annox</groupId>
<artifactId>annox</artifactId>
<version>1.0.2</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>annox</artifactId>
<version>2.0.14</version> |
jaxb2-annotate |
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-annotate</artifactId>
<version>1.1.0</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-basics-annotate</artifactId>
<version>2.0.14</version> |
hyperjaxb3 |
<groupId>org.jvnet.hyperjaxb3</groupId>
<artifactId>hyperjaxb3-ejb-plugin</artifactId>
<version>0.6.x</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>hyperjaxb3-ejb-plugin</artifactId>
<version>2.0.14</version> |
- New plugins in
jaxb2-basics
starting from v2.0.4 from previous repository (in order to make them jakarta-compatible in v3)-
Commons Lang Plugin - generates the
toString()
,hashCode()
andequals()
methods using Apache commons-lang3. Will come in remplacement of previousorg.jvnet.jaxb2_commons:jaxb2-commons-lang:2.4
-
Default Value Plugin - modifies the JAXB code model to set default values to the schema default attribute. Will come in remplacement of previous
org.jvnet.jaxb2_commons:jaxb2-default-value:1.1
-
Fluent API Plugin - support a fluent api in addition to the default (JavaBean) setter methods. Will come in remplacement of previous
org.jvnet.jaxb2_commons:jaxb2-fluent-api:3.0
-
Namespace Prefix Plugin - adds
javax.xml.bind.annotation.XmlNs
annotations topackage-info.java
files. Will come in remplacement of previousorg.jvnet.jaxb2_commons:jaxb2-namespace-prefix:1.1
-
Value Constructor Plugin - generates another constructor, taking an argument for each field in the class and initialises the field with the argument value. Will come in remplacement of previous
org.jvnet.jaxb2_commons:jaxb2-value-constructor:3.0
-
Commons Lang Plugin - generates the
Starting from v3 of jaxb-tools, the following breaking changes occurs :
- JakartaEE9 support : this version supports v3 of JAXB-API and Runtime (major change is
javax.*
tojakarta.*
package change) - Hyperjaxb3 : this version supports JPA3
- Artifact renaming : in order to drop references to JAXB2, and avoid classes collision, some artifacts have been renamed.
Artifact | Older coordinates | New coordinates |
jaxb2-basics |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>2.0.9</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugins</artifactId>
<version>3.0.0</version> |
jaxb2-basics-runtime |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>2.0.9</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugins-runtime</artifactId>
<version>3.0.0</version> |
jaxb2-basics-tools |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb2-basics-tools</artifactId>
<version>2.0.9</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugins-tools</artifactId>
<version>3.0.0</version> |
jaxb2-annotate |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-basics-annotate</artifactId>
<version>2.0.9</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugin-annotate</artifactId>
<version>3.0.0</version> |
- Package changes : in order to drop references to JAXB2, and avoid classes collision, some packages have been renamed.
-
org.jvnet.jaxb2_commons
(and subpackages) has been renamed toorg.jvnet.jaxb
-
- Namespaces change : in order to drop references to JAXB2, and to adopt more modern namespace, some namespaces have been renamed.
-
http://jaxb2-commons.dev.java.net/basic/
and subnamespaces were renamed tourn:jaxb.jvnet.org:plugin:
. Previous namespaces will still work but will be dropped in future release. You can use the following changes to adapt your code.-
http://jaxb2-commons.dev.java.net/basic/equals
has been renamed tourn:jaxb.jvnet.org:plugin:equals
-
http://jaxb2-commons.dev.java.net/basic/inheritance
has been renamed tourn:jaxb.jvnet.org:plugin:inheritance
-
-
http://annox.dev.java.net
was renamed tourn:jaxb.jvnet.org:annox
with partial backward support -
http://hyperjaxb3.jvnet.org
was renamed tourn:hyperjaxb3.jvnet.org
with no backward support -
http://hyperjaxb3.jvnet.org/ejb/schemas/customizations
was renamed tourn:hyperjaxb3.jvnet.org:ejb:schemas:customizations
with no backward support
-
Starting from v4 of jaxb-tools, the following breaking changes occurs :
- JakartaEE10 support : this version supports v4 of JAXB-API and Runtime
- Hyperjaxb3 : this version supports JPA3.1 (JakartaEE10)
- JDK11 baseline : since JakartaEE10 has JDK11 baseline, this version minimal support of jdk will be JDK11; code is tested against JDK11 / JDK17 / JDK21
If you're reading this, it's that you consider moving from phax/maven-jaxb2-plugin
to highsource/jaxb-tools
.
Here is the relation between phax's artifacts and ours :
Artifact | Phax's coordinates | Our's coordinates |
V2.3 plugin |
<groupId>com.helger.maven</groupId>
<artifactId>jaxb23-maven-plugin</artifactId>
<version>0.16.1</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>2.0.9</version> |
V3.0 plugin |
<groupId>com.helger.maven</groupId>
<artifactId>jaxb30-maven-plugin</artifactId>
<version>0.16.1</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>3.0.1</version> |
V4.0 plugin |
<groupId>com.helger.maven</groupId>
<artifactId>jaxb40-maven-plugin</artifactId>
<version>0.16.1</version> |
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>4.0.0</version> |
V2.2 plugin |
<groupId>com.helger.maven</groupId>
<artifactId>jaxb22-maven-plugin</artifactId>
<version>0.16.1</version> |
No version available here. |
- Home
- Migration guide
-
JAXB Maven Plugin
- Quick Start
-
User Guide
- Basic Usage
- Specifying What To Compile
- Referencing Resources in Maven Artifacts
- Using Catalogs
- Using Episodes
- Modular Schema Compilation
- Controlling the Output
- Using JAXB Plugins
- Using a Specific JAXB Version
- Configuring Extension, Validation and XML Security
- IDE Integration
- Miscellaneous
- Configuring Proxies
- Maven Documentation
- Configuration Cheat Sheet
- Common Pitfalls and Problems
-
JAXB2 Basics Plugins
- Using JAXB2 Basics Plugins
- JSR-305 Support
-
JAXB2 Basics Plugins List
- SimpleEquals Plugin
- SimpleHashCode Plugin
- Equals Plugin
- HashCode Plugin
- ToString Plugin
- Copyable Plugin
- Mergeable Plugin
- Inheritance Plugin
- AutoInheritance Plugin
- Wildcard Plugin
- Setters Plugin
- Simplify Plugin
- EnumValue Plugin
- JAXBIndex Plugin
- FixJAXB1058 Plugin
- Commons Lang Plugin
- Default Value Plugin
- Fluent API Plugin
- Namespace Prefix Plugin
- Value Constructor Plugin
- Boolean Getter Plugin
- CamelCase Plugin
- XML ElementWrapper Plugin
- Parent Pointer Plugin
- Property Listener Injector Plugin
- Annox
- JAXB Annotate Plugin
-
HyperJAXB3
- Build System Support
- Customization Guide
- Databases
- Development guide
- Extension guide
- FAQ
- IDE Support
- Java Persistence
- JAXB
- JDK Support
- Project Templates
-
Reference
- Adding vendor-specific annotations
- Features
- Integrating Hyperjaxb3 in builds
- Introduction
- Making schema-derived classes ready for JPA
- Adding required properties
- Applying workarounds for JAXB vs. JPA conflicts
- Enforcing top-level classes
- Generating equals and hashCode methods
- Generating ORM metadata
- Generating persistence unit descriptor
- JPA 2 Support
- Making classes serializable
- Testing generated mappings
- Reference - single page
- Related Projects
- Sample projects
- Solutions
- Target Scenarios
- Test Projects
- Tutorials
- Best Practices
- FAQ
- Sample Projects
- Support
- License
- Distribution