Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

InvalidUserDataException using default flyway source directory #9

Open
jkellyinsf opened this issue Jun 28, 2019 · 1 comment
Open

Comments

@jkellyinsf
Copy link

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.

@ayedo
Copy link
Owner

ayedo commented Jun 29, 2019

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants