Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven jaxb3 plugin #255

Closed

Conversation

laurentschoelens
Copy link
Collaborator

Pull request to handle the v3 (v4) migration process that is still not available.
I've droppped support of plugin 2.0 / 2.1 / 2.2
Change the groupId / artifactId and package to the new naming convention as suggested by the v3 roadmap
I've added new artifact / maven-plugin for jaxb3 and jaxb4 support (jaxb3 still available for java8, jaxb4 only for java11 and upper).
Tested build against jdk11
Build success with profile -Pall activated

Laurent SCHOELENS added 2 commits February 9, 2023 13:07
@Daemorinumi
Copy link

great feature, need it

@laurentschoelens
Copy link
Collaborator Author

@mattrpav could you tell me when this PR will be merged, or do you want to do some refactoring on it before ?

@wojciechzych
Copy link

Hi, any news when this PR will be merged?

@laurentschoelens
Copy link
Collaborator Author

Hi, any news when this PR will be merged?

@mattrpav Up?

@razum90
Copy link

razum90 commented May 8, 2023

Any news about this? Also waiting for it @laurentschoelens

@mattrpav
Copy link
Collaborator

mattrpav commented May 8, 2023

@laurentschoelens would you please break up the PR into separate PRs by commit?

I'm thinking start with this modernization change of upping JDK and dropping older jaxb:
f5691c2

This will help the review go faster for the full jakarta conversion.

Thanks!

@laurentschoelens
Copy link
Collaborator Author

@laurentschoelens would you please break up the PR into separate PRs by commit?

I'm thinking start with this modernization change of upping JDK and dropping older jaxb: f5691c2

This will help the review go faster for the full jakarta conversion.

Thanks!

Hi @mattrpav
I think I got the point and I'll try to provide the first PR of dropping old plugins (from 2.0 to 2.2 included)
When merged, I'll provide the jakarta migration as PR if that's what you want

@laurentschoelens
Copy link
Collaborator Author

@mattrpav : done new PR #256
Please let me know the next step so I can prepare the next PR

@mattrpav
Copy link
Collaborator

mattrpav commented May 9, 2023

@laurentschoelens I'm going to release 0.15.3 w/ the 2.0, 2.1, 2.2 and JDK 8 new minimum.

Thanks for breaking this up, it made the review much cleaner. The dropping of 2.0, 2.1 & 2.2 had over 100+ files to review.

Next, let's tackle the re-package to org.jvnet.jaxb. It may take a few days to get Sonatype OSS to allow me to publish to a new groupId. We can get that going while reviewing Jakarta changes.

Thoughts on this roadmap?

  1. 0.15.3 - remove legacy, update to JDK 8
  2. 3.99.0-SNAPSHOT - Rename packaging to org.jvnet.jaxb
  3. 4.0.0-SNAPSHOT - Update to jakarta.jaxb 4 and jakarta namespace

@laurentschoelens
Copy link
Collaborator Author

@laurentschoelens I'm going to release 0.15.3 w/ the 2.0, 2.1, 2.2 and JDK 8 new minimum.

Thanks for breaking this up, it made the review much cleaner. The dropping of 2.0, 2.1 & 2.2 had over 100+ files to review.

Next, let's tackle the re-package to org.jvnet.jaxb. It may take a few days to get Sonatype OSS to allow me to publish to a new groupId. We can get that going while reviewing Jakarta changes.

Thoughts on this roadmap?

  1. 0.15.3 - remove legacy, update to JDK 8
  2. 3.99.0-SNAPSHOT - Rename packaging to org.jvnet.jaxb
  3. 4.0.0-SNAPSHOT - Update to jakarta.jaxb 4 and jakarta namespace

Thanks for this first step and merge
I can provide the next PR for changing packaging to org.jvnet.jaxb with new groupId and artifactId maybe to be maven compilant (jaxb23-maven-plugin) ?
Do you plan to make this repo single plugin version ? Or will it keep multiple versions available ? Like having jaxb40-maven-plugin standalone or with jaxb23-maven-plugin and jaxb30-maven-plugin ?
Do you plan to skip jakarta 3 jaxb api ?

@laurentschoelens
Copy link
Collaborator Author

Based on your first reply I would do :

0.15.3 - remove legacy, update to JDK 8
2.0.0-SNAPSHOT - Rename packaging to org.jvnet.jaxb with new groupId / artifactId
3.0.0-SNAPSHOT - Jakarta 3 first plugin alongside javax 2 (jdk8 baseline)
4.0.0-SNAPSHOT - Jakarta.jaxb 4 plugin with jdk11 baseline

@mattrpav
Copy link
Collaborator

mattrpav commented May 9, 2023

@laurentschoelens

  1. Yes, let's do jaxb-maven-plugin for artifactId.

  2. I'd like to hear about the use cases for multiple versions of the plugin coming from single repo.

My current thinking (while being open to being convinced otherwise) is that JAXB has stabilized where it doesn't make sense to generate plugins with the version in the name in the artifactId. I think having the jaxb-maven-plugin and jaxb-tool version align closer to the jaxb version makes more sense and for a better developer experience (DX). Also, the plugin is super stable, so we need to be out of the 0.x.y major version naming convention.

This all seems odd and confusing:

jaxb23-maven-plugin v4.0.0 -- using jaxb 2.3.7, user needs jaxb-annotations-plugin 0.1.1
jaxb40-maven-plugin v4.0.0 -- using jaxb 4.0.0, user needs jaxb-annotations-plugin 2.1.1

I'd like to get to a point where jaxb-basics, jaxb-maven-plugin and the jaxb-plugin-plugins-plugins are all under a single repo so we'd have version alignment with jaxb-annotations-plugin, jaxb-basics, jaxb-maven-plugin and the jakarta jaxb version (ie. 4.0.0).

@laurentschoelens
Copy link
Collaborator Author

@laurentschoelens

  1. Yes, let's do jaxb-maven-plugin for artifactId.
  2. I'd like to hear about the use cases for multiple versions of the plugin coming from single repo.

My current thinking (while being open to being convinced otherwise) is that JAXB has stabilized where it doesn't make sense to generate plugins with the version in the name in the artifactId. I think having the jaxb-maven-plugin and jaxb-tool version align closer to the jaxb version makes more sense and for a better developer experience (DX). Also, the plugin is super stable, so we need to be out of the 0.x.y major version naming convention.

This all seems odd and confusing:

jaxb23-maven-plugin v4.0.0 -- using jaxb 2.3.7, user needs jaxb-annotations-plugin 0.1.1 jaxb40-maven-plugin v4.0.0 -- using jaxb 4.0.0, user needs jaxb-annotations-plugin 2.1.1

I'd like to get to a point where jaxb-basics, jaxb-maven-plugin and the jaxb-plugin-plugins-plugins are all under a single repo so we'd have version alignment with jaxb-annotations-plugin, jaxb-basics, jaxb-maven-plugin and the jakarta jaxb version (ie. 4.0.0).

Ok for having only one version of plugin in this répond. Maybe it'll be interessant at some point of having maintenance branches for older plugins for security / bug fixes.

You didn't answered about skipping jakarta.jaxb 3 which still supports jdk8, whereas jakarta.jaxb 4 supports jdk11+. I'm in favor of having a 3.x version for jakarta migration based on jakarta.jaxb 3 with jdk8 support

@mattrpav
Copy link
Collaborator

mattrpav commented May 9, 2023

@laurentschoelens ok, sounds good.

Revised roadmap:

  1. 0.15.3 - remove legacy, update to JDK 8
  2. 2.99.0-SNAPSHOT - Rename groupId, maven artifactId to org.jvnet.jaxb / jaxb-maven-plugin
  3. 3.0.0-SNAPSHOT - JDK 8 + Jakarta jaxb 3
  4. 4.0.0-SNAPSHOT - JDK 11 + Jakarta jaxb 4 and jakarta namespace

@laurentschoelens
Copy link
Collaborator Author

@laurentschoelens ok, sounds good.

