jooq-modelator icon indicating copy to clipboard operation
jooq-modelator copied to clipboard

InvalidUserDataException using default flyway source directory

Open jkellyinsf opened this issue 4 years ago • 1 comments

I'm using version 3.5.0 and setting the migrationsPaths to the flyway default:

migrationsPaths = ['./src/main/resources/db.migration/']

I get this error message:

Caused by: org.gradle.api.InvalidUserDataException: Directory 'C:\Users\...\src\main\resources\db.migration' specified for property '$1' does not exist. 
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.report(ValidatingTaskExecuter.java:64)

I've tried variations on the path by leaving off the initial period and last slash, but I get the same error. Leaving off the last element avoids that error but I presume misses all the migration files. I'm getting a docker error before it gets that far.

I also tried setting it to a file object rather than a string:

migrationsPaths = [file('./src/main/resources/db.migration/')]

but this yields

java.lang.ClassCastException: java.io.File cannot be cast to java.lang.String
    at ch.ayedo.jooqmodelator.gradle.JooqModelatorPlugin$apply$1.execute(JooqModelatorPlugin.kt:95)

Though there doesn't seem to be a line 95 of JooqModelatorPlugin.kt.

jkellyinsf avatar Jun 28 '19 15:06 jkellyinsf

OK, that is indeed strange. I've quickly checked the history of 'JooqModelatorPlugin.kt', and the file seems to never have had 95 lines in its entire history.

The way it is designed to work, a list of Strings is expected with are given to 'Paths.get(...)'.

What Gradle version are you using? On what platform (it looks like it's Windows?)? Have you seen the example projects? Can you please try those, and see if those work.

I think the way you specified the folder when you ran into the docker error looks right. What docker error are you running into?

ayedo avatar Jun 29 '19 11:06 ayedo