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

Updating to jakarta.xml.bind >4 doesn't generate anymore the swaggers #889

Open
ddbdev opened this issue Mar 14, 2023 · 10 comments
Open

Updating to jakarta.xml.bind >4 doesn't generate anymore the swaggers #889

ddbdev opened this issue Mar 14, 2023 · 10 comments

Comments

@ddbdev
Copy link

ddbdev commented Mar 14, 2023

Hi everyone, I'm updating some dependency version in a project and I'm occurring in the following problem.

Library Version (FROM/TO)
jakarta.xml.bind-api 2.3.3 - 4.0.0
org.eclipse.persistence.moxy 2.7.11 - 4.0.0

The updating of those dependencies version, as mentioned above, will not generate the swagger json's.

I'll paste below the error.

[ERROR] Failed to execute goal com.github.kongchen:swagger-maven-plugin:3.1.8:generate (generate_swagger_specification) on project api-event-v1: Execution generate_swagger_specification of goal com.github.kongchen:swagger-maven-plugin:3.1.8:generate failed: A required class was missing while executing com.github.kongchen:swagger-maven-plugin:3.1.8:generate: javax/xml/bind/annotation/XmlRootElement

Since we updated the version the javax/xml/bind/annotation/XmlRootElement is not found anymore but I think the plugin is still using those.
Will there be an update of the plugin to have these new classes?

Thanks in advance! :)

@vitomanu96
Copy link

Same issue here!

@ddbdev
Copy link
Author

ddbdev commented Mar 20, 2023

@vitomanu96 I think that this project is abandoned, last commit is from 3 years ago, maybe it's time to migrate to something else

@sergey-morenets
Copy link

@vitomanu96 I think that this project is abandoned, last commit is from 3 years ago, maybe it's time to migrate to something else

Hi, do you know any replacements of this plugin ?

@ddbdev
Copy link
Author

ddbdev commented Mar 22, 2023

@vitomanu96 I think that this project is abandoned, last commit is from 3 years ago, maybe it's time to migrate to something else

Hi, do you know any replacements of this plugin ?

I'm looking forward for something to replace it, any suggestion would be appreciated! 👍

@ddbdev
Copy link
Author

ddbdev commented May 2, 2023

up

@funfried
Copy link

@ddbdev I think you have two options, either use openapi-maven-plugin which seems to be not so mature/stable yet or springdoc but there you have to startup your spring boot server during build time and stop it again which is my problem right now, I can start the server but it seems no to fully stop afterwards (the spring boot process is still there but from the logs it looks like it stopped)
So right now there are alternatives but none of them seem to be as good as this plugin was.

@ddbdev
Copy link
Author

ddbdev commented Jul 27, 2023

@funfried I wish I could use spring but it's a business project, hence I cannot change it, probably will adapt to OpenAPI soon

@funfried
Copy link

@ddbdev Ah ok, so you have a JEE project? Then you should have a look into the OpenAPI Maven plugin: https://github.com/openapi-tools/swagger-maven-plugin
It's quite old, but it should work for JEE projects and OpenAPI 3.x

@ddbdev
Copy link
Author

ddbdev commented Jul 31, 2023

@funfried , appreciate it! I'l take a look asap, thanks a lot! :)

@traviscollins
Copy link

I forked this repo at 3.1.9-SNAPSHOT, replaced all the javax.ws.rs references with jakarta.ws.rs, and published a new drop-in artifact at https://github.com/big-armor/swagger-2-jakarta-maven-plugin

You should be able to replace this plugin with...

<groupId>com.bigarmor</groupId>
<artifactId>swagger-2-jakarta-maven-plugin</artifactId>
<version>3.1.9</version>

Check the latest version here... https://central.sonatype.com/artifact/com.bigarmor/swagger-2-jakarta-maven-plugin

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

No branches or pull requests

5 participants