Comments (9)
Thanks for the repo it was helpful 👍 I did some digging and I found what is the problem. Current implementation of the plugin assumes that the Java plugin will be applied before the jooq plugin and seems like it's not the case for this project. What bothers me is that we actually have the test case for Java project compilation here, that passes but when I copy exact same setup as a standalone project it fails the same way your reporo exmple 🤔 I'll do some more digging later maybe I'll be able to reproduce the problem with the test somehow, but anyways I'll fix the problem in the next release. Unfortunately until that you will have to stick to the workaround you proposed or to older version or in the more complex setups with subprojects it seems to work just fine. Thanks for raising the issue and I'll keep you posted here once I fix it 👍
from jooq-plugin.
Great, thanks so much! I’ll give it a try and let you know.
from jooq-plugin.
@victorlopezsalazar that's actually to be expected 😅 That's because versions >0.3.2
use configuration options introduced in flyway 6.x.x
. I don't plan on downgrading flyway version used by plugin, but maybe we can sort this out somehow by using map properties instead of FluentConfiguration#defaultSchema
, so it's more backwards friendly, but let's track that in this issue: #10
from jooq-plugin.
I’ve upgraded to 0.3.4 and removed the workarounds, and it seems to work perfectly! Thanks for solving the problem @adrianskrobaczrevolut!
from jooq-plugin.
Hey @rnorth 🙂
That's actually very interesting, because >0.2.5 are the versions where I actually fixed the ugly way we used to configure source sets 😅 b12e666#diff-83a8e2a543bc56687e2b75ec62457ef6R93
One thing that crosses my mind is that on previous versions the plugin was automatically applying the java
plugin now it's not doing that anymore(click) and let users apply either that or Kotlin plugin depending on needs. Could you try explicitly applying java
plugin to the project ? If that doesn't help it would be really helpful if you could post some simple setup that reproduces the problem.
from jooq-plugin.
Ah, maybe I've hit an edge case against the new way of doing things then!
I'll create an example repository: unfortunately I already have the java
plugin applied, so it must be some other nuance.
Thanks for getting back to me quickly!
from jooq-plugin.
Quick repository to demonstrate this:
https://github.com/rnorth/jooq-plugin-issue9-repro
- Master branch uses v0.3.3 of the plugin along with manually-added sourcesets. Compiles OK.
- This branch uses v0.3.3 without the manual sourcesets. Compilation of code in
main
fails. - This branch downgrades the plugin to v0.2.5 and removes the manual sourcesets. Compiles OK.
I hope this helps - if you spot anything I'm doing wrong please do let me know.
from jooq-plugin.
@rnorth @victorlopezsalazar should be now fixed in latest 0.3.4
version. Let me know if it works for you guys 🙂
from jooq-plugin.
In my case going from 0.3.2
to 0.3.4
, I got the following stacktrace:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateJooqClasses'.
...
Caused by: java.lang.NoSuchMethodError: org.flywaydb.core.api.configuration.FluentConfiguration.defaultSchema(Ljava/lang/String;)Lorg/flywaydb/core/api/configuration/FluentConfiguration;
at com.revolut.jooq.GenerateJooqClassesTask.migrateDb(GenerateJooqClassesTask.kt:165)
at com.revolut.jooq.GenerateJooqClassesTask.access$migrateDb(GenerateJooqClassesTask.kt:23)
at com.revolut.jooq.GenerateJooqClassesTask$generateClasses$$inlined$use$lambda$1.execute(GenerateJooqClassesTask.kt:153)
at com.revolut.jooq.GenerateJooqClassesTask$generateClasses$$inlined$use$lambda$1.execute(GenerateJooqClassesTask.kt:23)
at com.revolut.jooq.Docker.runInContainer(Docker.kt:38)
at com.revolut.jooq.GenerateJooqClassesTask.generateClasses(GenerateJooqClassesTask.kt:152)
the config for the task is the following:
generateJooqClasses {
schemas = ["my_schema"]
basePackageName = "package"
customizeGenerator {
generate = new Generate()
.withRelations(true)
.withDeprecated(false)
.withRecords(true)
.withImmutablePojos(true)
.withFluentSetters(true)
.withJavaTimeTypes(false)
.withPojosEqualsAndHashCode(true)
}
}
worth to mention that I also have the configuration to replace the flyway version enabled:
resolutionStrategy {
dependencySubstitution {
substitute(module("org.flywaydb:flyway-core"))
.with(module("org.flywaydb:flyway-core:5.2.4"))
}
}
I will play around with configs later when I got a little time to do it.
from jooq-plugin.
Related Issues (20)
- Make flyway and jooq versions configurable. HOT 5
- Add automatically generated classes to a SourceSet. HOT 1
- Plugin is incompatible with Micronaut Gradle plugin HOT 1
- Manual version update of jooq and flyway HOT 3
- NoClassDefFoundError on Windows HOT 4
- ClassNotFoundException: org.jooq.codegen.KotlinGenerator HOT 1
- Allow excluding columns from code generation HOT 1
- Support multiple datasource to generate jooq classes HOT 1
- Support a feature flag to disable generating unchanged files HOT 5
- jooq-plugin is not compatible with new org.jooq:jooq-codegen:3.17.2 HOT 2
- Fails for Postgres as postgres:11.2-alpine is not present in Docker Hub anymore HOT 10
- JNA issue in M1 architecture HOT 2
- generateJooqClasses is unstable when running on MacOS with Rancher Desktop/Colima HOT 5
- Jooq-Docker conflicts with the Flyway plugin HOT 1
- Plugin fails to download docker image from "index.docker.io"
- Update jooq version to 3.18.+
- MySQL 5.7 on Apple Silicon throws "no matching manifest for linux/arm64/v8 in the manifest list entries"
- ForcedType not found in Groovy dialect HOT 2
- Plugin gets stuck or fails when applied in same project with Spring Boot plugin 2.3.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jooq-plugin.