Revised roadmap:

  1. 0.15.3 - remove legacy, update to JDK 8
  2. 2.99.0-SNAPSHOT - Rename groupId, maven artifactId to org.jvnet.jaxb / jaxb-maven-plugin
  3. 3.0.0-SNAPSHOT - JDK 8 + Jakarta jaxb 3
  4. 4.0.0-SNAPSHOT - JDK 11 + Jakarta jaxb 4 and jakarta namespace

I'll provide the 2.99.0 PR soon

@laurentschoelens
Copy link
Collaborator Author

I'd like to get to a point where jaxb-basics, jaxb-maven-plugin and the jaxb-plugin-plugins-plugins are all under a single repo so we'd have version alignment with jaxb-annotations-plugin, jaxb-basics, jaxb-maven-plugin and the jakarta jaxb version (ie. 4.0.0).

@mattrpav will you create a new repo for this or use this one ? Maybe the v2 should contain this change before breaking from javax to jakarta namespace.
It's additionnal work but it's almost only copy / paste code from one repo to another with groupid / artifactid changes ? Not a problem for me and find it more reasonable

@laurentschoelens
Copy link
Collaborator Author

This would lead for project structure to something like :

  • parent
    • jaxb-maven-plugin
    • jaxb-basics
    • jaxb-annotate...

@mattrpav
Copy link
Collaborator

mattrpav commented May 9, 2023

This would lead for project structure to something like :

* parent
  
  * jaxb-maven-plugin
  * jaxb-basics
  * jaxb-annotate...

Let me see if I can get a new repo created, or have this repo migrated to a new name (maven-jaxb2-plugin -> jaxb-tools or similar). I'd like to try to keep the followers and forks for historical.

@laurentschoelens
Copy link
Collaborator Author

This would lead for project structure to something like :

* parent
  
  * jaxb-maven-plugin
  * jaxb-basics
  * jaxb-annotate...

Let me see if I can get a new repo created, or have this repo migrated to a new name (maven-jaxb2-plugin -> jaxb-tools or similar). I'd like to try to keep the followers and forks for historical.

No problem, that won't prevent me for creating the next PR of naming change

@laurentschoelens
Copy link
Collaborator Author

This would lead for project structure to something like :

* parent
  
  * jaxb-maven-plugin
  * jaxb-basics
  * jaxb-annotate...

Let me see if I can get a new repo created, or have this repo migrated to a new name (maven-jaxb2-plugin -> jaxb-tools or similar). I'd like to try to keep the followers and forks for historical.

Guess if you have access to Settings, you can rename the repository like this :

image

I've tried on mine and works like a charm. Even have a redirect from older URL to newer : https://github.com/laurentschoelens/maven-jaxb2-plugin -> https://github.com/laurentschoelens/jaxb-tools

@mattrpav
Copy link
Collaborator

Guess if you have access to Settings, you can rename the repository like this :
image

Yep, renaming is straight forward, the tricky part is how to merge two repos -- and hopefully bring forks, follows and stars with it.

@laurentschoelens
Copy link
Collaborator Author

Yep, renaming is straight forward, the tricky part is how to merge two repos -- and hopefully bring forks, follows and stars with it.

Found a way to merge two repos but I guess you will lose forks / follow / stars since it's github functionnalities.
Still you can update the old repo to point to the merged location to keep track of what is done. I've seen it used on other projects when some project goes to end-of-life and initial author points that users should use the new xxx product.

@laurentschoelens
Copy link
Collaborator Author

laurentschoelens commented May 11, 2023

@mattrpav do you wait for my next PR for 2.x branch (javax.jaxb 2.3 maintenance mode with new naming) ? If so, tell me if you want me to also provide a PR of merging different repo into this one ?

@mattrpav
Copy link
Collaborator

@mattrpav do you wait for my next PR for 2.x branch (javax.jaxb 2.3 maintenance mode with new naming) ? If so, tell me if you want me to also provide a PR of merging different repo into this one ?

I think we'll end up renaming this repo, and then put a pointer from jaxb-basics. This one has more followers, stars, etc.

I'll start the release for 0.15.3, then move main to 2.x branch, cut a release, create a branch and then start main as 3.x (ready for your 3.x PR).

Please can create your PRs ASAP, so we can start reviewing. We can rebase them once the releases get going.

