openrewrite / openrewrite/rewrite-migrate-java
Add migration of maven-jaxb2-plugin in JakartaEE9 recipe
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 156
- Forks
- 130
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 21
Description
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>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JakartaEE9 recipe linked in the issue and inspect how its existing migration recipes are organized. Use the two Maven plugin examples as the expected transformation, including the namespace-prefix dependency version, and verify that the recipe handles the shown configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100