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

How to get absolute path of resources dir in GrallVM native-image, e.g. src/main/resources/db/migrations #1247

Open
ctoabidmaqbool opened this issue Apr 17, 2024 · 0 comments

Comments

@ctoabidmaqbool
Copy link

I am instrusted to use FlywayDb works anyway with Gluon Gradle Plugins / Gluon Maven Plugin e.g. GrallVM native-image feature.

flyway/flyway#2927

As the trick provided by @Khithar workd like a charm e.g. Flyway.configure().locations("filesystem:" TEMPDIR) but TEMPDIR in this case must be absolute and relatevie system path e.g. C:\db\migrations' or /db/migrations`.

How can I get absoute path from my code that must works correctly in grallvm-native image too e.g. src/main/resources/db/migrations.

In short how can i get absolute path of migrations dir automatically?

For testing project, let see the comment message: flyway/flyway#2927 (comment)

Its works with .SQL migrations files, Flyway.configure().locations("filesystem:", "C:\db\migration");

@johanvos
@jperedadnr

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

1 participant