@laurentschoelens
Copy link
Collaborator Author

@mattrpav do you wait for my next PR for 2.x branch (javax.jaxb 2.3 maintenance mode with new naming) ? If so, tell me if you want me to also provide a PR of merging different repo into this one ?

I think we'll end up renaming this repo, and then put a pointer from jaxb-basics. This one has more followers, stars, etc.

I'll start the release for 0.15.3, then move main to 2.x branch, cut a release, create a branch and then start main as 3.x (ready for your 3.x PR).

Please can create your PRs ASAP, so we can start reviewing. We can rebase them once the releases get going.

@mattrpav : #263 created for renaming part.
Don't know how to make another PR based on future changes after this PR without including the commit.

I'll try to provide more simple PR to jaxb_basics since some work had been done to integrate missing older external plugins before being merged here into jaxb-tools.
Tell me also if you want me to try to provide a PR for merging jaxb_annotate / jaxb_basics here

@laurentschoelens
Copy link
Collaborator Author

laurentschoelens commented May 12, 2023

@mattrpav do you wait for my next PR for 2.x branch (javax.jaxb 2.3 maintenance mode with new naming) ? If so, tell me if you want me to also provide a PR of merging different repo into this one ?

I think we'll end up renaming this repo, and then put a pointer from jaxb-basics. This one has more followers, stars, etc.
I'll start the release for 0.15.3, then move main to 2.x branch, cut a release, create a branch and then start main as 3.x (ready for your 3.x PR).
Please can create your PRs ASAP, so we can start reviewing. We can rebase them once the releases get going.

@mattrpav : #263 created for renaming part. Don't know how to make another PR based on future changes after this PR without including the commit.

I'll try to provide more simple PR to jaxb_basics since some work had been done to integrate missing older external plugins before being merged here into jaxb-tools. Tell me also if you want me to try to provide a PR for merging jaxb_annotate / jaxb_basics here

See https://github.com/laurentschoelens/jaxb-tools/tree/merging for work on merging repos
Issue #264 created to list actions done to have my result

@razum90
Copy link

razum90 commented Jun 15, 2023

Hello @laurentschoelens, any ETA for this? Currently blocked with our spring boot upgrade due to this :(

@mattrpav
Copy link
Collaborator

Hi @razum90 - v2.0.2 was just released which takes the first step towards v3 and then v4 (jakarta support).

Please test the v2.0.2 Maven plugin with your project (pre-Spring 6) and confirm everything works as expected. Well be starting on v3 shortly.

Thanks

@razum90
Copy link

razum90 commented Jun 24, 2023

Hey @mattrpav and thanks for you reply. I have tested with the following, and it seems to be working for us.

<plugin>
    <groupId>org.jvnet.jaxb</groupId>
    <artifactId>jaxb-maven-plugin</artifactId>
    <version>2.0.2</version>
</plugin>

Waiting for the next version 👍

@laurentschoelens
Copy link
Collaborator Author

@razum90 and @wojciechzych and all other watching this PR :
Major refactoring has been done on this repository since this PR was created, and for myself, I'm in direct contact with Matt and have been promoted to collaborator of this repository.
We released 2.0.4 which contains many bugfix and basics too, and 2.0.5 should come very shortly

After this, jaxb3 support should come very soon and jaxb4 shortly after as the main job will be done by jaxb3 jakarta conversion.

@laurentschoelens
Copy link
Collaborator Author

laurentschoelens commented Sep 23, 2023

Hello everyone
As you can see, main branch was moved to jaxb3 support.
Almost done with final changes (changing some packages and artifacts name)
Hyperjaxb3 support is ready too for jaxb3 with jpa3 and build is OK (PR to do)

We can say that v3 plugin should be available by the end of the month.
Still, this v3 upgrade will be with limited support : jakartaee9 is "just" a version with package rename to jakarta.* from javaee8.
People will be encouraged to use v4 version (jakartaee10, jdk11 baseline) which will come shortly after.

A migration guide is present to help navigate through major versions

@laurentschoelens
Copy link
Collaborator Author

Closing this per v3 complete and released 🎉
V4 is on its way 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants