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

version of jaxb-xjc #27

Open
kunlinyu opened this issue Feb 1, 2021 · 5 comments
Open

version of jaxb-xjc #27

kunlinyu opened this issue Feb 1, 2021 · 5 comments

Comments

@kunlinyu
Copy link

kunlinyu commented Feb 1, 2021

could you please upgrade:
jaxb-xjc:3.0.0-M4
to:
jaxb-xjc:3.0.0
?
I think the jaxb-xjc:3.0.0 is more official than 3.0.0-M4. And it contain some feature I need.

@kunlinyu
Copy link
Author

kunlinyu commented Feb 1, 2021

"xjc30CompileOnly"("com.sun.xml.bind:jaxb-xjc:3.0.0-M4")

And It is not configurable.

@mdiskin
Copy link

mdiskin commented Jan 2, 2023

Attempted and failed using the xjcTool

xjcTool 'com.sun.xml.bind:jaxb-xjc:4.0.1'

Caused by: java.lang.IllegalStateException: Cannot handle XJC version: 4.0
at org.unbrokendome.gradle.plugins.xjc.XjcGenerate.generate(XjcGenerate.kt:199)

@dlmiles
Copy link

dlmiles commented Mar 7, 2023

At this time (version 2.0.0), I can generate and compile JAXB for newer versions with:

dependencies {
    xjcTool 'com.sun.xml.bind:jaxb-xjc:3.0.2'
    xjcTool 'com.sun.xml.bind:jaxb-impl:3.0.2'  // documentation isn't so clear on needing this too
    implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'
}

Unfortunately you can not do the same for v4 due to a coded version block, which I'll attempt to create a PR to remove.

Use gradle with --info for additional information to confirm versions in use.

The documentation indicates when specifying xjcTool the use of xjc.xjcVersion is not needed. This seems to be what I have seen as it will use the default latest default -target version for the jaxb-xjc and jaxb-impl being used to generate.

The documentation does indicate that when something is present in xjcTool the plugin doesn't inject its own versions
https://unbroken-dome.github.io/projects/gradle-xjc-plugin/#_setting_the_xjc_tool_classpath_explicitly.

It maybe good to spell out this somewhere in documentation, since that is probably a common requirement as time moves on to lower maintenance burden.

HTH

@dlmiles
Copy link

dlmiles commented Mar 25, 2023

All the matters reported here should be addressed in PR #47 (XJC tool version compatibility with 3.x and 4.x in the jarkarta era)

@lynxSven
Copy link

lynxSven commented Apr 5, 2023

I have migrated from this repository to writing my own jaxb code how it is described in this old blog post --> https://roytuts.com/generating-jaxb-classes-from-xsd-using-gradle/

I have full controll over the jaxb version I am using and I am not depending on this project.
It feels like this repository is no longer maintened. (last commit 3 years ago)

The solution described in the tutorial is simple and works with spring boot 3 and java 17.

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

4 participants