-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support on Java 11 #67
Comments
Hey, thanks for your answer. The project is currently built using Java 8. Unfortunately I haven't found the time to look into the compatibility with the latest java versions |
See also: https://groups.google.com/forum/?fromgroups#!topic/jooq-user/NRtyx-hdtdA |
Have you tried adding the jaxb jars explicitly to your classpath? I don't know if they work in Java 11, but they are available in a maven repo. |
@pablotdl yes that does work, if you add them to your buildscript classpath: buildscript {
repositories { jcenter() }
dependencies {
classpath "io.github.jklingsporn:vertx-jooq-generate:4.1.0"
classpath "org.glassfish.jaxb:jaxb-runtime:2.3.2"
}
} |
Hi everyone, a couple of months ago we have built Gradle plugin for code generation with vertx-jooq. Today we've tried to upgrade plugin dependencies with vertx-jooq 5.0.0 version. Probably something changed with the new release but we cannot understand what. Thanks |
This might be a bug, because I remember dealing with a similar issue. The
core jooq code generator has some mechanics to detect which annotation
should be taken, but it had some issues. Will look into it.
Aleksandar <notifications@github.com> schrieb am Di., 28. Jan. 2020, 18:59:
… Hi everyone,
a couple of months ago we have built Gradle plugin for code generation
with vertx-jooq.
We had requirements to build the library with JDK 11 or above. We add a
couple of dependencies for JAXB and annotation process and everything
worked well.
Today we've tried to upgrade plugin dependencies with vertx-jooq 5.0.0
version.
We've found that JOOQ library 3.12.3 is imported as vertx-jooq transitive
dependency and that generated classes have @generated
<https://github.com/generated> annotation with import javax.annotation as
in JDK 8 instead of javax.annotation.processing.
All our environments, IDE and CI, are configured with JDK 11 and above and
this kind of import brakes our project imports.
Probably something changed with the new release but we cannot understand
what.
Any suggestion welcome,
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67?email_source=notifications&email_token=ABQLZXQFUIU7ZVIKCWQPRD3RABXB7A5CNFSM4FM2C6W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKEJSTY#issuecomment-579377487>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQLZXWC3K4V3QM7LJFPL6DRABXB7ANCNFSM4FM2C6WQ>
.
|
Thanks @jklingsporn. I found in official JOOQ documentation a possibility to specify the version of annotation processing import. <configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.12.0.xsd">
<generator>
<generate>
<!-- Possible values for generatedAnnotationType
- DETECT_FROM_JDK
- JAVAX_ANNOTATION_GENERATED
- JAVAX_ANNOTATION_PROCESSING_GENERATED -->
<generatedAnnotation>true</generatedAnnotation>
<generatedAnnotationType>DETECT_FROM_JDK</generatedAnnotationType>
<jpaAnnotations>true</jpaAnnotations>
<jpaVersion>2.2</jpaVersion>
<validationAnnotations>true</validationAnnotations>
<springAnnotations>true</springAnnotations>
</generate>
</generator>
</configuration> I'll try to set some of these values in the XML configuration file and see what happens. |
I've tried to set specific values as gneratedAnnotationType but nothing changed. Import of @generated remains javax.annotation. I'll skip annotation generation for now but this remains a problem caused by some transitive dependencies. |
I've just checked this. For some reason that flag is overridden in the
I will provide a fix - hopefully this week. Until then, please try to subclass the generator of your choice, e.g. |
Thanks @jklingsporn.
We try to force vertx-sql client version to 3.8.5, instead of 3.8.4 that library brings as a transitive dependency, and that make generation works properly. Probably, the latest vertx versions can create some version incompatibility issues during code generation. |
I will upgrade the vertx-dependency with the next release as well and see how things are going. |
remove force of java 8 annotation
I've just pushed to https://github.com/jklingsporn/vertx-jooq/tree/release5.0.1 which contains the generated-annotation fix and bumped the vertx version to 3.8.5. |
Sure @jklingsporn. Tomorrow I'll pull 5.0.1 branch, build the project and deploy on our local nexus as a snapshot. I'll let you know. |
Hi @jklingsporn, We tried to compile it with JDK 11 and we found compilation errors in vertx-jooq-generate tests. All generated classes had javax.annotation.Generated import and that package missing in JDK 11. We dropped folder with test and after that build completed successfully. We tested with our generation Gradle plugin. With specified annotation type library generates annotation with correct import ( javax.annotation.processing ). IMO version 5.0.1 works well on JDK 11. |
Thanks for the follow-up. I will probably remove the @generated annotation
generation for the test classes to be fully compatible with jdk 11.
Aleksandar <notifications@github.com> schrieb am Fr., 31. Jan. 2020, 21:27:
… Hi @jklingsporn <https://github.com/jklingsporn>,
We tried to compile it with JDK 11 and we found compilation errors in
vertx-jooq-generate tests. All generated classes had
javax.annotation.Generated import and that package missing in JDK 11. We
dropped folder with test and after that build completed successfully.
We tested with our generation Gradle plugin. With specified annotation
type library generates annotation with correct import (
javax.annotation.processing ).
Incompatibility error regarding return type disappears.
IMO version 5.0.1 works well on JDK 11.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#67?email_source=notifications&email_token=ABQLZXWQBJVJEJ6V2AB6JNDRASCS3A5CNFSM4FM2C6W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKP43VY#issuecomment-580898263>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQLZXRFC6UJXQY2WYZZ5U3RASCS3ANCNFSM4FM2C6WQ>
.
|
Hi,
I've tried to run the generator plugin on Java 11 and didn't find how to make it work, because Java 11 removed the
java.xml.bind
module. I'm not sure if jooq or vertx-jooq is the issue, but I wanted to ask if you support Java 11 and if yes if you have some Maven configuration you can share?Thanks!
The text was updated successfully, but these errors were encountered: