Add migration of maven-jaxb2-plugin in JakartaEE9 recipe
org.jvnet.jaxb2.maven2:maven-jaxb2-plugin is a plugin used to generate Java code. It is notably generating a bunch of javax.xml.* code.
To generate code with jakarta namespace, we currently need to migrate to another plugin
com.helger.maven:jaxb40-maven-plugin because the original one seems to no more be active enough, the PR to migrate is still pending.
In case org.jvnet.jaxb2_commons:jaxb2-namespace-prefix is used in combination of it, this one needs to be updated to version 2.0
I think it can be a nice addition to JakartaEE9 recipe.
Example of a typical use case:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.15.2</version>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-namespace-prefix</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.helger.maven</groupId>
<artifactId>jaxb40-maven-plugin</artifactId>
<version>0.16.1</version>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-namespace-prefix</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</plugin>
In case *.ejb files are used for the generation, to avoid an exception in log during code generation with this Maven plugin, the following changes are also needed in *.ejb files:
- namespace from
http://java.sun.com/xml/ns/jaxbtohttps://jakarta.ee/xml/ns/jaxb - version from
1.0or2.0to3.0
official versions and a migration guide: https://github.com/highsource/jaxb-tools/wiki/JAXB-Tools-Migration-Guide